* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --neon-pink: #ff2a6d;
    --neon-cyan: #05d9e8;
    --neon-purple: #d300c5;
    --deep-purple: #1a0a2e;
    --horizon-orange: #ff6b35;
    --sun-yellow: #ffcc00;
}

body {
    min-height: 100vh;
    background: #0d0221;
    font-family: 'Orbitron', sans-serif;
    overflow-x: hidden;
}

/* Background scene - fixed behind all content */
.scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
}

/* Content layer - sits above the background */
.content {
    position: relative;
    z-index: 200;
    min-height: 100vh;
    pointer-events: none; /* Allow clicks to pass through to scene by default */
}

.content > * {
    pointer-events: auto; /* Re-enable clicks on actual content */
}

/* Sky gradient */
.sky {
    position: absolute;
    width: 100%;
    height: 60%;
    background: linear-gradient(
        to bottom,
        #0d0221 0%,
        #150734 20%,
        #1a0a2e 40%,
        #2d1b4e 60%,
        #541388 75%,
        #ff2a6d 90%,
        #ff6b35 100%
    );
}

/* Stars */
.stars {
    position: absolute;
    width: 100%;
    height: 50%;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* Chronoton Head Logo - dips behind horizon like setting sun */
.logo-container {
    position: absolute;
    bottom: 35%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    width: 250px;
    height: auto;
    filter: drop-shadow(0 0 40px rgba(4, 196, 202, 0.7))
            drop-shadow(0 0 80px rgba(243, 206, 117, 0.5));
    animation: logoPulse 4s infinite ease-in-out;
}

/* Synthwave sun circle behind the logo */
.logo-circle {
    opacity: 0.8;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    background: linear-gradient(
        to bottom,
        #2a2a2a 0%,
        #000000 100%
    );
    border-radius: 50%;
    z-index: 0;
    box-shadow: 
        0 0 60px rgba(0, 0, 0, 0.8),
        0 0 120px rgba(20, 20, 20, 0.5);
    animation: none;
    
    /* Retro sun horizontal cuts - progressive thickening towards bottom */
    -webkit-mask-image: linear-gradient(
        to bottom,
        black 0%,
        black 50%,      
        transparent 50%,
        transparent 51%,
        black 51%,
        black 64%,      
        transparent 64%,
        transparent 65%,
        black 65%,
        black 75%,      
        transparent 75%,
        transparent 76%,
        black 76%,
        black 84%,      
        transparent 84%,
        transparent 85%,
        black 85%,
        black 91%,      
        transparent 91%,
        transparent 92%,
        black 92%,
        black 95%,      
        transparent 95%,
        transparent 96%,
        black 96%,
        black 98%,      
        transparent 98%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        black 0%,
        black 50%,      
        transparent 50%,
        transparent 51%,
        black 51%,
        black 64%,      
        transparent 64%,
        transparent 65%,
        black 65%,
        black 75%,      
        transparent 75%,
        transparent 76%,
        black 76%,
        black 84%,      
        transparent 84%,
        transparent 85%,
        black 85%,
        black 91%,      
        transparent 91%,
        transparent 92%,
        black 92%,
        black 95%,      
        transparent 95%,
        transparent 96%,
        black 96%,
        black 98%,      
        transparent 98%,
        transparent 100%
    );
}

.logo-container img {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 1;
}

@keyframes logoPulse {
    0%, 100% { 
        filter: drop-shadow(0 0 40px rgba(4, 196, 202, 0.7))
                drop-shadow(0 0 80px rgba(243, 206, 117, 0.5));
    }
    50% { 
        filter: drop-shadow(0 0 60px rgba(4, 196, 202, 0.9))
                drop-shadow(0 0 100px rgba(243, 206, 117, 0.7));
    }
}

/* Horizon line */
.horizon {
    position: absolute;
    bottom: 40%;
    width: 100%;
    height: 4px;
    background: var(--neon-pink);
    box-shadow: 
        0 0 20px var(--neon-pink),
        0 0 40px var(--neon-pink),
        0 0 80px var(--neon-pink);
    z-index: 10;
}

/* Haze overlay to fade grid lines as they emerge from horizon */
.horizon-haze {
    position: absolute;
    bottom: 25%; /* Lowered to ensure it sits below horizon (which is at 40%) */
    left: 0;
    width: 100%;
    height: 15%;
    /* Simple gradient fade - no blur filter to avoid flickering */
    background: linear-gradient(
        to bottom,
        #0a0215 0%,
        rgba(10, 2, 21, 0.8) 40%,
        rgba(10, 2, 21, 0) 100%
    );
    pointer-events: none;
    z-index: 5;
}

/* Grid container - clips at horizon */
.grid-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    overflow: hidden;
    z-index: 1;
}

/* Grid background */
.grid-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0215;
}

/* Three.js canvas for grid */
#grid-canvas {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120%;
}

/* Scanlines effect */
.scanlines {
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 100;
    opacity: 0.3;
}

/* Title */
.title {
    padding-top: 8vh;
    margin: 0 auto;
    width: 90%;
    text-align: center;
    /* Responsive font size: min 2rem, preferred 10vw, max 6rem */
    font-size: clamp(2rem, 10vw, 6rem);
    font-weight: 900;
    color: white;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 40px rgba(5, 217, 232, 0.5),
        0 0 80px rgba(5, 217, 232, 0.3);
    letter-spacing: 0.1em; /* Reduced slightly for mobile fit */
    animation: titleGlow 3s infinite ease-in-out;
    word-wrap: break-word; /* Ensure long words break if needed */
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(255, 255, 255, 0.6),
            0 0 40px rgba(5, 217, 232, 0.5),
            0 0 80px rgba(5, 217, 232, 0.3);
    }
    50% {
        text-shadow: 
            0 0 15px rgba(255, 255, 255, 1),
            0 0 30px rgba(255, 255, 255, 0.8),
            0 0 60px rgba(255, 42, 109, 0.6),
            0 0 100px rgba(255, 42, 109, 0.4);
    }
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 8rem auto; /* Increased top margin significantly */
    max-width: 800px;
    padding: 0 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem; /* Smaller padding */
    background: rgba(13, 2, 33, 0.6);
    border: 1px solid var(--neon-cyan);
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem; /* Smaller font */
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(5, 217, 232, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.social-link:hover {
    background: rgba(5, 217, 232, 0.2);
    box-shadow: 0 0 20px rgba(5, 217, 232, 0.6);
    transform: translateY(-2px);
    text-shadow: 0 0 8px white;
}

.social-link i {
    font-size: 1.2rem;
}

/* Track Grid */
.track-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
}

.track-grid iframe {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.track-grid iframe:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255, 42, 109, 0.3);
}

/* Vignette */
.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 40%,
        rgba(0, 0, 0, 0.6) 100%
    );
    pointer-events: none;
    z-index: 150;
}

/* Laser beams */
.lasers {
    position: absolute;
    width: 100%;
    height: 60%;
    overflow: hidden;
    z-index: 4;
}

.laser {
    position: absolute;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--neon-pink), transparent);
    opacity: 0.5;
    animation: laserPulse 4s infinite ease-in-out;
}

.laser:nth-child(1) { left: 20%; animation-delay: 0s; }
.laser:nth-child(2) { left: 40%; animation-delay: 1s; }
.laser:nth-child(3) { left: 60%; animation-delay: 2s; }
.laser:nth-child(4) { left: 80%; animation-delay: 3s; }

@keyframes laserPulse {
    0%, 100% { opacity: 0.2; height: 60%; }
    50% { opacity: 0.6; height: 80%; }
}

/* Bio Section */
.bio-section {
    max-width: 800px;
    margin: 12rem auto;
    padding: 0 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.8;
    text-shadow: 0 0 10px rgba(5, 217, 232, 0.3);
    letter-spacing: 0.05em;
}

.bio-section p {
    position: relative;
    display: inline-block;
    padding: 2rem;
    background: rgba(13, 2, 33, 0.4);
    border: 1px solid rgba(5, 217, 232, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
}

/* Mobile Responsive Adjustments */
@media (max-width: 600px) {
    .title {
        padding-top: 12vh; /* More space on mobile */
        width: 95%;
        letter-spacing: 0.05em;
    }
    
    .logo-container {
        width: 180px; /* Smaller logo on mobile */
        bottom: 40%;
    }
    
    .logo-circle {
        width: 260px;
        height: 260px;
    }
    
    .social-links {
        gap: 1rem;
        margin-top: 6rem;
    }
    
    .social-link {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        width: 45%; /* 2 per row on mobile */
        justify-content: center;
    }
    
    .track-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1.5rem;
    }

    .bio-section {
        margin: 8rem auto;
        font-size: 0.95rem;
    }
}