* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a1628 0%, #1a2642 100%);
    color: #ffffff;
    padding: 20px;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Snowflake Container */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Individual Snowflake */
.snowflake {
    position: absolute;
    top: -10px;
    background: white;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.7;
    animation: fall linear infinite;
}

/* Falling Animation */
@keyframes fall {
    0% {
        transform: translateY(0) translateX(0);
    }
    100% {
        transform: translateY(100vh) translateX(var(--drift));
    }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(26, 38, 66, 0.9);
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(255, 20, 147, 0.3);
    padding: 40px;
    border: 2px solid rgba(255, 20, 147, 0.3);
    position: relative;
    z-index: 10;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #ff1493;
}

h1 {
    color: #ff1493;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 20, 147, 0.6);
}

.subtitle {
    color: #ccff00;
    font-size: 1.2em;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(204, 255, 0, 0.4);
}

.round-progress {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
}

.round-indicator {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.round-indicator.active {
    background: #ff1493;
    border-color: #ff1493;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.6);
    transform: scale(1.2);
}

.round-indicator.completed {
    background: #ccff00;
    border-color: #ccff00;
    color: #0a1628;
}

.round {
    display: none;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 2px solid rgba(204, 255, 0, 0.3);
}

.round.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.round-title {
    color: #ff1493;
    font-size: 1.8em;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(204, 255, 0, 0.3);
    text-shadow: 0 0 15px rgba(255, 20, 147, 0.4);
}

.round-intro-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.round-intro {
    flex: 1;
    color: #ccff00;
    font-size: 1.05em;
    line-height: 1.6;
    padding: 20px 25px;
    background: linear-gradient(135deg, rgba(204, 255, 0, 0.15) 0%, rgba(255, 20, 147, 0.15) 100%);
    border: 3px solid #ccff00;
    border-radius: 20px;
    position: relative;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid #ccff00;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 17px solid rgba(204, 255, 0, 0.15);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    z-index: 1;
}

.round-host-image {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border: 3px solid #ff1493;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.5);
    flex-shrink: 0;
}

.question {
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(10, 22, 40, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 20, 147, 0.2);
    transition: all 0.3s ease;
}

.question:hover {
    border-color: rgba(255, 20, 147, 0.5);
    box-shadow: 0 4px 20px rgba(255, 20, 147, 0.2);
}

.question-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.question-number {
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(255, 20, 147, 0.5);
}

.question-text {
    flex: 1;
    font-size: 1.05em;
    line-height: 1.6;
    color: #ffffff;
}

.flag-image {
    width: 300px;
    height: 200px;
    object-fit: contain;
    border: 2px solid #ccff00;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px;
    box-shadow: 0 0 15px rgba(204, 255, 0, 0.3);
}

.answer-section {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Custom Dropdown Styles */
.custom-dropdown {
    flex: 1;
    position: relative;
    user-select: none;
}

.custom-dropdown.disabled {
    pointer-events: none;
    opacity: 0.7;
}

.dropdown-selected {
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.2) 0%, rgba(204, 255, 0, 0.2) 100%);
    border: 2px solid rgba(255, 20, 147, 0.5);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-selected::after {
    content: "▼";
    font-size: 0.8em;
    color: #ccff00;
    transition: transform 0.3s ease;
}

.custom-dropdown.active .dropdown-selected::after {
    transform: rotate(180deg);
}

.dropdown-selected.selected {
    color: #ffffff;
    border-color: #ccff00;
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.3) 0%, rgba(204, 255, 0, 0.3) 100%);
}

.dropdown-selected:hover {
    border-color: #ff1493;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.4);
}

.dropdown-options {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 300px;
    max-width: 90vw;
    background: rgba(10, 22, 40, 0.98);
    border: 3px solid #ff1493;
    border-radius: 12px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    box-shadow: 0 8px 50px rgba(255, 20, 147, 0.8), 0 0 100px rgba(204, 255, 0, 0.4);
}

.dropdown-options.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Dropdown backdrop overlay */
.dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 22, 40, 0.8);
    z-index: 9999;
    display: none;
}

.dropdown-backdrop.active {
    display: block;
}

.dropdown-option {
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 20, 147, 0.2);
    font-size: 1.1em;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background: linear-gradient(90deg, rgba(255, 20, 147, 0.3) 0%, rgba(204, 255, 0, 0.3) 100%);
    color: #ccff00;
    padding-left: 20px;
}

.dropdown-option.used {
    color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    cursor: default;
    text-decoration: line-through;
}

.dropdown-option.used:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    padding-left: 15px;
}

.dropdown-options::-webkit-scrollbar {
    width: 8px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: #ff1493;
    border-radius: 10px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #ccff00;
}

.feedback {
    min-width: 110px;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    text-align: center;
    font-size: 0.95em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feedback.show {
    opacity: 1;
}

.feedback.correct {
    background: rgba(204, 255, 0, 0.3);
    color: #ccff00;
    border: 2px solid #ccff00;
    box-shadow: 0 0 15px rgba(204, 255, 0, 0.4);
}

.feedback.incorrect {
    background: rgba(255, 20, 147, 0.3);
    color: #ff1493;
    border: 2px solid #ff1493;
    box-shadow: 0 0 15px rgba(255, 20, 147, 0.4);
}

.correct-answer {
    display: block;
    margin-top: 8px;
    font-size: 0.9em;
    color: #ccff00;
    font-weight: normal;
}

.submit-round-section {
    text-align: center;
    margin: 40px 0 20px 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.submit-round-btn {
    padding: 18px 50px;
    font-size: 1.2em;
    background: linear-gradient(135deg, #ccff00 0%, #e6ff33 100%);
    color: #0a1628;
    border: 3px solid #ff1493;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 0 25px rgba(204, 255, 0, 0.5);
}

.submit-round-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 35px rgba(255, 20, 147, 0.7);
}

.submit-round-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

.next-round-btn {
    padding: 18px 50px;
    font-size: 1.2em;
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
    color: white;
    border: 3px solid #ccff00;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.6);
}

.next-round-btn:hover {
    background: linear-gradient(135deg, #ccff00 0%, #e6ff33 100%);
    color: #0a1628;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 35px rgba(204, 255, 0, 0.7);
}

.submit-quiz-section {
    text-align: center;
    margin: 40px 0;
    padding: 30px;
    display: none;
}

#submitQuiz {
    padding: 20px 60px;
    font-size: 1.3em;
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
    color: white;
    border: 3px solid #ccff00;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.6);
}

#submitQuiz:hover:not(:disabled) {
    background: linear-gradient(135deg, #ccff00 0%, #e6ff33 100%);
    color: #0a1628;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 35px rgba(204, 255, 0, 0.7);
}

#submitQuiz:disabled {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

.score-section {
    text-align: center;
    margin-top: 40px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.3) 0%, rgba(204, 255, 0, 0.3) 100%);
    border-radius: 20px;
    color: white;
    border: 2px solid #ff1493;
    box-shadow: 0 0 40px rgba(255, 20, 147, 0.5);
}

.score-display {
    font-size: 3.5em;
    font-weight: bold;
    margin: 20px 0;
    background: linear-gradient(135deg, #ff1493 0%, #ccff00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 20, 147, 0.6);
}

.score-text {
    font-size: 1.4em;
    margin-bottom: 25px;
    color: #ffffff;
}

.name-input-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid rgba(204, 255, 0, 0.3);
}

.name-input-section h3 {
    margin-bottom: 20px;
    font-size: 1.4em;
    color: #ccff00;
}

#playerName {
    padding: 15px 25px;
    font-size: 1.1em;
    background: rgba(10, 22, 40, 0.8);
    border: 2px solid #ff1493;
    border-radius: 12px;
    width: 300px;
    max-width: 100%;
    margin-right: 10px;
    color: #ffffff;
}

#playerName:focus {
    outline: none;
    border-color: #ccff00;
    box-shadow: 0 0 20px rgba(204, 255, 0, 0.4);
}

#submitScore {
    padding: 15px 35px;
    font-size: 1.1em;
    background: linear-gradient(135deg, #ccff00 0%, #e6ff33 100%);
    color: #0a1628;
    border: 2px solid #ff1493;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(204, 255, 0, 0.5);
}

#submitScore:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(255, 20, 147, 0.6);
}

#submitScore:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    transform: none;
    opacity: 0.5;
}

.high-scores {
    margin-top: 40px;
    padding: 30px;
    background: rgba(10, 22, 40, 0.6);
    border-radius: 15px;
    border: 2px solid rgba(255, 20, 147, 0.3);
}

.high-scores h2 {
    color: #ff1493;
    margin-bottom: 25px;
    text-align: center;
    font-size: 2em;
    text-shadow: 0 0 20px rgba(255, 20, 147, 0.5);
}

.high-scores table {
    width: 100%;
    border-collapse: collapse;
}

.high-scores th {
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #ccff00;
}

.high-scores td {
    padding: 15px;
    border-bottom: 1px solid rgba(204, 255, 0, 0.2);
    color: #ffffff;
}

.high-scores tr:hover {
    background: rgba(255, 20, 147, 0.1);
}

.high-scores tr.highlighted-score {
    background: linear-gradient(90deg, rgba(204, 255, 0, 0.3) 0%, rgba(204, 255, 0, 0.15) 100%);
    border-left: 4px solid #ccff00;
    animation: highlightPulse 2s ease-in-out 3;
}

@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 0 0 rgba(204, 255, 0, 0);
    }
    50% {
        box-shadow: 0 0 20px rgba(204, 255, 0, 0.6);
    }
}

.high-scores .rank {
    width: 60px;
    text-align: center;
    font-weight: bold;
    color: #ccff00;
    font-size: 1.2em;
}

.message {
    padding: 15px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
    font-weight: 500;
}

.success {
    background: rgba(204, 255, 0, 0.2);
    color: #ccff00;
    border: 2px solid #ccff00;
    box-shadow: 0 0 20px rgba(204, 255, 0, 0.3);
}

.error {
    background: rgba(255, 20, 147, 0.2);
    color: #ff1493;
    border: 2px solid #ff1493;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.3);
}

.hidden {
    display: none;
}

/* Round Score Popup */
.score-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 22, 40, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.score-popup-overlay.show {
    opacity: 1;
}

.score-popup {
    background: linear-gradient(135deg, rgba(26, 38, 66, 0.95) 0%, rgba(10, 22, 40, 0.95) 100%);
    border: 3px solid #ff1493;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 50px rgba(255, 20, 147, 0.8), 0 0 100px rgba(204, 255, 0, 0.4);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.score-popup-overlay.show .score-popup {
    transform: scale(1);
}

.score-popup h2 {
    color: #ff1493;
    font-size: 2em;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(255, 20, 147, 0.6);
}

.popup-scores {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
}

.popup-round-score,
.popup-total-score {
    flex: 1;
}

.popup-divider {
    width: 2px;
    height: 80px;
    background: linear-gradient(180deg, transparent 0%, #ccff00 50%, transparent 100%);
    margin: 0 20px;
}

.popup-label {
    color: #ccff00;
    font-size: 1em;
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.popup-value {
    color: #ffffff;
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 0 0 20px rgba(204, 255, 0, 0.5);
}

.popup-close-btn {
    padding: 15px 50px;
    font-size: 1.2em;
    background: linear-gradient(135deg, #ccff00 0%, #e6ff33 100%);
    color: #0a1628;
    border: 3px solid #ff1493;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 0 25px rgba(204, 255, 0, 0.5);
    margin-top: 20px;
}

.popup-close-btn:hover {
    background: linear-gradient(135deg, #ff1493 0%, #ff69b4 100%);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 35px rgba(255, 20, 147, 0.7);
}

@media (max-width: 768px) {
    .score-popup {
        padding: 30px 20px;
    }

    .popup-scores {
        flex-direction: column;
        gap: 20px;
    }

    .popup-divider {
        width: 80%;
        height: 2px;
        background: linear-gradient(90deg, transparent 0%, #ccff00 50%, transparent 100%);
        margin: 0;
    }

    .popup-value {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .round-progress {
        gap: 10px;
        padding: 15px;
    }

    .round-indicator {
        width: 40px;
        height: 40px;
        font-size: 0.9em;
    }

    .round-intro-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .speech-bubble::after,
    .speech-bubble::before {
        right: auto;
        left: 50%;
        top: auto;
        bottom: -20px;
        transform: translateX(-50%) rotate(90deg);
    }

    .round-host-image {
        width: 250px;
        height: 250px;
        align-self: center;
    }

    .question-content {
        flex-direction: column;
    }

    .flag-image {
        width: 100%;
        max-width: 300px;
    }

    .answer-section {
        flex-direction: column;
        align-items: stretch;
    }

    .feedback {
        min-width: auto;
    }

    #playerName {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    #submitScore {
        width: 100%;
    }

    .score-display {
        font-size: 2.5em;
    }
}
