body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
}

.screen {
    display: none;
    width: 100%;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

.screen.active {
    display: flex;
}

.menu-panel {
    max-width: 760px;
    width: 100%;
    text-align: center;
    border: 4px solid #ffff55;
    padding: 34px;
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 0 0 40px rgba(255, 255, 85, 0.25);
}

.menu-panel h1 {
    margin: 0 0 8px;
    font-size: 4rem;
    letter-spacing: 0.6rem;
    color: #ffff55;
    text-shadow: 0 0 10px rgba(255, 255, 85, 0.55);
}

.small-text,
.menu-instructions {
    margin: 16px auto;
    max-width: 700px;
    color: #c0c0c0;
    font-size: 1rem;
    letter-spacing: 0.12rem;
}

#start-button,
#back-to-menu {
    margin: 24px 0;
    padding: 18px 34px;
    font-size: 1.2rem;
    color: #000;
    background: #ffff55;
    border: none;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

#start-button:hover,
#back-to-menu:hover {
    transform: scale(1.03);
    box-shadow: 0 0 28px rgba(255, 255, 85, 0.55);
}

.scoreboard-panel {
    margin-top: 20px;
    border: 2px solid #66ff66;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    text-align: left;
}

.scoreboard-title {
    font-size: 1.1rem;
    color: #ffff55;
    margin-bottom: 12px;
}

#high-score-list {
    margin: 0;
    padding-left: 18px;
}

#high-score-list li {
    margin: 5px 0;
    font-size: 1rem;
    color: #f0f0f0;
}

#game-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#scoreboard {
    width: 800px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1rem;
}

.score-block {
    flex: 1;
    text-align: center;
    border: 2px solid #ffff55;
    padding: 10px 14px;
    margin: 0 8px;
    background: rgba(255, 255, 85, 0.06);
}

.score-block .label {
    font-size: 0.85rem;
    color: #c0c0c0;
    letter-spacing: 0.2rem;
}

.score-block div:last-child {
    margin-top: 6px;
    font-size: 1.6rem;
    letter-spacing: 0.15rem;
    color: #ffff55;
}

#game-canvas {
    border: 6px solid #ffff55;
    background-color: #000;
    box-shadow: 0 0 60px rgba(255, 255, 85, 0.25);
}

#instructions {
    margin-top: 14px;
    color: #c0c0c0;
    font-size: 1rem;
    letter-spacing: 0.25rem;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.92);
}

.overlay.hidden {
    display: none;
}

.overlay-panel {
    text-align: center;
    border: 4px solid #ffff55;
    padding: 36px;
    max-width: 540px;
    width: calc(100% - 40px);
    background: rgba(0, 0, 0, 0.95);
}

.overlay-title {
    color: #ff6666;
    font-size: 3rem;
    margin-bottom: 24px;
}

.overlay-score {
    color: #ffff55;
    font-size: 2rem;
    margin-bottom: 28px;
}

@media (max-width: 860px) {
    body {
        padding: 20px 0;
    }

    .menu-panel,
    .overlay-panel,
    #scoreboard,
    #game-canvas {
        width: 95%;
    }

    #game-canvas {
        max-width: 100%;
        height: auto;
    }

    .score-block {
        margin: 0 4px;
    }
}
