/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: #000;
    color: #0f0;
    font-family: 'Courier New', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.game-wrapper {
    width: min(800px, calc(100vw - 24px));
    text-align: center;
    position: relative;
}

.title {
    font-size: 2.5rem;
    letter-spacing: 6px;
    margin-bottom: 10px;
    text-shadow: 0 0 10px #0f0, 0 0 20px #0f0;
}

.info-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 0 10px;
    font-size: 0.9rem;
}

.score-board, .lives-board, .wave-board {
    font-size: 1.4rem;
    text-shadow: 0 0 5px currentColor;
}
.score-board { color: #0ff; }
.lives-board { color: #f00; }
.wave-board { color: #ff0; }

.instructions-box {
    background: rgba(0, 20, 0, 0.6);
    border: 1px solid #0f0;
    padding: 8px 12px;
    text-align: left;
    border-radius: 4px;
    color: #aaa;
}
.instructions-box h3 { color: #0f0; margin-bottom: 4px; font-size: 0.95rem; }

.made-by {
    font-size: 0.8rem;
    color: #666;
    align-self: flex-end;
    margin-bottom: 5px;
    font-style: italic;
    text-align: right;
}

canvas {
    width: 100%;
    height: auto;
    border: 2px solid #0f0;
    box-shadow: 0 0 25px rgba(0, 255, 0, 0.2);
    background: #050505;
    display: block;
    margin: 0 auto;
}

/* Overlays */
.overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #0f0;
    padding: 25px 40px;
    text-align: center;
    z-index: 10;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.overlay h2 { font-size: 2rem; margin-bottom: 10px; text-shadow: 0 0 8px currentColor; }
#gameOverScreen h2 { color: #f00; }
.overlay p { color: #aaa; font-size: 1.1rem; margin: 5px 0; }
.hidden { display: none; }

/* Buttons */
.restart-btn, .back-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #000;
    color: #0f0;
    border: 2px solid #0f0;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 10px 5px;
}

.restart-btn:hover, .back-btn:hover {
    background: #0f0;
    color: #000;
    box-shadow: 0 0 10px #0f0;
}

.home-link {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 100;
    margin: 0;
}

.games-link {
    top: 62px;
}
