body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #ffffff;
    overflow: auto;
    background: linear-gradient(135deg, #1e2a44 0%, #2a4066 100%);
}

.game-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(180deg, #e7fff0 0%, #b3e5cc 100%);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header {
    background: linear-gradient(90deg, #101f31 0%, #1e3a5f 100%);
    padding: 2px;
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    /* max-width: 1400px; */
    flex-wrap: wrap;
}

.logo-title-container {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between logo and title */
}

#logoGreen{
    height: 50px;
    margin-top: 4px;
    width: auto;
    transition: transform 0.3s ease; /* Subtle logo animation */
}
#logoGreen:hover {
    transform: scale(1.05);
}

.title {
    font-size: 2em;
    font-family: 'Bungee', cursive;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
    color: #e8fff1;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.title:hover {
    color: #b6ffd2;
}

.controls {
    display: flex;
    gap: 12px;
    align-items: center;
    font-family: 'Jockey One', sans-serif;
    flex-wrap: wrap;
    color: #e8fff1;
}

.toggle-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 12px;
    border-radius: 20px;
    backdrop-filter: blur(12px);
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.toggle-group:hover {
    background: rgba(255, 255, 255, 0.25);
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-switch.active {
    background: #61aaa4;
    box-shadow: 0 0 8px rgba(97, 170, 164, 0.5);
}

.toggle-switch.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(20px);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    margin: 1% 2%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
}

.game-content {
    display: flex;
    gap: 25px;
    flex: 1;
}

.left-panel {
    flex: 0 0 35%;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.timer-container {
    background: linear-gradient(45deg, #101f31 0%, #1e3a5f 100%);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 2px solid #61aaa4;
    font-family: 'Bungee', cursive;
    width: 60%;
    align-self: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, background 0.3s ease;
}

.timer-container:hover {
    /* transform: scale(1.02); */
    background: linear-gradient(45deg, #152941 0%, #213f66 100%);
}

.timer-container .timer {
    font-size: 2em;
    color: #ffffff;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.map-container {
    flex: 1;
    position: relative;
    min-height: 400px;
    background: linear-gradient(180deg, #e7fff0 0%, #b3e5cc 100%);
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#map {
    width: 100%;
    height: 70vh;
    border-radius: 20px;
    outline: 3px solid #101f31;
}

.flag-display {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(16, 31, 49, 0.95);
    padding: 12px 25px;
    border-radius: 10px;
    z-index: 2000;
    opacity: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.flag-display.show {
    opacity: 1;
    transition: opacity 0.5s ease-in-out, transform 0.3s ease;
    transform: translateX(-50%) scale(1.02);
}

.flag-image {
    width: 48px;
    height: 30px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.flag-name {
    font-size: 1.3em;
    font-family: 'Jockey One', sans-serif;
    color: #e8fff1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.map-buttons {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 5px;
    z-index: 10000;
}

.map-btn {
    width: 45px;
    height: 45px;
    background: #1e3a5f;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-right: none;
    color: #ffffff;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.map-btn:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.map-btn:hover:not(:disabled) {
    background: #61aaa4;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.map-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.controls-container {
    background: linear-gradient(45deg, #101f31 0%, #1e3a5f 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid #61aaa4;
}

.game-info {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

#score {
    font-size: 2.8em;
    font-weight: bold;
    color: #e8fff1;
    margin-bottom: 8px;
    font-family: 'Bungee', cursive;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.score {
    font-weight: bold;
    color: #e8fff1;
    margin-bottom: 8px;
    font-family: 'Bungee', cursive;
}

#totalCountries {
    font-size: 1.8em;
}

.status {
    font-size: 1.1em;
    font-family: 'Jockey One', sans-serif;
    color: #b6ffd2;
}

.quiz-inputs {
    margin-top: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.controls-container .quiz-inputs #countryInput.quiz-input {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid #61aaa4;
    border-radius: 10px !important;
    padding: 14px !important;
    color: #ffffff !important;
    font-size: 1.3em !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 2500 !important;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.controls-container .quiz-inputs #countryInput.quiz-input::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

.controls-container .quiz-inputs #countryInput.quiz-input:focus {
    outline: none !important;
    background: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 8px rgba(97, 170, 164, 0.5);
}

.controls-container .quiz-inputs #countryInput.quiz-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.autoComplete_wrapper > input:hover::placeholder {
    color: rgba(97, 170, 164, 0.7);
    transition: all 0.3s ease;
}

.autoComplete_wrapper > input:focus::placeholder {
    padding: 0rem 0rem;
    font-size: 1rem;
    color: rgba(97, 170, 164, 0.5);
}

.game-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
}

.game-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    font-family: 'Jockey One', sans-serif;
}

.start-btn {
    background: #61aaa4;
    color: #f4fffd;
    width: 100%;
    font-size: 1.7rem !important;
}

.start-btn:hover {
    background: #70c1b8;
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.submit-btn {
    background: #cf4646;
    color: #ffffff;
    width: 100%;
    font-size: 1.7rem !important;
}

.submit-btn:hover {
    background: #e64949;
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.stats-btn {
    background: #17737d;
    color: #ddffee;
    margin-bottom: 12px;
}

.stats-btn:hover {
    background: #19838f;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#configBtn {
    background: #17737d;
    color: #ddffee;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    font-family: 'Jockey One', sans-serif;
    text-align: center;
    margin-bottom: 12px;
}

#configBtn:hover {
    background: #19838f;
    transform: scale(1.02);
}

#statsconfigBtn {
    background: #17737d;
    color: #ddffee;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1.5em;
    margin: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    font-family: 'Jockey One', sans-serif;
    text-align: center;
}

#statsconfigBtn:hover {
    background: #19838f;
    transform: scale(1.02);
}

#countryInput {
    font-size: 1.4em !important;
    color: #ffffff;
    font-family: 'Jockey One', sans-serif;
}

#countryFeedback {
    font-family: 'Jockey One', sans-serif;
    color: #b6ffd2;
}

.autocomplete-list {
    position: absolute;
    background: rgba(16, 31, 49, 0.95);
    border-radius: 10px;
    max-height: 220px;
    overflow-y: auto;
    margin: 6px 0 0 0;
    padding: 0;
    width: 100%;
    z-index: 3000;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    font-family: 'Jockey One', sans-serif;
    display: none;
}

.autocomplete-list.active {
    display: block;
}

.autocomplete-item {
    padding: 10px 12px;
    margin: 0;
    cursor: pointer;
    font-size: 0.9em;
    color: #e8fff1;
    transition: background 0.2s ease;
    list-style: none;
    text-align: left;
}

.autocomplete-item:hover {
    background: rgba(97, 170, 164, 0.3);
}

.no-results {
    padding: 10px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.regions-table-container {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(45deg, #101f31 0%, #1e3a5f 100%);
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid #61aaa4;
}

.regions-columns {
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
}

.region-column {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
}

.column-header {
    background: rgba(255, 255, 255, 0.15);
    padding: 14px 16px;
    text-align: center;
    font-family: 'Bungee', cursive;
    min-height: 33px;
    font-size: 1.1em;
    color: #e8fff1;
    border: 1px solid rgba(255, 255, 255, 0.8);
    max-width: 100%;
    white-space: normal;
    box-sizing: border-box;
    border-radius: 8px 8px 0 0;
}

.column-item {
    padding: 10px 6px;
    min-height: 22px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: #ffffff;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    line-height: 1.3;
    font-family: 'Jockey One', sans-serif;
    transition: all 0.3s ease;
}

.regions-table-container .regions-columns .column-item.temp-green {
    color: #4bff51 !important;
    background: rgba(0, 255, 8, 0.3);
    font-size: 1.15em !important;
    transition: all 0.5s ease !important;
}

.regions-table-container .regions-columns .column-item.guessed {
    color: #ffffff;
    font-size: 1em;
    font-weight: normal;
}

.regions-table-container .regions-columns .column-item.guessed.game-over {
    color: #4bff51 !important;
    background: rgba(0, 255, 8, 0.3);
    font-size: 1em !important;
}

.regions-table-container .regions-columns .column-item.unguessed {
    color: #FF4C4C !important;
    background: rgba(255, 76, 76, 0.3);
    font-size: 1em !important;
}

.regions-table-container .regions-columns .column-item.best-guessed,
.stats-section .regions-columns .column-item.best-guessed {
    color: #4bff51 !important;
    background: rgba(0, 255, 8, 0.3);
    font-size: 1em !important;
}

.regions-table-container .regions-columns .column-item.guessed-not-best,
.stats-section .regions-columns .column-item.guessed-not-best {
    color: #FFCA28 !important;
    background: rgba(255, 202, 40, 0.3);
    font-size: 1em !important;
}

.regions-table-container .regions-columns .column-item.never-guessed,
.stats-section .regions-columns .column-item.never-guessed {
    color: #FF4C4C !important;
    background: rgba(255, 76, 76, 0.3);
    font-size: 1em !important;
}

.flag-image1 {
    width: 32px !important;
    height: 22px !important;
    object-fit: cover;
    border-radius: 3px;
    margin-left: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .stats-section .flag-image1 {
        width: 26px !important;
        height: 18px !important;
        margin-left: 0px;
    }

    .stats-section .column-item {
        font-size: 0.75em !important;
        min-height: 22px;
        padding: 4px 3px;
    }
}

@media (max-width: 480px) {
    .flag-image1 {
        width: 22px !important;
        height: 16px !important;
        margin-left: 0px;
    }

    .column-item {
        font-size: 0.7em !important;
        min-height: 20px;
        padding: 3px 2px;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 5000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    background: linear-gradient(45deg, #101f31 0%, #1e3a5f 100%);
    margin: 5% auto;
    padding: 25px;
    border-radius: 15px;
    width: 77%;
    /* max-width: 70%; */
    color: #ffffff;
    border: 2px solid #61aaa4;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 85vh;
    -ms-overflow-style: none;
    scrollbar-width: none;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.3s ease-in-out;
}

.modal-content h2 {
    font-family: 'Bungee', cursive;
    margin: 12px 0 20px 0;
    text-align: center;
    font-size: 2.8rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    right: 25px;
    top: 15px;
    color: #ffffff;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #b6ffd2;
}

.stats-key-container {
    margin-bottom: 5px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.stats-key-container h3 {
    font-family: 'Bungee', cursive;
    font-size: 1.3em;
    padding-right: 12px;
}

.key-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 6px;
    font-family: 'Jockey One', sans-serif;
    font-size: 0.95em;
}

.key-color {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stats-section {
    font-family: 'Jockey One', sans-serif;
    text-align: center;
}

.stats-section h3 {
    font-family: 'Bungee', cursive;
    margin-bottom: 12px;
}

.stats-section p {
    margin: 6px 0;
    font-family: 'Bungee', cursive;
    font-size: 1.6em;
}

.stats-toggle-container {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
    margin-bottom: 25px;
}

.stats-toggle-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 10px;
    border-radius: 15px;
    backdrop-filter: blur(12px);
    font-size: 0.9em;
    flex: 1;
    max-width: 100px;
    font-family: 'Jockey One', sans-serif;
}

.stats-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.stats-toggle-label input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stats-toggle-label input[type="checkbox"]:checked {
    background: #61aaa4;
    box-shadow: 0 0 8px rgba(97, 170, 164, 0.5);
}

.stats-toggle-label input[type="checkbox"]:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #101f31;
    font-size: 14px;
    font-weight: bold;
}

.stats-toggle-checkmark {
    display: none;
}

.config-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin-bottom: 25px;
}

.config-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 10px;
    border-radius: 15px;
    backdrop-filter: blur(12px);
    font-size: 0.9em;
    font-family: 'Jockey One', sans-serif;
}

.config-toggle-label input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.config-toggle-label input[type="checkbox"]:checked {
    background: #61aaa4;
    box-shadow: 0 0 8px rgba(97, 170, 164, 0.5);
}

.config-toggle-label input[type="checkbox"]:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #101f31;
    font-size: 14px;
}

.config-toggle-label input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.config-toggle-checkmark {
    display: none;
}

.stats-group {
    background: #17737d;
    color: #ddffee;
    width: 130px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 1.3em;
    margin: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    font-family: 'Jockey One', sans-serif;
    text-align: center;
}

.stats-group:hover {
    background: #19838f;
    transform: scale(1.02);
}

#statsModal .stats-buttons {
    align-items: center;
    justify-content: center;
    display: flex !important;
    gap: 12px;
    flex-wrap: wrap;
    margin: 12px 0 25px 0;
    padding: 0;
    position: relative;
}

#statsconfigBtn {
    position: relative;
    margin: 0;
    flex-shrink: 0;
}

#statsconfigBtn::before {
    content: '';
    position: absolute;
    left: -65px;
    top: 50%;
    transform: translateY(-50%);
    width: 65px;
    height: 1px;
    background: transparent;
    flex-shrink: 0;
}

#statsconfigBtn::after {
    content: '';
    position: absolute;
    right: -65px;
    top: 50%;
    transform: translateY(-50%);
    width: 65px;
    height: 1px;
    background: transparent;
    flex-shrink: 0;
}

#statsModal .stats-group,
#statsModal #shareBtn,
#statsModal #statsconfigBtn {
    margin: 0;
    flex: 0 0 auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 1024px) {
    .game-content {
        flex-direction: column;
    }

    .left-panel {
        flex: none;
    }

    .right-panel {
        flex: none;
        /* min-height: 400px; */
    }

    .map-container {
        height: 400px;
    }

    .modal-content {
        width: 90%;
        margin: 10% auto;
    }
}

@media (max-width: 768px) {
    .title {
    font-size: 1.5em;
    }
    #logoGreen{
        height: 40px;
        margin-top: 2px;
    }
    .header-content {
        flex-direction: column;
        align-items: center;
    }

    .controls {
        flex-wrap: nowrap;
        justify-content: center;
    }

    .toggle-group {
        font-size: 0.8em;
        padding: 6px 8px;
        max-width: 80px;
    }

    .toggle-switch {
        width: 34px;
        height: 17px;
    }

    .toggle-slider {
        width: 12px;
        height: 12px;
    }

    .toggle-switch.active .toggle-slider {
        transform: translateX(17px);
    }

    .game-area {
        margin: 3%;
        padding: 15px;
    }

    .game-content {
        flex-direction: column;
        gap: 20px;
    }

    .left-panel {
        flex: none;
    }

    .map-container {
        height: 350px;
        min-height: 350px;
    }

    .controls-container {
        padding: 15px;
    }

    .score {
        font-size: 1.5em;
    }

    .timer-container .timer {
        font-size: 1.7em;
    }

    .controls-container .quiz-inputs #countryInput.quiz-input {
        font-size: 1em !important;
        padding: 12px !important;
    }

    .quiz-feedback {
        font-size: 0.8em;
        display: none;
    }

    .autocomplete-list {
        max-height: 160px;
    }

    .autocomplete-item {
        padding: 8px;
        font-size: 0.85em;
    }

    .regions-columns {
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    .region-column {
        flex: 1 1 auto;
        min-width: 0;
    }

    .column-header {
        font-size: 0.95em;
        padding: 12px;
    }

    .column-item {
        padding: 8px 12px;
        min-height: 20px;
        font-size: 0.85em;
        flex-direction: column;
        gap: 2px;
    }

    .flag-image {
        width: 36px;
        height: 24px;

    }

    .flag-name {
        font-size: 1.1em;
    }

    .game-btn {
        padding: 10px 20px;
        font-size: 1.2em;
    }

    #configBtn {
        padding: 10px 20px;
        font-size: 1.2em;
    }

    #statsconfigBtn {
        padding: 10px 10px;
        font-size: 1.2em;
    }

    .modal-content {
        width: 90%;
        margin: 10% auto;
    }

    .config-container{
        gap: 4px;
    }

    .config-group{
        padding: 5px 6px;
    }

    .stats-toggle-container {
        flex-wrap: nowrap;
        justify-content: center;
    }

    .stats-toggle-group {
        font-size: 0.8em;
        padding: 6px 8px;
        max-width: 80px;
    }

    .stats-toggle-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }

    .stats-toggle-label input[type="checkbox"]:checked::after {
        font-size: 12px;
    }

    .stats-key-container {
        font-size: 0.9em;
    }

    .key-item {
        font-size: 0.85em;
    }

    .key-color {
        width: 18px;
        height: 18px;
    }

    .stats-section .regions-columns {
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    .stats-section .region-column {
        flex: 1 1 auto;
        min-width: 0;
    }

    .modal-content h2 {
        font-size: 2.2rem;
    }

    .close {
        right: 12px;
        top: 8px;
    }

    #statsconfigBtn::before,
    #statsconfigBtn::after {
        width: 45px;
        left: -45px;
        right: -45px;
    }

    #statsModal .stats-buttons {
        gap: 10px;
        margin-bottom: 20px;
    }

    .stats-group {
        padding: 6px 12px;
        width: 90px;
        font-size: 0.9em;
    }

    #map {
        height: 35vh;
    }
}

@media (max-width: 480px) {
    .game-area {
        margin: 2%;
        padding: 10px;
    }

    .map-container {
        height: 300px;
        min-height: 300px;
    }

    .toggle-group {
        font-size: 0.7em;
        padding: 5px 6px;
    }

    .toggle-switch {
        width: 30px;
        height: 15px;
    }

    .toggle-slider {
        width: 11px;
        height: 11px;
    }

    .toggle-switch.active .toggle-slider {
        transform: translateX(15px);
    }

    .timer-container .timer {
        font-size: 1.5em;
    }

    .controls-container .quiz-inputs #countryInput.quiz-input {
        font-size: 0.9em !important;
        padding: 10px !important;
    }

    .quiz-feedback {
        font-size: 0.75em;
    }

    .autocomplete-list {
        max-height: 140px;
        font-size: 0.8em;
    }

    .autocomplete-item {
        padding: 6px;
        font-size: 0.8em;
    }

    .region-column {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
    }

    .column-header {
        font-size: 0.5em;
        padding: 5px 3px;
    }

    .column-item {
        padding: 6px 12px;
        min-height: 18px;
        font-size: 0.8em;
        word-wrap: normal;
    }

    .flag-image {
        width: 32px;
        height: 20px;
    }

    .flag-name {
        font-size: 1em;
    }

    .game-btn {
        padding: 8px 16px;
        font-size: 1.2em;
    }

    #configBtn {
        padding: 8px 16px;
        font-size: 1.2em;
    }

    .modal-content {
        width: 90%;
        margin: 15% auto;
        padding: 10px;
    }

    .stats-toggle-group {
        font-size: 0.9em;
        padding: 5px 6px;
    }

    .stats-toggle-label {
        font-size: 0.85em;
    }

    .stats-toggle-label input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }

    .stats-toggle-label input[type="checkbox"]:checked::after {
        font-size: 10px;
    }

    .stats-key-container {
        font-size: 0.85em;
    }

    .key-item {
        font-size: 0.7em;
    }

    .key-color {
        width: 16px;
        height: 16px;
    }

    .regions-table-container .regions-columns .column-item.guessed.game-over {
        color: #4bff51 !important;
        background: rgba(0, 255, 8, 0.3);
        font-size: 0.7em !important;
        padding: 2px 2px;
        min-height: 12px;
        font-weight: normal !important;
    }

    .regions-table-container .regions-columns .column-item.unguessed {
        color: #FF4C4C !important;
        font-size: 0.7em !important;
        padding: 2px 2px;
        min-height: 12px;
    }

    .regions-table-container .regions-columns .column-item.best-guessed,
    .stats-section .regions-columns .column-item.best-guessed {
        color: #4bff51 !important;
        background: rgba(0, 255, 8, 0.3);
        font-size: 0.7em !important;
        padding: 2px 2px;
        min-height: 12px;
        font-weight: normal !important;
    }

    .regions-table-container .regions-columns .column-item.guessed-not-best,
    .stats-section .regions-columns .column-item.guessed-not-best {
        color: #FFCA28 !important;
        font-size: 0.7em !important;
        padding: 2px 2px;
        min-height: 12px;
    }

    .regions-table-container .regions-columns .column-item.never-guessed,
    .stats-section .regions-columns .column-item.never-guessed {
        color: #FF4C4C !important;
        font-size: 0.7em !important;
        padding: 2px 2px;
        min-height: 12px;
    }
}

.regions-table-container .regions-columns .column-item {
    text-align: center;
}

#autoComplete_list_1 {
    display: none;
}

.autoComplete_wrapper > input:hover::placeholder {
    color: rgba(97, 170, 164, 0.7);
    transition: all 0.3s ease;
    font-family: 'Jockey One', sans-serif;
}

.autoComplete_wrapper > input:focus::placeholder {
    padding: 0rem 0rem;
    font-size: 1.1em !important;
    color: rgba(97, 170, 164, 0.5);
    font-family: 'Jockey One', sans-serif;
}