@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap');

body {
    font-family: 'Quicksand', sans-serif;
}

button, .choice, .choice-flag, #submit-movie-answer, #restart-button, #restart-button-flags, #restart-button-movies, #back-button-game, #back-button-flags, #back-button-movies {
    font-family: 'Quicksand', sans-serif;
}

body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
}

#main-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

#logo {
    width: 100%;
    max-width: 400px;
}

#button-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

button {
    padding: 15px 30px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background-color: #4CAF50;
    color: white;
    transition: background-color 0.3s, transform 0.3s;
}

button:hover {
    background-color: #388E3C;
    transform: scale(1.05);
}

button:active {
    background-color: #2E7D32;
}

#game-container, #flags-container, #movies-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    display: none;
}

#timer-bar, #timer-bar-flags, #timer-bar-movies {
    width: 100%;
    height: 20px;
    background-color: #2196F3;
    position: fixed;
    top: 0;
    left: 0;
    transition: width 1s linear;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#level, #level-flags, #level-movies {
    font-size: 24px;
    font-weight: bold;
    margin-top: 30px;
    color: #2196F3;
}

#emoji-container, #emoji-container-movies {
    margin: 20px 0;
    font-size: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#flag-container {
    margin: 20px 0;
}

#flag-image {
    width: 80%;
    max-width: 400px;
    border: 2px solid #4CAF50;
    border-radius: 5px;
}

#choices, #choices-flags {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.choice, .choice-flag {
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: white;
    transition: background-color 0.3s, transform 0.3s;
}

.choice:hover, .choice-flag:hover {
    background-color: #388E3C;
    transform: scale(1.05);
}

.choice:active, .choice-flag:active {
    background-color: #2E7D32;
}

#movie-answer-input {
    padding: 10px;
    font-size: 18px;
    width: 80%;
    max-width: 400px;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    margin-top: 20px;
}

#submit-movie-answer {
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: white;
    transition: background-color 0.3s, transform 0.3s;
    margin-top: 10px;
}

#submit-movie-answer:hover {
    background-color: #388E3C;
    transform: scale(1.05);
}

#submit-movie-answer:active {
    background-color: #2E7D32;
}

#game-over, #game-over-flags, #game-over-movies {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#game-over p, #game-over-flags p, #game-over-movies p {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #f44336;
}

#restart-button, #restart-button-flags, #restart-button-movies {
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: white;
    transition: background-color 0.3s, transform 0.3s;
}

#restart-button:hover, #restart-button-flags:hover, #restart-button-movies:hover {
    background-color: #388E3C;
    transform: scale(1.05);
}

#restart-button:active, #restart-button-flags:active, #restart-button-movies:active {
    background-color: #2E7D32;
}

#back-button-game, #back-button-flags, #back-button-movies {
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: white;
    transition: background-color 0.3s, transform 0.3s;
    margin-top: 10px;
}

#back-button-game:hover, #back-button-flags:hover, #back-button-movies:hover {
    background-color: #388E3C;
    transform: scale(1.05);
}

#back-button-game:active, #back-button-flags:active, #back-button-movies:active {
    background-color: #2E7D32;
}

#rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

.rain-emoji {
    position: absolute;
    top: -50px;
    font-size: 24px;
    animation: rain 5s linear infinite;
}

@keyframes rain {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

.floating-emoji {
    position: absolute;
    font-size: 24px;
    animation: float 10s infinite;
    opacity: 0.8;
    z-index: 1;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-20px) translateX(20px);
    }
    100% {
        transform: translateY(0) translateX(0);
    }
}

@media (min-width: 600px) {
    #logo {
        max-width: 600px;
    }

    #main-menu {
        flex-direction: column;
    }

    #button-container {
        display: flex;
        flex-direction: row;
        gap: 20px;
        margin-top: 20px;
    }

    #level, #level-flags, #level-movies {
        font-size: 24px;
    }

    #emoji-container, #emoji-container-movies {
        font-size: 120px;
    }

    #choices, #choices-flags {
        flex-direction: row;
    }

    .choice, .choice-flag {
        font-size: 18px;
    }

    #game-over p, #game-over-flags p, #game-over-movies p {
        font-size: 24px;
    }

    #restart-button, #restart-button-flags, #restart-button-movies {
        font-size: 18px;
    }

    #back-button-game, #back-button-flags, #back-button-movies {
        font-size: 18px;
    }
}

.snowflake, .snowball {
    position: fixed;
    top: -10px;
    z-index: 1;
    user-select: none;
    pointer-events: none;
    color: white;
    font-size: 1em;
    will-change: transform;
    animation: fall linear infinite;
  }
  
  .snowball {
    background-color: white;
    border-radius: 50%;
    width: 10px;
    height: 10px;
  }
  
  @keyframes fall {
    to {
      transform: translateY(100vh);
    }
  }
  
  #toggle-snow-button {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 10000;
    width: 50px;
    height: 50px;
    background-color: #ffffff;
    color: #000000;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }
  
  .logo, .flag, .emoji, .button {
    z-index: 10000;
    position: relative;
  }

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#leaderboard-list {
    list-style-type: none;
    padding: 0;
}

#leaderboard-list li {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    font-size: 18px;
    font-weight: 600;
}

#leaderboard-list li:first-child {
    color: gold;
}

#leaderboard-list li:nth-child(2) {
    color: silver;
}

#leaderboard-list li:nth-child(3) {
    color: #cd7f32; /* Bronze color */
}

#name-input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

#name-input-container p {
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

#username-input {
    padding: 10px;
    font-size: 16px;
    border: 2px solid #97BE5A;
    border-radius: 25px 0 0 25px;
    outline: none;
    width: 70%;
    max-width: 300px;
}

#username-input:focus {
    border-color: #86a84e;
}

#submit-name {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: #97BE5A;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#submit-name:hover {
    background-color: #86a84e;
    transform: scale(1.05);
}
