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

body {
    font-family: 'Montserrat', 'Poppins', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    background-color: #121212;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: #1a1a1a;
    overflow: hidden;
}

#game-canvas {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #0f0f1e, #202040);
}

#score-display {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    color: white;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

#game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #121212;
    color: white;
    z-index: 10;
}

#game-over h1 {
    font-size: 72px;
    margin-bottom: 30px;
    color: #FF5252;
    text-shadow: 0 0 20px rgba(255, 82, 82, 0.5);
    animation: pulse 1.5s infinite alternate;
}

#game-over p {
    font-size: 36px;
    margin-bottom: 40px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#restart-button, #start-button {
    padding: 15px 30px;
    font-size: 24px;
    background: linear-gradient(to bottom right, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#restart-button:hover, #start-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #121212;
    color: white;
    z-index: 10;
}

#start-screen h1 {
    font-size: 80px;
    margin-bottom: 30px;
    background: linear-gradient(to right, #FF5252, #2196F3, #4CAF50, #FFEB3B);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#start-screen p {
    font-size: 22px;
    margin-bottom: 15px;
    text-align: center;
    max-width: 80%;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

#splash-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #121212;
    transition: opacity 1s ease-out;
}

#splash-screen img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.hidden {
    display: none !important;
}

#leaderboard-container, #start-leaderboard-container {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    width: 80%;
    max-width: 400px;
}

#leaderboard-container h2, #start-leaderboard-container h2 {
    font-size: 24px;
    margin-bottom: 15px;
    text-align: center;
    color: #FFEB3B;
}

#leaderboard-list, #start-leaderboard-list {
    list-style-type: none;
    padding: 0;
}

#leaderboard-list li, #start-leaderboard-list li {
    font-size: 18px;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
}

#leaderboard-list li .username, #start-leaderboard-list li .username {
    font-weight: bold;
    color: #2196F3;
}

#leaderboard-list li .score, #start-leaderboard-list li .score {
    color: #4CAF50;
}

@keyframes pulse {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.05);
    }
}