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

body {
    background: #03010a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    font-family: 'Orbitron', monospace;
    overflow: hidden;
    position: relative;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

#hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
    padding: 16px 10px 10px;
    position: relative;
    z-index: 10;
}

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

.hud-label {
    font-size: 10px;
    letter-spacing: 3px;
    color: #4af;
    text-transform: uppercase;
    opacity: 0.7;
}

.hud-value {
    font-size: 26px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 10px #4af, 0 0 20px #4af;
}

#lives-display {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 4px;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas {
    display: block;
    background: transparent;
    border: 1px solid rgba(68, 170, 255, 0.2);
    box-shadow:
        0 0 30px rgba(68, 170, 255, 0.15),
        0 0 60px rgba(68, 170, 255, 0.07),
        inset 0 0 60px rgba(0,0,0,0.5);
    width: 100%;
    height: auto;
}

#controls {
    margin-top: 12px;
    color: rgba(68, 170, 255, 0.45);
    font-size: 10px;
    letter-spacing: 2px;
    text-align: center;
    padding: 0 10px;
}

.ui-button {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid #4af;
    color: #4af;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 15;
    display: none;
    transition: all 0.2s;
    text-shadow: 0 0 10px #4af;
    box-shadow: 0 0 20px rgba(68,170,255,0.3);
}

.ui-button:hover {
    background: rgba(68,170,255,0.15);
    box-shadow: 0 0 20px rgba(68,170,255,0.4);
}

.ui-button:active {
    transform: scale(0.95);
}

#powerup-indicators {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 15;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

#powerup-banner {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 4px;
    padding: 10px 32px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 20;
}

/* Mobile Controls */
#mobile-controls {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    gap: 20px;
    z-index: 15;
    align-items: center;
    justify-content: center;
}

.mobile-btn {
    width: 70px;
    height: 70px;
    background: rgba(68, 170, 255, 0.2);
    border: 2px solid #4af;
    color: #4af;
    font-size: 28px;
    font-weight: 900;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 0 0 20px rgba(68,170,255,0.3);
    text-shadow: 0 0 10px #4af;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mobile-btn:active {
    background: rgba(68, 170, 255, 0.4);
    box-shadow: 0 0 30px rgba(68,170,255,0.6);
    transform: scale(0.95);
}

.mobile-btn-shoot {
    width: 80px;
    height: 80px;
    font-size: 40px;
    background: rgba(255, 68, 68, 0.2);
    border-color: #f44;
    color: #f44;
    text-shadow: 0 0 10px #f44;
}

.mobile-btn-shoot:active {
    background: rgba(255, 68, 68, 0.4);
    box-shadow: 0 0 30px rgba(255,68,68,0.6);
}

#overlay {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(3, 1, 10, 0.88);
    z-index: 10;
    transition: opacity 0.5s;
    padding: 20px;
}

#overlay.hidden { opacity: 0; pointer-events: none; }

#overlay h1 {
    font-size: 52px;
    font-weight: 900;
    color: #f44;
    text-shadow: 0 0 20px #f44, 0 0 40px #f44, 0 0 80px #f22;
    letter-spacing: 6px;
    margin-bottom: 16px;
    text-align: center;
}

#overlay .sub {
    color: #4af;
    font-size: 14px;
    letter-spacing: 4px;
    text-shadow: 0 0 10px #4af;
    margin-bottom: 40px;
    text-align: center;
}

#restartBtn {
    padding: 14px 48px;
    background: transparent;
    border: 2px solid #4af;
    color: #4af;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: 0 0 10px #4af;
    box-shadow: 0 0 20px rgba(68,170,255,0.3);
}

#restartBtn:hover {
    background: rgba(68,170,255,0.15);
    box-shadow: 0 0 30px rgba(68,170,255,0.6);
}

#restartBtn:active {
    transform: scale(0.95);
}

#pauseBtn:hover {
    background: rgba(68,170,255,0.15);
    box-shadow: 0 0 20px rgba(68,170,255,0.4);
}

/* Mobile Adaptations */
@media (max-width: 850px) {
    #hud {
        padding: 10px 10px 5px;
    }
    
    .hud-label {
        font-size: 8px;
        letter-spacing: 2px;
    }
    
    .hud-value {
        font-size: 18px;
    }
    
    #lives-display svg {
        width: 18px;
        height: 14px;
    }
    
    #controls {
        display: none;
    }
    
    #mobile-controls {
        display: flex;
    }
    
    .ui-button {
        top: 10px;
        right: 10px;
        padding: 8px 16px;
        font-size: 10px;
    }
    
    #powerup-indicators {
        top: 50px;
        gap: 4px;
        flex-wrap: wrap;
        max-width: 90%;
        justify-content: center;
    }
    
    #powerup-indicators > div {
        font-size: 10px !important;
        padding: 4px 8px !important;
    }
    
    #powerup-banner {
        font-size: 14px;
        padding: 8px 20px;
        letter-spacing: 2px;
        top: 60px;
    }
    
    #overlay h1 {
        font-size: 32px;
        letter-spacing: 3px;
    }
    
    #overlay .sub {
        font-size: 12px;
        letter-spacing: 2px;
        margin-bottom: 30px;
    }
    
    #restartBtn {
        padding: 12px 36px;
        font-size: 12px;
        letter-spacing: 3px;
    }
}

@media (max-width: 480px) {
    .mobile-btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .mobile-btn-shoot {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }
    
    #mobile-controls {
        gap: 15px;
        bottom: 15px;
    }
    
    #overlay h1 {
        font-size: 24px;
    }
}

/* Landscape mobile */
@media (max-height: 600px) and (orientation: landscape) {
    #hud {
        padding: 5px 10px;
    }
    
    .hud-value {
        font-size: 16px;
    }
    
    #mobile-controls {
        bottom: 10px;
        gap: 15px;
    }
    
    .mobile-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .mobile-btn-shoot {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    #powerup-indicators {
        top: 40px;
    }
    
    #overlay h1 {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    #overlay .sub {
        margin-bottom: 20px;
    }
}

/* Cookie Banner */
#cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border-top: 2px solid #4af;
    padding: 20px;
    color: #4af;
    z-index: 100;
    font-family: 'Orbitron', monospace;
}

#cookie-banner p {
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 12px;
}

#cookie-banner button {
    background: #4af;
    color: #000;
    border: none;
    padding: 10px 30px;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.2s;
}

#cookie-banner button:hover {
    background: #6cf;
    box-shadow: 0 0 20px rgba(68,170,255,0.6);
}

@media (max-width: 850px) {
    #cookie-banner {
        padding: 15px;
    }
    
    #cookie-banner p {
        font-size: 10px;
        margin-bottom: 10px;
    }
    
    #cookie-banner button {
        padding: 8px 24px;
        font-size: 12px;
    }
}


