@import url('https://fonts.googleapis.com/css2?family=VT323&family=Orbitron:wght@400;700;900&family=Space+Mono:wght@400;700&display=swap');

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #0d0d0d;
    --text-primary: #39ff14;
    --text-secondary: #2db816;
    --text-dim: #1a5c0d;
    --accent: #39ff14;
    --glow: rgba(57, 255, 20, 0.4);
    --font-terminal: 'VT323', monospace;
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Space Mono', monospace;
}

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

body {
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-terminal);
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
}

/* Scanlines Overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    transition: opacity 0.5s ease;
}

body.y2k .scanlines {
    opacity: 0.15;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.03),
        rgba(255, 255, 255, 0.03) 1px,
        transparent 1px,
        transparent 3px
    );
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
}

.theme-toggle button {
    background: transparent;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.theme-toggle button:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--glow);
}

.toggle-icon {
    font-size: 14px;
    transition: transform 0.3s ease;
}

body.y2k .toggle-icon {
    color: #ff00ff;
}

body.y2k .theme-toggle button {
    border-color: #ff00ff;
    color: #ff00ff;
}

body.y2k .theme-toggle button:hover {
    background: #ff00ff;
    color: #0a0a0a;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.6);
}

/* Main Container */
.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.content-wrapper {
    text-align: center;
    position: relative;
    z-index: 1;
}

/* ASCII Logo */
.logo {
    margin-bottom: 40px;
}

.ascii-art {
    font-family: 'Courier New', monospace;
    font-size: clamp(10px, 2vw, 18px);
    line-height: 1.1;
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--glow);
    transition: color 0.5s ease, text-shadow 0.5s ease;
    white-space: pre;
    overflow-x: auto;
}

body.y2k .ascii-art {
    color: #ff00ff;
    text-shadow: 
        0 0 10px rgba(255, 0, 255, 0.8),
        0 0 20px rgba(255, 0, 255, 0.6),
        0 0 40px rgba(255, 0, 255, 0.4);
    animation: glitch 3s infinite;
}

/* Tagline */
.tagline {
    font-family: var(--font-body);
    font-size: clamp(14px, 2vw, 18px);
    color: var(--text-secondary);
    letter-spacing: 3px;
    text-transform: lowercase;
    transition: color 0.5s ease;
}

.cursor {
    display: inline-block;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

body.y2k .tagline {
    color: #00ffff;
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 4px;
}

body.y2k .cursor {
    color: #00ffff;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Y2K Elements - Hidden by default */
.y2k-elements {
    display: none;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    pointer-events: none;
    overflow: hidden;
}

body.y2k .y2k-elements {
    display: block;
}

/* Sparkles */
.sparkle {
    position: absolute;
    font-size: 24px;
    color: #00ffff;
    animation: sparkle 2s ease-in-out infinite;
}

.sparkle-1 { top: 10%; left: 20%; animation-delay: 0s; }
.sparkle-2 { top: 30%; right: 15%; animation-delay: 0.5s; color: #ff00ff; }
.sparkle-3 { bottom: 20%; left: 10%; animation-delay: 1s; }
.sparkle-4 { bottom: 30%; right: 20%; animation-delay: 1.5s; color: #39ff14; }

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
}

/* Bubbles */
.bubble {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.3), rgba(0, 255, 255, 0.3));
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 6s ease-in-out infinite;
}

.bubble-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 5%;
    animation-delay: 0s;
}

.bubble-2 {
    width: 60px;
    height: 60px;
    top: 50%;
    right: 10%;
    animation-delay: 2s;
}

.bubble-3 {
    width: 100px;
    height: 100px;
    bottom: 10%;
    left: 30%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* Star Field */
.star-field {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

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

.star:nth-child(1) { top: 15%; left: 25%; animation-delay: 0s; }
.star:nth-child(2) { top: 25%; right: 30%; animation-delay: 0.5s; }
.star:nth-child(3) { bottom: 35%; left: 15%; animation-delay: 1s; }
.star:nth-child(4) { bottom: 20%; right: 25%; animation-delay: 1.5s; }
.star:nth-child(5) { top: 40%; left: 50%; animation-delay: 2s; }

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

/* Footer */
.footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 4px;
    color: var(--text-dim);
    transition: color 0.5s ease;
}

body.y2k .footer {
    color: rgba(255, 0, 255, 0.5);
    font-family: var(--font-display);
}

/* Y2K Background Gradient */
body.y2k {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 50%, #0a1a1a 100%);
}

body.y2k::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(255, 0, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(57, 255, 20, 0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* Glitch Effect for Y2K */
@keyframes glitch {
    0%, 100% { 
        text-shadow: 
            0 0 10px rgba(255, 0, 255, 0.8),
            0 0 20px rgba(255, 0, 255, 0.6);
    }
    25% {
        text-shadow: 
            -2px 0 #00ffff,
            2px 0 #ff00ff;
    }
    50% {
        text-shadow: 
            2px 0 #00ffff,
            -2px 0 #ff00ff;
    }
    75% {
        text-shadow: 
            0 0 10px rgba(255, 0, 255, 0.8),
            0 0 20px rgba(255, 0, 255, 0.6);
    }
}

/* Terminal Cursor Trail */
body.terminal .content-wrapper::before {
    content: '>';
    position: fixed;
    color: var(--text-primary);
    font-family: var(--font-terminal);
    font-size: 16px;
    pointer-events: none;
    opacity: 0.3;
    animation: cursorMove 10s linear infinite;
}

@keyframes cursorMove {
    0% { top: 10%; left: 10%; }
    25% { top: 10%; left: 90%; }
    50% { top: 90%; left: 90%; }
    75% { top: 90%; left: 10%; }
    100% { top: 10%; left: 10%; }
}

/* Responsive */
@media (max-width: 768px) {
    .ascii-art {
        font-size: 6px;
    }
    
    .tagline {
        font-size: 12px;
        letter-spacing: 2px;
    }
    
    .theme-toggle button {
        padding: 6px 12px;
        font-size: 10px;
    }
    
    .y2k-elements {
        width: 100%;
    }
}
