/*
    This is the CSS file (Cascading Style Sheets), which sets the visual style of your Space Invaders game.
    CSS tells the web browser how to display HTML elements!
*/

/* Set the background color of the page to a nice dark space color */
body {
    background: radial-gradient(ellipse at center, #222b4b 0%, #0a0d18 100%);
    font-family: 'Orbitron', 'Arial Black', 'Arial', sans-serif;
    min-height: 100vh;
}

/* Style for the main game title */
.game-title {
    font-size: 2.8rem;
    color: #39d0ff;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px #174d6b, 2px 2px 0 #1feaee;
}

/* Container for game area */
.game-canvas-container {
    box-shadow: 0 0 24px 4px #188ebbe0, 0 0 60px #1feaee44 inset;
    border-radius: 16px;
    background: linear-gradient(to bottom, rgba(20,30,55,0.8) 20%, rgba(10,10,25,1) 100%);
    padding: 8px;
    position: relative;
}

/* Make sure the canvas fills the container with no border */
#gameCanvas {
    display: block;
    margin: 0 auto;
    background: #080d1a url('stars-bg.png') repeat; /* You can use a tileable star BG image, or leave it just dark */
    border-radius: 12px;
    box-shadow: 0 0 24px 4px #39d0ff21;
    border: 2px solid #0de2f1a1;
}

/* Overlay used for game over, level complete, etc. */
.game-overlay {
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(16,22,44,0.87);
    color: #fff;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    border-radius: 12px;
}

/* Hide overlay unless shown */
.d-none {
    display: none !important;
}

/* Style for the game info bar */
.game-info-row {
    width: 480px;
    max-width: 98vw;
}

/* Instructions box styling */
.game-instructions {
    width: 480px;
    max-width: 98vw;
    color: #eee;
    background: rgba(24, 35, 46, 0.39);
    border-radius: 8px;
    padding: 8px 16px 16px 16px;
    margin-top: 8px;
    text-shadow: 0 1px 2px #25649083;
    letter-spacing: 1px;
    font-size: 1.08rem;
}

/* Style the start button so it's obvious */
#startBtn {
    font-size: 1.29rem;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

kbd {
    color: #090e14;
    background: #57e7fd9c;
    padding: 2px 5px;
    border-radius: 4px;
    box-shadow: 0 1px 1px #61969046;
}

/* Responsive adjustments for small screens */
@media (max-width: 500px) {
    .game-info-row, .game-instructions {
        width: 100vw;
        min-width: 0;
        padding-left: 0;
        padding-right: 0;
        font-size: 0.96rem;
    }
    #gameCanvas, .game-canvas-container {
        width: 98vw !important;
        max-width: 98vw !important;
    }
}

/* A little animated 'glow' effect on level overlay text */
@keyframes overlayGlow {
    0% { text-shadow: 0 2px 12px #fff, 0 4px 16px #39edff; }
    50% { text-shadow: 0 2px 18px #2fd6ff, 0 4px 40px #67fedd; }
    100% { text-shadow: 0 2px 12px #fff, 0 4px 16px #39edff; }
}
.game-overlay h2 {
    animation: overlayGlow 2s infinite alternate;
}


