/* =========================
   GALACTIC GAUNTLET STYLES
   ========================= */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Orbitron', monospace;
    background: linear-gradient(135deg, #0c0c1e, #1a1a3e, #2d1b69);
    background-size: 400% 400%;
    animation: galaxyBackground 20s ease infinite;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    user-select: none;
}

@keyframes galaxyBackground {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Game Container */
#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Game Canvas */
#game-canvas {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #00ff88;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    max-width: 100vw;
    max-height: 100vh;
}
/* UI Overlay & HUD */
#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #00ff88;
    border-radius: 8px;
    padding: 15px;
    backdrop-filter: blur(10px);
}

.label {
    font-weight: 700;
    color: #00ff88;
    margin-right: 10px;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
}

#score {
    font-size: 1.2em;
    font-weight: 900;
    color: #ffffff;
}

/* Power Meter */
#power-meter-container {
    display: flex;
    align-items: center;
}

#power-meter {
    width: 200px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid #ff6b00;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

#power-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff6b00, #ffaa00, #ff6b00);
    border-radius: 8px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.7);
}
/* Lives Display */
#lives-container {
    display: flex;
    gap: 5px;
}

.life {
    font-size: 1.2em;
    filter: drop-shadow(0 0 3px rgba(255, 0, 100, 0.7));
}

/* Wave Indicator */
#wave-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    font-weight: 900;
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

/* Game Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

.screen-content {
    text-align: center;
    max-width: 600px;
    padding: 40px;
}
/* Title Screen */
.game-title {
    font-size: 4em;
    font-weight: 900;
    background: linear-gradient(45deg, #00ff88, #ff6b00, #00ff88);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease infinite;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

@keyframes titleGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.game-subtitle {
    font-size: 1.5em;
    color: #cccccc;
    margin-bottom: 40px;
    font-weight: 400;
}

/* Menu Buttons */
.menu-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.menu-btn {
    background: linear-gradient(45deg, #1a1a3e, #2d1b69);
    border: 2px solid #00ff88;
    color: #ffffff;
    font-family: 'Orbitron', monospace;
    font-size: 1.1em;
    font-weight: 700;
    padding: 15px 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    min-width: 200px;
    pointer-events: auto;
}
.menu-btn:hover {
    background: linear-gradient(45deg, #00ff88, #2d1b69);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    transform: translateY(-2px);
}

.menu-btn.primary {
    background: linear-gradient(45deg, #ff6b00, #ffaa00);
    border-color: #ff6b00;
}

.menu-btn.primary:hover {
    background: linear-gradient(45deg, #ffaa00, #ff6b00);
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.7);
}

/* Instructions */
.instructions {
    text-align: left;
    margin: 30px 0;
}

.instruction-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.key {
    background: rgba(0, 255, 136, 0.2);
    border: 1px solid #00ff88;
    border-radius: 4px;
    padding: 8px 12px;
    margin-right: 20px;
    font-family: monospace;
    font-weight: 700;
    min-width: 80px;
    text-align: center;
    color: #00ff88;
}

.gameplay-tip {
    background: rgba(255, 107, 0, 0.1);
    border-left: 4px solid #ff6b00;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    text-align: left;
}
/* Mobile Controls */
.mobile-only {
    display: none;
}

#mobile-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 20;
    pointer-events: auto;
}

.control-section {
    display: flex;
    gap: 10px;
}

.control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #00ff88;
    background: rgba(0, 0, 0, 0.8);
    color: #00ff88;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.control-btn:active {
    transform: scale(0.95);
    box-shadow: inset 0 0 10px rgba(0, 255, 136, 0.5);
}

.control-btn.attack {
    border-color: #ff6b00;
    color: #ff6b00;
}

.control-btn.special {
    border-color: #ff0066;
    color: #ff0066;
}
/* Responsive Design */
@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
    
    #game-canvas {
        width: 100vw !important;
        height: 100vh !important;
        border: none;
        border-radius: 0;
    }
    
    #hud {
        top: 10px;
        left: 10px;
        right: 10px;
        padding: 10px;
        font-size: 0.9em;
    }
    
    #power-meter {
        width: 120px;
        height: 16px;
    }
    
    .game-title {
        font-size: 2.5em;
    }
    
    .menu-btn {
        padding: 12px 30px;
        font-size: 1em;
        min-width: 160px;
    }
    
    .screen-content {
        padding: 20px;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 2em;
    }
    
    #hud {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    #power-meter-container,
    #lives-display,
    #score-display {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}