body {
    margin: 0;
    overflow: hidden;
    background-color: #333;
    font-family: Arial, sans-serif;
    color: white;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#game-canvas {
    display: block;
    background-color: #5a8743;
}

#ui-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

#user-info {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 20px;
    pointer-events: all;
}

#user-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
}

#user-info span {
    font-size: 1em;
    font-weight: bold;
}

#respawn-message {
    font-size: 3em;
    color: white;
    background: rgba(200, 0, 0, 0.7);
    padding: 20px;
    border-radius: 15px;
    text-shadow: 2px 2px 4px #000000;
}

#player-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
}

#level {
    font-size: 1.5em;
    margin-bottom: 5px;
}

#xp-bar-container {
    width: 300px;
    height: 20px;
    background-color: #555;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #ddd;
}

#xp-bar {
    width: 0%;
    height: 100%;
    background-color: #4CAF50;
    transition: width 0.2s;
}

#leaderboard {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 10px;
    width: 200px;
}

#leaderboard h3 {
    margin-top: 0;
    text-align: center;
}

#leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#leaderboard-list li {
    padding: 5px;
    border-bottom: 1px solid #444;
}

#leaderboard-list li:last-child {
    border-bottom: none;
}

#leaderboard-list li.is-player {
    font-weight: bold;
    color: #ffeb3b;
}

#start-screen {
    background-image: url('start_screen_bg.png');
    background-size: cover;
    background-position: center;
    animation: zoom-pan 40s ease-in-out infinite alternate;
}

@keyframes zoom-pan {
    0% {
        background-size: 100% auto;
        background-position: 50% 50%;
    }
    100% {
        background-size: 120% auto;
        background-position: 40% 60%;
    }
}

#start-screen, #game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    background-blend-mode: multiply;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    pointer-events: all;
}

#start-screen h1 {
    font-size: 5em;
    color: #fff;
    text-shadow: 3px 3px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    margin-bottom: 0.5em;
}

#start-screen p {
    font-size: 1.2em;
    margin: 5px 0;
    max-width: 400px;
}

#mode-selection h2 {
    font-size: 2.5em;
    margin-bottom: 1em;
}

#start-screen-buttons, #game-over-buttons, #mode-buttons {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

#game-over-screen h1 {
    font-size: 4em;
    margin-bottom: 20px;
}

#game-over-screen p {
    font-size: 1.5em;
    margin: 5px 0;
}

#start-screen button, #game-over-screen button, #heroes-screen button {
    padding: 15px 30px;
    font-size: 1.5em;
    cursor: pointer;
    border: 3px solid #fff;
    border-radius: 10px;
    background-color: #4CAF50;
    color: white;
    transition: all 0.3s;
    margin-top: 20px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

#mode-back-button {
    background-color: #f44336 !important;
}

#mode-back-button:hover {
    background-color: #d32f2f !important;
}

#start-screen button:hover, #game-over-screen button:hover, #heroes-screen button:hover {
    background-color: #45a049;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    animation: button-pop 0.2s ease-out;
}

@keyframes button-pop {
    0% { transform: translateY(-3px) scale(1); }
    50% { transform: translateY(-3px) scale(1.05); }
    100% { transform: translateY(-3px) scale(1); }
}

#heroes-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    pointer-events: all;
    overflow-y: auto;
    padding-top: 20px;
    padding-bottom: 20px;
}

#heroes-screen h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

#heroes-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 90%;
}

.hero-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-card.locked {
    filter: brightness(0.4) grayscale(1);
}

.hero-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.hero-card-images {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-card-images img:first-child {
    width: 80px;
    height: 80px;
}

.hero-card-images img:last-child {
    width: 100px;
    height: auto;
    margin-left: -20px;
}

#heroes-screen button {
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 1.2em;
    padding: 10px 20px;
}