/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Canvas styling */
#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #0c1445 0%, #1a237e 50%, #0d47a1 100%);
    cursor: crosshair;
}

/* Screen overlays */
.screen {
    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.8);
    z-index: 1000;
    text-align: center;
    padding: 20px;
}

.screen h1 {
    font-size: clamp(2rem, 8vw, 4rem);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    color: #ffd700;
}

.screen h2 {
    font-size: clamp(1.5rem, 6vw, 3rem);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    color: #ff6b6b;
}

.screen p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Button styling */
.gameButton {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    color: white;
    padding: 15px 30px;
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-family: inherit;
    border-radius: 25px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
}

.gameButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(45deg, #ee5a24, #ff6b6b);
}

.gameButton:active {
    transform: translateY(0);
}

/* Instructions styling */
.instructions {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.instructions h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: clamp(1.1rem, 3.5vw, 1.3rem);
}

.instructions p {
    margin-bottom: 8px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

/* Game UI styling */
#gameUI {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#gameUI > div {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: bold;
}

#scoreDisplay {
    color: #ffd700;
}

#healthDisplay {
    color: #4caf50;
}

#stageDisplay {
    color: #2196f3;
}

#enemyProgress {
    color: #ff9800;
    font-weight: bold;
}

.health-restore {
    color: #4caf50;
    font-weight: bold;
    animation: healthGlow 2s ease-in-out;
}

@keyframes healthGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* Health bar styling */
#healthBar {
    width: 150px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    margin-top: 5px;
}

#healthFill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    width: 100%;
    transition: width 0.3s ease;
}

/* Pause button positioning */
#pauseButton {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 10px 20px;
    font-size: clamp(0.8rem, 2vw, 1rem);
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Stage Complete Screen */
#stageCompleteScreen h2 {
    color: #4caf50;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.stageProgress {
    margin-top: 20px;
    width: 300px;
}

.progressBar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
}

.progressFill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    width: 0%;
    animation: progressFill 3s linear;
}

@keyframes progressFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

.game-title-section {
    text-align: center;
    margin: 20px 0;
}

.instructions {
    max-width: 400px;
    margin: 20px auto;
    text-align: center;
}



/* Utility classes */
.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #gameUI {
        top: 10px;
        left: 10px;
        padding: 10px;
        gap: 10px;
    }
    
    #pauseButton {
        top: 10px;
        right: 10px;
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .gameButton {
        padding: 12px 24px;
    }
}

@media (max-width: 480px) {
    #gameUI {
        position: fixed;
        top: 5px;
        left: 5px;
        right: 5px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 8px;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    #gameUI > div {
        font-size: 0.8rem;
    }
    
    #healthBar {
        width: 80px;
        height: 8px;
    }
    
    #pauseButton {
        position: fixed;
        top: 60px; /* Move button below the UI area */
        right: 5px;
        padding: 6px 12px;
        font-size: 0.7rem;
        z-index: 1001; /* Ensure it's above other elements */
    }
} 