body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
    transition: background-color 0.3s ease;
}

body.dark-mode {
    background-color: #333;
    color: #fff;
}

#game-container {
    text-align: center;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dark-mode #game-container {
    background-color: #222;
    color: #fff;
}

#badgen-area {
    width: 200px;
    height: 200px;
    margin: 20px auto;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

#badgen-image {
    width: 200px;
    height: 200px;
    transition: transform 0.1s;
}

.click-animation {
    transform: scale(0.95);
}

button {
    margin: 5px;
    padding: 5px 10px;
    cursor: pointer;
}

#achievements, #leaderboard {
    margin-top: 20px;
    text-align: left;
}

#achievement-list, #leaderboard-list {
    padding-left: 20px;
}

/* Remove or comment out these lines for #theme-toggle */
/*
#theme-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
}
*/

#user-account { /* Make sure this rule doesn't affect the theme toggle */
    margin-bottom: 10px;
}

#username-input {
    padding: 5px;
    margin-right: 5px;
}

#save-load {
    margin-top: 20px;
}

@keyframes achievementUnlock {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.achievement-unlock {
    animation: achievementUnlock 0.5s ease-out;
}

#achievement-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 15px;
    border-radius: 5px;
    display: none;
}

.show-popup {
    display: block !important;
    animation: achievementUnlock 0.5s ease-out;
}

#toggle-music {
    margin-top: 10px;
}

#experience-bar-container {
    width: 100%;
    height: 20px;
    background-color: #ddd;
    border-radius: 10px;
    margin: 10px 0;
}

#experience-bar {
    height: 100%;
    background-color: #4CAF50;
    border-radius: 10px;
    width: 0%;
    transition: width 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#settings-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.dark-mode #settings-menu {
    background-color: #333;
    color: white;
}

#settings-menu h2 {
    margin-top: 0;
}

#settings-menu div {
    margin: 10px 0;
}

.hidden {
    display: none;
}

#open-settings {
    position: absolute;
    top: 10px;
    right: 10px;
}
