* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.game-container {
    position: relative;
    text-align: center;
}

.score-board {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 20px;
    color: #ffff00;
    text-shadow: 0 0 5px #ffff00;
}

#gameCanvas {
    background-color: #000;
    border: 2px solid #3333ff;
    box-shadow: 0 0 20px #3333ff;
    display: block;
    margin: 0 auto;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.85);
    padding: 30px;
    border: 3px solid #3333ff;
    border-radius: 10px;
    text-align: center;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 0 30px #3333ff;
}

.screen h1 {
    color: #ffff00;
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ffff00;
}

.screen p {
    font-size: 24px;
    margin-bottom: 20px;
    color: #fff;
}

#restartButton {
    background-color: #3333ff;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 20px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 10px #3333ff;
    transition: all 0.3s;
}

#restartButton:hover {
    background-color: #6666ff;
    box-shadow: 0 0 20px #6666ff;
}

.secondary-button {
    background-color: #000;
    color: #ffff00;
    border: 2px solid #3333ff;
    padding: 12px 24px;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 10px;
    box-shadow: 0 0 10px #3333ff;
    transition: all 0.3s;
}

.secondary-button:hover {
    background-color: #111133;
    box-shadow: 0 0 20px #6666ff;
}

#nameInput {
    background-color: #000;
    color: #ffff00;
    border: 2px solid #3333ff;
    padding: 10px;
    font-size: 20px;
    font-family: 'Courier New', monospace;
    text-align: center;
    border-radius: 5px;
    width: 100%;
    max-width: 260px;
    margin-bottom: 15px;
    outline: none;
}

#nameInput:focus {
    box-shadow: 0 0 15px #3333ff;
}

#leaderboardList {
    text-align: center;
    margin: 15px 0;
    font-size: 18px;
    color: #fff;
    line-height: 1.6;
}

.leaderboard-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 10px;
    border-bottom: 1px solid rgba(51, 51, 255, 0.4);
}

.leaderboard-row:first-child {
    color: #ffff00;
    text-shadow: 0 0 8px #ffff00;
}

.leaderboard-empty {
    color: #888;
    font-style: italic;
}

.hidden {
    display: none;
}

@media (max-width: 600px) {
    #gameCanvas {
        width: 95%;
        height: auto;
    }
    
    .score-board {
        font-size: 16px;
        flex-wrap: wrap;
    }
    
    .score-board > div {
        flex: 1 0 100%;
        margin: 5px 0;
    }
    
    .screen {
        width: 95%;
        padding: 20px;
    }
    
    .screen h1 {
        font-size: 36px;
    }
    
    .screen p {
        font-size: 18px;
    }
}
