/* ============================================
   ULTIMATE DROPKICK - 80s Neon Aesthetic
   ============================================ */

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

:root {
    --neon-pink: #ff006e;
    --neon-cyan: #00f5ff;
    --neon-purple: #b967ff;
    --neon-yellow: #ffea00;
    --dark-bg: #0a0a0a;
    --grid-color: #ff006e40;
}

body {
    background: linear-gradient(180deg, #1a0033 0%, #0a0a0a 50%, #001a33 100%);
    font-family: 'Courier New', monospace;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--neon-cyan);
}

#game-container {
    position: relative;
    width: 90vw;
    max-width: 896px;
    aspect-ratio: 16 / 9;
    background: #000;
    box-shadow: 
        0 0 20px rgba(255, 0, 110, 0.5),
        0 0 40px rgba(0, 245, 255, 0.3),
        inset 0 0 100px rgba(0, 0, 0, 0.8);
    border: 2px solid var(--neon-pink);
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

/* ============================================
   CRT & Chromatic Aberration Effects
   ============================================ */

.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px
        );
    animation: scanline 8s linear infinite;
}

.crt-overlay.disabled {
    display: none;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

#game-canvas.crt-enabled {
    filter: contrast(1.1) brightness(1.05);
}

#game-canvas.fx-low {
    filter: none !important;
}

/* ============================================
   Overlays
   ============================================ */

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100;
    padding: 20px;
}

.overlay.hidden {
    display: none;
}

/* ============================================
   Title Screen
   ============================================ */

.chrome-logo {
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: bold;
    text-align: center;
    line-height: 1.1;
    background: linear-gradient(180deg, #fff 0%, #00f5ff 50%, #ff006e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 
        0 0 20px rgba(0, 245, 255, 0.8),
        0 0 40px rgba(255, 0, 110, 0.6);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.9));
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

.tagline {
    font-size: clamp(0.8rem, 2vw, 1.2rem);
    color: var(--neon-yellow);
    text-shadow: 0 0 10px var(--neon-yellow);
    margin-bottom: 30px;
    letter-spacing: 0.3em;
}

.start-prompt {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--neon-cyan);
    margin-bottom: 30px;
}

.glow-pulse {
    animation: glow-pulse 1.5s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { 
        text-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
        opacity: 1;
    }
    50% { 
        text-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
        opacity: 0.7;
    }
}

.how-to-play {
    background: rgba(255, 0, 110, 0.1);
    border: 2px solid var(--neon-pink);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    max-width: 500px;
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.3);
}

.how-to-play h3 {
    color: var(--neon-pink);
    text-align: center;
    margin-bottom: 15px;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    text-shadow: 0 0 10px var(--neon-pink);
}

.controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.key {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: #000;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: clamp(1rem, 2vw, 1.3rem);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.5);
    min-width: 40px;
    text-align: center;
}

.action {
    color: var(--neon-cyan);
    font-size: clamp(0.7rem, 1.5vw, 0.9rem);
}

.objective {
    text-align: center;
    color: var(--neon-yellow);
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    line-height: 1.4;
}

.settings-panel {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--neon-cyan);
    font-size: clamp(0.7rem, 1.5vw, 0.9rem);
    cursor: pointer;
}

.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--neon-pink);
}

/* ============================================
   Countdown Screen
   ============================================ */

.countdown-number {
    font-size: clamp(4rem, 15vw, 10rem);
    font-weight: bold;
    color: var(--neon-cyan);
    text-shadow: 
        0 0 30px var(--neon-cyan),
        0 0 60px var(--neon-cyan),
        0 0 90px var(--neon-pink);
    animation: countdown-pulse 1s ease-out;
}

@keyframes countdown-pulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* ============================================
   HUD (Heads-Up Display)
   ============================================ */

#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 50;
    pointer-events: none;
}

#hud.hidden {
    display: none;
}

.hud-left, .hud-right {
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border: 2px solid var(--neon-cyan);
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.4);
}

.hud-label {
    font-size: clamp(0.6rem, 1.2vw, 0.8rem);
    color: var(--neon-pink);
    margin-bottom: 2px;
}

.hud-value {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: var(--neon-cyan);
    font-weight: bold;
    text-shadow: 0 0 10px var(--neon-cyan);
}

.hud-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.powerup-badge {
    background: rgba(185, 103, 255, 0.2);
    border: 2px solid var(--neon-purple);
    padding: 8px 15px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(185, 103, 255, 0.5);
    min-width: 150px;
}

.powerup-badge.hidden {
    display: none;
}

.powerup-name {
    font-size: clamp(0.7rem, 1.5vw, 0.9rem);
    color: var(--neon-purple);
    text-align: center;
    margin-bottom: 5px;
    text-shadow: 0 0 10px var(--neon-purple);
}

.powerup-duration-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
}

.powerup-duration-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-pink));
    width: 100%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--neon-purple);
}

.combo-badge {
    background: rgba(255, 234, 0, 0.2);
    border: 2px solid var(--neon-yellow);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: var(--neon-yellow);
    font-weight: bold;
    text-shadow: 0 0 15px var(--neon-yellow);
    box-shadow: 0 0 20px rgba(255, 234, 0, 0.5);
    animation: combo-pulse 0.5s ease-out;
}

.combo-badge.hidden {
    display: none;
}

@keyframes combo-pulse {
    0% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ============================================
   Game Over Screen
   ============================================ */

.gameover-title {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: bold;
    color: var(--neon-pink);
    text-shadow: 
        0 0 20px var(--neon-pink),
        0 0 40px var(--neon-pink);
    margin-bottom: 15px;
}

.gameover-tagline {
    font-size: clamp(0.8rem, 2vw, 1.2rem);
    color: var(--neon-cyan);
    margin-bottom: 30px;
    font-style: italic;
}

.stats-panel {
    background: rgba(0, 245, 255, 0.1);
    border: 2px solid var(--neon-cyan);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    min-width: 300px;
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-label {
    color: var(--neon-cyan);
}

.stat-value {
    color: var(--neon-yellow);
    font-weight: bold;
    text-shadow: 0 0 10px var(--neon-yellow);
}

.retry-prompt {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--neon-pink);
}

/* ============================================
   Debug Overlay
   ============================================ */

.debug-overlay {
    position: absolute;
    top: 100px;
    right: 10px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--neon-cyan);
    padding: 10px;
    font-size: 11px;
    color: var(--neon-cyan);
    max-width: 250px;
    z-index: 200;
    font-family: monospace;
    line-height: 1.4;
}

.debug-overlay.hidden {
    display: none;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
    #game-container {
        width: 95vw;
    }
    
    .how-to-play {
        padding: 15px;
    }
    
    .controls-grid {
        gap: 10px;
    }
}
