* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Login Screen */
#loginScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: 
        /* Dark background with subtle pattern */
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%, transparent 75%, #0a0a0a 75%, #0a0a0a),
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%, transparent 75%, #0a0a0a 75%, #0a0a0a),
        #111;
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    color: white;
    z-index: 35;
}

#loginScreen.hidden {
    display: none;
}

#loginScreen h1 {
    font-size: 48px;
    margin-bottom: 40px;
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

.auth-container {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    width: 300px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.auth-container h2 {
    color: #4CAF50;
    margin-bottom: 20px;
}

.auth-container input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
}

#loginButton, #registerButton {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    display: block;
    font-size: 18px;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
    width: 100%;
}

#registerButton {
    background-color: #2196F3;
}

#loginButton:hover {
    background-color: #45a049;
    transform: scale(1.02);
}

#registerButton:hover {
    background-color: #0b7dda;
    transform: scale(1.02);
}

#userPanel {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 15px;
    border-radius: 20px;
}

#userEmail {
    color: white;
    font-size: 16px;
}

#logoutButton {
    background-color: #f44336;
    border: none;
    color: white;
    padding: 8px 15px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    border-radius: 15px;
    transition: all 0.3s;
}

#logoutButton:hover {
    background-color: #d32f2f;
    transform: scale(1.05);
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    background-color: #222;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    border: none;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    outline: none;
}

/* Main Menu */
#mainMenu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: 
        /* Dark background with subtle pattern */
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%, transparent 75%, #0a0a0a 75%, #0a0a0a),
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%, transparent 75%, #0a0a0a 75%, #0a0a0a),
        #111;
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    color: white;
    z-index: 30;
}

#mainMenu.hidden {
    display: none;
}

#mainMenu h1 {
    font-size: 48px;
    margin: 0;
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

#mainMenuHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 40px;
    margin-bottom: 40px;
}

#mainMenuCoins {
    background-color: rgba(255, 215, 0, 0.7);
    color: #000;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 24px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    margin: 0;
}

#playButton, #leaderboardButton, #howToPlayButton, #controlsButton, #resetDataButton {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 15px 40px;
    text-align: center;
    text-decoration: none;
    display: block;
    font-size: 24px;
    margin: 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
    width: 200px;
}

#playButton:hover, #leaderboardButton:hover, #howToPlayButton:hover, #controlsButton:hover, #resetDataButton:hover {
    background-color: #45a049;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
}

/* How to Play Screen */
#howToPlayScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background: 
        /* Dark background with subtle pattern */
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%, transparent 75%, #0a0a0a 75%, #0a0a0a),
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%, transparent 75%, #0a0a0a 75%, #0a0a0a),
        #111;
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    color: white;
    z-index: 30;
    overflow-y: auto;
    padding: 20px 0;
}

#howToPlayScreen.hidden {
    display: none;
}

/* Custom Scrollbar for How to Play Screen */
#howToPlayScreen::-webkit-scrollbar {
    width: 12px;
}

#howToPlayScreen::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

#howToPlayScreen::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4CAF50, #2196F3);
    border-radius: 10px;
    border: 2px solid #111;
}

#howToPlayScreen::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #FF9800, #FF5722);
}

#howToPlayScreen h2 {
    font-size: 36px;
    margin: 20px 0 30px 0;
    color: #ff4444;
}

.how-to-content {
    width: 90%;
    max-width: 1000px;
    text-align: left;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 20px;
}

.how-to-content h3 {
    color: #4CAF50;
    margin-top: 20px;
    margin-bottom: 10px;
}

.how-to-content p {
    font-size: 18px;
    margin: 10px 0;
    line-height: 1.5;
}

.how-to-content ul {
    font-size: 18px;
    margin: 10px 0 20px 20px;
    line-height: 1.5;
}

.how-to-content li {
    margin: 10px 0;
}

#backButtonHowToPlay {
    background-color: #2196F3;
    border: none;
    color: white;
    padding: 15px 40px;
    text-align: center;
    text-decoration: none;
    display: block;
    font-size: 20px;
    margin: 30px 0;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.4);
    width: 200px;
}

#backButtonHowToPlay:hover {
    background-color: #0b7dda;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.6);
}

/* Item Category Styles for How to Play section */
.item-category {
    margin: 20px 0;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 5px solid #4CAF50;
}

.item-category h4 {
    color: #FF9800;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
}

.item-category ul {
    margin-left: 15px;
}

.item-category li {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 18px;
}

.item-category li:last-child {
    border-bottom: none;
}

.item-category em {
    color: #2196F3;
    font-style: normal;
    font-weight: bold;
}

/* Maps Screen */
#mapsScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background: 
        /* Dark background with subtle pattern */
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%, transparent 75%, #0a0a0a 75%, #0a0a0a),
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%, transparent 75%, #0a0a0a 75%, #0a0a0a),
        #111;
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    color: white;
    z-index: 30;
    overflow-y: auto;
    padding: 20px 0;
}

#mapsScreen.hidden {
    display: none;
}

#mapsScreen h2 {
    font-size: 36px;
    margin: 20px 0 30px 0;
    color: #ff4444;
}

#mapsContainer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
    padding: 0 20px;
    width: 100%;
    max-width: 1200px;
}

.map-item {
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.9), rgba(10, 10, 10, 0.9));
    border-radius: 15px;
    padding: 20px;
    width: 200px;
    text-align: center;
    border: 3px solid #4CAF50;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.map-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.7);
    border-color: #FF9800;
}

.map-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #4CAF50, #FF9800, #2196F3);
}

.map-item h3 {
    color: #4CAF50;
    margin-bottom: 15px;
    font-size: 22px;
    text-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

.map-item p {
    margin: 10px 0;
    font-size: 16px;
    color: #e0e0e0;
}

#buyMap2, #buyMap3, #buyMap4, #buyMap5, #buyMap6, #buyMap7, #buyMap8, #buyMap9, #buyMap10 {
    background: linear-gradient(145deg, #FF9800, #F57C00);
    border: 2px solid #FF5722;
    color: white;
    padding: 12px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 18px;
    font-weight: bold;
    margin: 15px 0;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#buyMap2:hover, #buyMap3:hover, #buyMap4:hover, #buyMap5:hover, #buyMap6:hover, #buyMap7:hover, #buyMap8:hover, #buyMap9:hover, #buyMap10:hover {
    background: linear-gradient(145deg, #FF5722, #E64A19);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

#buyMap2:disabled, #buyMap3:disabled, #buyMap4:disabled, #buyMap5:disabled, #buyMap6:disabled, #buyMap7:disabled, #buyMap8:disabled, #buyMap9:disabled, #buyMap10:disabled {
    background: linear-gradient(145deg, #757575, #616161);
    border: 2px solid #424242;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#difficultyRanking {
    text-align: center;
    color: white;
    margin: 20px 0;
    font-size: 18px;
}

/* Custom scrollbar for maps screen */
#mapsScreen::-webkit-scrollbar {
    width: 12px;
}

#mapsScreen::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

#mapsScreen::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4CAF50, #2196F3);
    border-radius: 10px;
}

#mapsScreen::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #FF9800, #FF5722);
}

.map-item.locked {
    border-color: #757575;
    opacity: 0.7;
}

.map-item.locked h3 {
    color: #757575;
    text-shadow: none;
}

.map-item.locked::before {
    background: linear-gradient(90deg, #757575, #616161);
}

#difficultyRanking h3 {
    color: #FF9800;
    margin-bottom: 10px;
}

#backButtonMaps {
    background-color: #2196F3;
    border: none;
    color: white;
    padding: 15px 40px;
    text-align: center;
    text-decoration: none;
    display: block;
    font-size: 20px;
    margin: 30px auto;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.4);
    width: 200px;
}

#backButtonMaps:hover {
    background-color: #0b7dda;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.6);
}

/* Controls Screen */
#controlsScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background: 
        /* Dark background with subtle pattern */
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%, transparent 75%, #0a0a0a 75%, #0a0a0a),
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%, transparent 75%, #0a0a0a 75%, #0a0a0a),
        #111;
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    color: white;
    z-index: 30;
    overflow-y: auto;
    padding: 20px 0;
}

#controlsScreen.hidden {
    display: none;
}

#controlsScreen h2 {
    font-size: 36px;
    margin: 20px 0 30px 0;
    color: #ff4444;
}

#controlsScreen ul {
    list-style: none;
    font-size: 20px;
    margin: 20px 0;
    text-align: left;
    width: 80%;
    max-width: 500px;
}

#controlsScreen li {
    margin: 15px 0;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

#controlsScreen h3 {
    color: #FF9800;
    margin-top: 30px;
    margin-bottom: 15px;
}

#backButton {
    background-color: #2196F3;
    border: none;
    color: white;
    padding: 15px 40px;
    text-align: center;
    text-decoration: none;
    display: block;
    font-size: 20px;
    margin: 30px 0;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.4);
    width: 200px;
    align-self: center;
}

#backButton:hover {
    background-color: #0b7dda;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.6);
}

/* Game UI */
#ui {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 20px;
    pointer-events: none;
    z-index: 10;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}



#ui.hidden {
    display: none;
}

#hotbar.hidden {
    display: none;
}

#timerContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

#heartsContainer, #coins, #lastRun, #timer, #highScore {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    margin: 0 5px;
}

#heartsContainer {
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    font-size: 24px;
    font-weight: bold;
}

#coins {
    background-color: rgba(255, 215, 0, 0.7);
    color: #000;
    font-weight: bold;
}

#lastRun, #highScore {
    font-size: 16px;
}

/* Stamina Bar */
#staminaContainer {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
}

#staminaBar {
    width: 100%;
    height: 100%;
    background-color: #333;
    border-radius: 10px;
}

#staminaFill {
    height: 100%;
    width: 100%;
    background: linear-gradient(to right, #ff0000, #00ff00);
    border-radius: 10px;
    transition: width 0.1s ease;
}

#staminaText {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Hotbar/Inventory */
#hotbar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    pointer-events: auto;
    z-index: 15;
    /* Ensure it's always visible */
    opacity: 1;
}

.hotbarSlot {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 3px solid #888;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    /* Ensure the hotbar is always visible */
    opacity: 1;
    transition: all 0.2s ease; /* Smooth transition for visual feedback */
}

.hotbarSlot.active {
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 1);
    transform: scale(1.15); /* Slightly larger scale */
    z-index: 20;
    position: relative;
    /* Additional glow effect for better visibility */
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

/* Pause Menu */
#pauseMenu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: 
        /* Dark background with subtle pattern */
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%, transparent 75%, #0a0a0a 75%, #0a0a0a),
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%, transparent 75%, #0a0a0a 75%, #0a0a0a),
        #111;
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    color: white;
    z-index: 25;
    pointer-events: auto;
}

#pauseMenu.hidden {
    display: none;
}

#pauseContent {
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    min-width: 350px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
    border: 2px solid #4CAF50;
}

#pauseContent h2 {
    font-size: 36px;
    margin-bottom: 25px;
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.7);
}

#resumeButton, #restartPauseButton, #mainMenuPauseButton {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 15px 30px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 20px;
    margin: 15px 2px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
    width: 180px;
}

#restartPauseButton {
    background-color: #FF9800;
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.4);
}

#mainMenuPauseButton {
    background-color: #2196F3;
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.4);
}

#resumeButton:hover {
    background-color: #45a049;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
}

#restartPauseButton:hover {
    background-color: #F57C00;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.6);
}

#mainMenuPauseButton:hover {
    background-color: #0b7dda;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.6);
}

/* Game Over Screen */
#gameOverScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: 
        /* Dark background with subtle pattern */
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%, transparent 75%, #0a0a0a 75%, #0a0a0a),
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%, transparent 75%, #0a0a0a 75%, #0a0a0a),
        #111;
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    color: white;
    z-index: 20;
    pointer-events: auto;
}

#gameOverScreen.hidden {
    display: none;
}

#gameOverContent {
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    min-width: 350px;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
    border: 2px solid #ff4444;
}

#gameOverContent h2 {
    font-size: 36px;
    margin-bottom: 25px;
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

#gameOverContent p {
    font-size: 22px;
    margin: 15px 0;
    color: #ffffff;
}

#restartButton, #mainMenuButton {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 15px 30px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 20px;
    margin: 15px 2px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
    width: 180px;
}

#mainMenuButton {
    background-color: #2196F3;
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.4);
}

#restartButton:hover {
    background-color: #45a049;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
}

#mainMenuButton:hover {
    background-color: #0b7dda;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.6);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #333;
}

::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* Leaderboard Screen */
#leaderboardScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: 
        /* Dark background with subtle pattern */
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%, transparent 75%, #0a0a0a 75%, #0a0a0a),
        linear-gradient(45deg, #0a0a0a 25%, transparent 25%, transparent 75%, #0a0a0a 75%, #0a0a0a),
        #111;
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    color: white;
    z-index: 30;
}

#leaderboardScreen.hidden {
    display: none;
}

#leaderboardScreen h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: #ff4444;
}

#leaderboardControls {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
}

#leaderboardControls label {
    font-size: 18px;
    color: #4CAF50;
}

#mapSelector {
    padding: 8px 12px;
    border-radius: 5px;
    border: 2px solid #4CAF50;
    background-color: #333;
    color: white;
    font-size: 16px;
}

#refreshLeaderboard {
    background-color: #2196F3;
    border: none;
    color: white;
    padding: 8px 15px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
}

#refreshLeaderboard:hover {
    background-color: #0b7dda;
    transform: scale(1.05);
}

#leaderboardScreen.hidden {
    display: none;
}

#leaderboardScreen h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: #ff4444;
}

#leaderboardContent {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 20px;
    max-width: 900px;
    width: 95%;
    max-height: 70vh;
    overflow-y: auto;
}

#leaderboardTable {
    width: 100%;
    border-collapse: collapse;
    color: white;
}

#leaderboardTable th {
    background-color: #4CAF50;
    padding: 12px;
    text-align: left;
    font-size: 18px;
}

#leaderboardTable td {
    padding: 10px;
    border-bottom: 1px solid #444;
    font-size: 16px;
}

#leaderboardTable th:nth-child(1),
#leaderboardTable td:nth-child(1) { width: 8%; }

#leaderboardTable th:nth-child(2),
#leaderboardTable td:nth-child(2) { width: 30%; }

#leaderboardTable th:nth-child(3),
#leaderboardTable td:nth-child(3) { width: 12%; }

#leaderboardTable th:nth-child(4),
#leaderboardTable td:nth-child(4) { width: 15%; }

#leaderboardTable th:nth-child(5),
#leaderboardTable td:nth-child(5) { width: 25%; }

#leaderboardTable tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

#leaderboardTable tr:hover {
    background-color: rgba(76, 175, 80, 0.3);
}

#backButtonLeaderboard {
    background-color: #2196F3;
    border: none;
    color: white;
    padding: 15px 40px;
    text-align: center;
    text-decoration: none;
    display: block;
    font-size: 20px;
    margin: 30px auto;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.4);
    width: 200px;
}

#backButtonLeaderboard:hover {
    background-color: #0b7dda;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.6);
}

/* Item Category Styles for How to Play section */
.item-category {
    margin: 20px 0;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 5px solid #4CAF50;
}

.item-category h4 {
    color: #FF9800;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
}

.item-category ul {
    margin-left: 15px;
}

.item-category li {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 18px;
}

.item-category li:last-child {
    border-bottom: none;
}

.item-category em {
    color: #2196F3;
    font-style: normal;
    font-weight: bold;
}
