:root {
    --bg-color: #050510;
    --neon-cyan: #00f3ff;
    --neon-pink: #ff00ff;
    --neon-gold: #ffaa00;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', sans-serif;
    --font-retro: 'Press Start 2P', cursive;
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: white;
    font-family: var(--font-main);
    overflow: hidden;
    /* Prevent scrolling, canvas handles it */
    height: 100vh;
    width: 100vw;
    cursor: url('normal_select.ani'), auto;
}


/* Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-content {
    text-align: center;
}

.glitch {
    font-family: var(--font-retro);
    font-size: 1.5rem;
    color: var(--neon-cyan);
    margin-bottom: 2rem;
    text-shadow: 2px 2px var(--neon-pink);
}

.progress-bar {
    width: 200px;
    height: 4px;
    background: #333;
    margin: 0 auto;
    border-radius: 2px;
}

.progress {
    width: 0%;
    height: 100%;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    transition: width 0.2s;
}

/* Main Card Container */
.card-container {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    /* Border handled by pseudo-element */
    padding: 3rem 4rem;
    border-radius: 24px;
    text-align: center;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
    /* Ensure content is above ::before if needed, though ::before is usually behind for backgrounds, here we use it for border overlay */
}

/* Moving Gradient Border */
.glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    /* Border width */
    background: conic-gradient(from var(--angle), red, yellow, lime, aqua, blue, magenta, red);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    /* Let clicks pass through to content */
    animation: rotate 4s linear infinite;
    z-index: 2;
    /* Sit on top of the card background but below content if content had z-index. Here it frames the card. */
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px 0 rgba(0, 243, 255, 0.1);
}

h1#profile-name {
    font-family: var(--font-retro);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    background-image: linear-gradient(to right, red, orange, yellow, green, cyan, blue, violet, red);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: text-flow 4s linear infinite;
}

p#profile-tagline {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    /* Border removed, handled by pseudo */
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.social-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    /* Border width */
    background: conic-gradient(from var(--angle), red, yellow, lime, aqua, blue, magenta, red);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: rotate 4s linear infinite;
}

.social-btn:hover {
    background: rgba(0, 243, 255, 0.1);
    /* border-color removed */
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    /* text-shadow: 0 0 5px var(--neon-cyan); */
    /* Removed text shadow to keep it clean with border */
}

.social-btn i {
    font-size: 1.2rem;
}

/* HUD */
#game-hud {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    font-family: var(--font-retro);
    display: flex;
    gap: 10px;
}

.hud-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.hud-btn:hover {
    background: var(--neon-cyan);
    color: black;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.card-hidden .glass-card {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
}

.score-container {
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border: 1px solid var(--neon-cyan);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
    display: flex;
    gap: 10px;
    align-items: center;
}

.score-label {
    color: var(--neon-cyan);
    font-size: 0.8rem;
}

#score-value {
    color: white;
    font-size: 1.2rem;
    text-shadow: 0 0 5px white;
}

/* Custom Cursor for Interactive Elements */
/* High specificity to ensure override */
a,
button,
.social-btn,
.hud-btn,
.glass-card:hover,
#toggle-card-btn {
    cursor: url('link_select.ani'), pointer;
}

/* Milestone Text */
#milestone-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-retro);
    font-size: 5rem;
    color: var(--neon-gold);
    text-shadow: 0 0 20px var(--neon-gold), 0 0 50px red;
    z-index: 2000;
    pointer-events: none;
    transition: opacity 0.5s, transform 0.5s;
    opacity: 1;
}

#milestone-text.hidden {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
}

/* RGB Animation Keyframes */
@keyframes rotate {
    to {
        --angle: 360deg;
    }
}

@keyframes text-flow {
    to {
        background-position: 200% center;
    }
}