        /* UI Kit & Reset Overrides */
        body {
            font-family: 'Inter', -apple-system, sans-serif;
            background: transparent;
            margin: 0;
            padding: 0;
            transition: color 0.3s ease, background 0.3s ease;
            color: #f8fafc;
        }

        body.light-theme {
            color: #0f172a;
        }

        #UXT90491 {
            position: relative;
            box-sizing: border-box;
        }

        /* Fullscreen mode: fill viewport with themed background */
        /* html is the fullscreen element (requestFullscreen is called on documentElement) */
        :fullscreen,
        :-webkit-full-screen {
            overflow: hidden !important;
            height: 100% !important;
            width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
        }
        :fullscreen body,
        :-webkit-full-screen body {
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
            height: 100% !important;
            width: 100% !important;
            overflow: hidden !important;
            margin: 0 !important;
            padding: 0 !important;
        }
        :fullscreen body.light-theme,
        :-webkit-full-screen body.light-theme {
            background: linear-gradient(135deg, #e8f0f8 0%, #dce8f3 50%, #d0dfe8 100%);
        }

        /* On mobile fullscreen: make container the scrollable viewport */
        :fullscreen #UXT90491,
        :-webkit-full-screen #UXT90491 {
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            width: 100% !important;
            height: 100% !important;
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch !important;
            box-sizing: border-box !important;
            padding: 1rem !important;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
        }

        .sticky-nav-bar {
            position: sticky;
            bottom: -1.5rem;
            z-index: 40;
            margin-left: -1.5rem;
            margin-right: -1.5rem;
            margin-bottom: -1.5rem;
            margin-top: 2rem;
            padding: 1rem 1.5rem;
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            background: rgba(255, 255, 255, 0.6);
            border-bottom-left-radius: 24px;
            border-bottom-right-radius: 24px;
            border-top: 1px solid rgba(0, 0, 0, 0.05);
            display: flex;
        }

        body:not(.light-theme) .sticky-nav-bar {
            background: rgba(15, 23, 42, 0.65);
            border-top: 1px solid rgba(255, 255, 255, 0.05);
        }

        @media (min-width: 768px) {
            .sticky-nav-bar {
                bottom: -2rem;
                margin-left: -2rem;
                margin-right: -2rem;
                margin-bottom: -2rem;
                padding: 1.5rem 2rem;
            }
        }

        /* Glassmorphism Styles (Strictly no borders, soft shadows) */
        .glass-card {
            background: rgba(19, 23, 26, 0.7);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            box-shadow: 0 10px 30px -10px rgba(0,0,0,0.3);
            border-radius: 16px;
            color: #f8fafc;
            border: none !important;
            transition: background 0.3s, color 0.3s, box-shadow 0.3s;
        }

        body.light-theme .glass-card {
            background: rgba(255, 255, 255, 0.7);
            color: #0f172a;
            box-shadow: 0 10px 30px -10px rgba(0,0,0,0.15);
        }

        /* Team Card Style 2 (Shadows & Blur) */
        .team-card-gradient {
            background: rgba(255, 255, 255, 0.05) !important;
            box-shadow: 0 10px 30px -10px rgba(0,0,0,0.3), inset 0 4px 4px rgba(255, 255, 255, 0.15), inset 0 0 68px rgba(255, 255, 255, 0.05) !important;
            backdrop-filter: blur(48px) !important;
            -webkit-backdrop-filter: blur(48px) !important;
        }

        body.light-theme .team-card-gradient {
            background: rgba(255, 255, 255, 0.7) !important;
            box-shadow: 0 10px 30px -10px rgba(0,0,0,0.15), inset 0 4px 4px rgba(255, 255, 255, 0.6), inset 0 0 68px rgba(255, 255, 255, 0.3) !important;
        }

        /* Main Container Custom Gradient Background (with transparency for glassmorphism) */
        .main-card-gradient {
            background: linear-gradient(to top right, rgba(68, 62, 21, 0.4), rgba(18, 26, 40, 0.4)) !important;
        }

        body.light-theme .main-card-gradient {
            background: linear-gradient(to top right, rgba(245, 233, 210, 0.5), rgba(213, 235, 241, 0.5)) !important;
        }

        /* Inputs & Textareas */
        .glass-input {
            background: rgba(255, 255, 255, 0.05);
            color: #f8fafc;
            border-radius: 12px;
            padding: 12px 16px;
            border: none !important;
            outline: none !important;
            transition: all 0.2s;
        }

        body.light-theme .glass-input {
            background: rgba(0, 0, 0, 0.05);
            color: #0f172a;
        }

        .glass-input:focus {
            box-shadow: 0 0 0 2px #00B3CC !important;
        }

        /* Buttons (Accent and Secondary) */
        .btn-accent {
            background: #00B3CC;
            color: #ffffff;
            font-weight: 600;
            border-radius: 12px;
            padding: 12px 16px;
            min-width: 140px;
            border: none !important;
            outline: none !important;
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: 0 4px 14px 0 rgba(0, 179, 204, 0.3);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            white-space: nowrap;
        }

        .btn-accent:hover {
            background: #009fb7;
            transform: translateY(-1px);
        }

        .btn-accent:active {
            transform: translateY(1px);
        }

        .btn-secondary {
            background: rgba(255, 255, 255, 0.1);
            color: #f8fafc;
            font-weight: 600;
            border-radius: 12px;
            padding: 12px 24px;
            border: none !important;
            outline: none !important;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        body.light-theme .btn-secondary {
            background: rgba(0, 0, 0, 0.06);
            color: #0f172a;
        }

        .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.15);
        }

        body.light-theme .btn-secondary:hover {
            background: rgba(0, 0, 0, 0.1);
        }

        /* Custom Scrollbar */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: rgba(0, 179, 204, 0.3); border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: rgba(0, 179, 204, 0.6); }

        .no-scrollbar {
            scrollbar-width: thin;
            scrollbar-color: rgba(0, 179, 204, 0.3) transparent;
        }

        /* Switch toggle style */
        .switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 26px;
        }
        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(255,255,255,0.1);
            transition: .3s;
            border-radius: 34px;
        }
        body.light-theme .slider {
            background-color: rgba(0,0,0,0.1);
        }
        .slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .3s;
            border-radius: 50%;
        }
        input:checked + .slider {
            background-color: #00B3CC;
        }
        input:checked + .slider:before {
            transform: translateX(24px);
        }

        /* Action buttons: colored, work on both themes */
        .btn-danger-action {
            background: rgba(128, 128, 128, 0.12);
            color: #9ca3af;
            font-weight: 700;
            border-radius: 12px;
            border: none !important;
            outline: none !important;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 4px;
        }
        .btn-danger-action:hover {
            background: rgba(128, 128, 128, 0.22);
        }
        body.light-theme .btn-danger-action {
            background: #f3f4f6;
            color: #4b5563;
        }
        body.light-theme .btn-danger-action:hover {
            background: #e5e7eb;
        }

        .btn-success-action {
            background: rgba(0, 179, 204, 0.12);
            color: #00B3CC;
            font-weight: 700;
            border-radius: 12px;
            border: none !important;
            outline: none !important;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 4px;
        }
        .btn-success-action:hover {
            background: rgba(0, 179, 204, 0.22);
        }
        body.light-theme .btn-success-action {
            background: rgba(0, 179, 204, 0.1);
            color: #0093a8;
        }
        body.light-theme .btn-success-action:hover {
            background: rgba(0, 179, 204, 0.2);
        }

        .list-row {
            background: rgba(255, 255, 255, 0.05);
            transition: all 0.2s ease;
        }
        .list-row.guessed-row {
            background: rgba(34, 197, 94, 0.12) !important;
        }
        .list-row.guessed-row:hover {
            background: rgba(34, 197, 94, 0.18) !important;
        }
        .list-row.skipped-row {
            background: rgba(255, 255, 255, 0.04) !important;
        }
        .list-row.skipped-row:hover {
            background: rgba(255, 255, 255, 0.08) !important;
        }
        body.light-theme .list-row {
            background: rgba(0, 0, 0, 0.04);
        }
        body.light-theme .list-row.guessed-row {
            background: rgba(34, 197, 94, 0.08) !important;
        }
        body.light-theme .list-row.guessed-row:hover {
            background: rgba(34, 197, 94, 0.14) !important;
        }
        body.light-theme .list-row.skipped-row {
            background: rgba(0, 0, 0, 0.04) !important;
        }
        body.light-theme .list-row.skipped-row:hover {
            background: rgba(0, 0, 0, 0.08) !important;
        }

        /* Theme-aware heading text */
        .theme-heading {
            color: #f8fafc;
        }

        body.light-theme .theme-heading {
            color: #0f172a;
        }

        .theme-main-word {
            color: #ffffff;
            filter: drop-shadow(0 0 15px rgba(0, 179, 204, 0.6));
        }

        body.light-theme .theme-main-word {
            color: #00B3CC;
            filter: drop-shadow(0 1px 2px rgba(0,0,0, 0.1));
        }


        /* Team select button in last word resolution */
        .btn-team-select {
            background: rgba(0, 179, 204, 0.12);
            color: #00B3CC;
            font-weight: 700;
            border-radius: 12px;
            border: none !important;
            outline: none !important;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            width: 100%;
            align-items: center;
            justify-content: space-between;
            padding: 16px 20px;
            font-size: 1.125rem;
        }
        .btn-team-select:hover {
            background: #00B3CC;
            color: #fff;
        }
        body.light-theme .btn-team-select {
            background: rgba(0, 179, 204, 0.1);
            color: #007a8c;
        }
        body.light-theme .btn-team-select:hover {
            background: #00B3CC;
            color: #fff;
        }

        /* Exit Fullscreen Floating Button */
        .btn-exit-fullscreen {
            position: fixed;
            top: 1rem;
            right: 1rem;
            z-index: 9999;
            width: 42px;
            height: 42px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(30, 41, 59, 0.8);
            color: #cbd5e1;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            outline: none !important;
        }
        .btn-exit-fullscreen:hover {
            background: rgba(51, 65, 85, 0.9);
            color: #ffffff;
            transform: scale(1.05);
        }
        body.light-theme .btn-exit-fullscreen {
            background: rgba(255, 255, 255, 0.85);
            color: #475569;
            border: 1px solid rgba(0, 0, 0, 0.08) !important;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        }
        body.light-theme .btn-exit-fullscreen:hover {
            background: rgba(241, 245, 249, 0.95);
            color: #0f172a;
        }

        /* Word Card Transition Animations */
        @keyframes slideInFromRight {
            0% {
                transform: translateX(60px);
                opacity: 0;
            }
            100% {
                transform: translateX(0);
                opacity: 1;
            }
        }
        @keyframes slideInFromLeft {
            0% {
                transform: translateX(-60px);
                opacity: 0;
            }
            100% {
                transform: translateX(0);
                opacity: 1;
            }
        }
        @keyframes fadeIn {
            0% { 
                opacity: 0; 
                transform: scale(0.96); 
            }
            100% { 
                opacity: 1; 
                transform: scale(1); 
            }
        }

        .animate-slide-right {
            animation: slideInFromRight 0.35s ease-out forwards;
        }
        .animate-slide-left {
            animation: slideInFromLeft 0.35s ease-out forwards;
        }
        .animate-fade-in {
            animation: fadeIn 0.35s ease-out forwards;
        }

        /* Instant Swipe / Button Click Highlights */
        .swipe-highlight-guess {
            background: rgba(34, 197, 94, 0.25) !important;
            box-shadow: 0 0 25px rgba(34, 197, 94, 0.4) !important;
            transform: translateY(-20px) scale(0.98) !important;
            transition: all 0.15s ease-out !important;
        }
        body.light-theme .swipe-highlight-guess {
            background: #dcfce7 !important;
            box-shadow: 0 0 25px rgba(34, 197, 94, 0.3) !important;
        }
        .swipe-highlight-skip {
            background: rgba(249, 115, 22, 0.25) !important;
            box-shadow: 0 0 25px rgba(249, 115, 22, 0.4) !important;
            transform: translateY(20px) scale(0.98) !important;
            transition: all 0.15s ease-out !important;
        }
        body.light-theme .swipe-highlight-skip {
            background: #ffedd5 !important;
            box-shadow: 0 0 25px rgba(249, 115, 22, 0.3) !important;
        }
/* Rules Popup Background */
.rules-popup-gradient {
    background: linear-gradient(to top right, #443E15, #121A28);
}
body.light-theme .rules-popup-gradient {
    background: linear-gradient(to top right, #F5E9D2, #D5EBF1);
}
/* Rules Popup Text and Buttons */
.rules-popup-gradient {
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.1);
}
.rules-popup-close-btn {
    color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.1);
}
.rules-popup-close-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
}

body.light-theme .rules-popup-gradient {
    color: #0f172a;
    border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .rules-popup-close-btn {
    color: rgba(0, 0, 0, 0.5);
    background-color: rgba(0, 0, 0, 0.05);
}
body.light-theme .rules-popup-close-btn:hover {
    color: #000000;
    background-color: rgba(0, 0, 0, 0.1);
}
/* Enhanced Glass Input */
.glass-input {
    background-color: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
    color: #f8fafc !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    border: none !important;
    outline: none !important;
    transition: all 0.3s ease !important;
}

.glass-input:focus {
    box-shadow: 0 0 20px rgba(0, 179, 204, 0.2) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

body.light-theme .glass-input {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #0f172a !important;
}

body.light-theme .glass-input:focus {
    background-color: rgba(0, 0, 0, 0.1) !important;
}
/* Custom Sliders for Settings */
.custom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    outline: none;
}
body:not(.light-theme) .custom-slider {
    background: rgba(255, 255, 255, 0.1);
}
.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 24px;
    border-radius: 4px;
    background: #00B3CC;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 179, 204, 0.4);
    transition: transform 0.1s;
}
.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}
.custom-slider::-moz-range-thumb {
    width: 12px;
    height: 24px;
    border-radius: 4px;
    background: #00B3CC;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 179, 204, 0.4);
    transition: transform 0.1s;
}
.custom-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

/* Mobile Curved Interaction Zones */
.curved-top-zone {
    background: #00B3CC;
    color: white;
    border-radius: 0 0 50% 50% / 0 0 20% 20%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 1.5rem;
    min-height: 240px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 179, 204, 0.15);
    cursor: pointer;
    user-select: none;
    transition: background 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s cubic-bezier(0.25, 1, 0.5, 1), transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.curved-top-zone:active {
    background: #22c55e !important;
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.45) !important;
}
.curved-top-zone.swipe-active {
    background: #22c55e !important;
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.45) !important;
    transform: scale(1.03);
    transition: all 0.05s ease-out !important;
}
.curved-bottom-zone {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(15, 23, 42, 0.6);
    border-radius: 50% 50% 0 0 / 20% 20% 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 1.5rem;
    min-height: 180px;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s cubic-bezier(0.25, 1, 0.5, 1), color 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s cubic-bezier(0.25, 1, 0.5, 1), transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.curved-bottom-zone:active {
    background: #f97316 !important;
    color: white !important;
    box-shadow: 0 -10px 30px rgba(249, 115, 22, 0.45) !important;
}
.curved-bottom-zone.swipe-active {
    background: #f97316 !important;
    color: white !important;
    box-shadow: 0 -10px 30px rgba(249, 115, 22, 0.45) !important;
    transform: scale(1.03);
    transition: all 0.05s ease-out !important;
}
body.light-theme .curved-bottom-zone.swipe-active {
    background: #f97316 !important;
    color: white !important;
    box-shadow: 0 -10px 30px rgba(249, 115, 22, 0.3) !important;
}
body:not(.light-theme) .curved-bottom-zone {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(248, 250, 252, 0.6);
}
body:not(.light-theme) .curved-bottom-zone:active {
    background: rgba(255, 255, 255, 0.15);
}

/* Mobile Curved Interaction Container */
.playing-mobile-container {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    width: calc(100% + 2rem) !important;
    margin-left: -1rem !important;
    margin-right: -1rem !important;
    margin-top: -1rem !important;
    margin-bottom: -1rem !important;
    box-sizing: border-box !important;
    gap: 1.5rem !important;
}

@media (min-width: 768px) {
    .playing-mobile-container {
        display: none !important;
    }
}

/* When in fullscreen mode on mobile, it locks to the viewport absolute dimensions */
:fullscreen .playing-mobile-container,
:-webkit-full-screen .playing-mobile-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Mobile Swipe animations: Fly out Up/Down */
@keyframes fly-out-up {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-220px) scale(0.9);
        opacity: 0;
    }
}
@keyframes fly-out-down {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(220px) scale(0.9);
        opacity: 0;
    }
}
.swipe-highlight-guess-mobile {
    animation: fly-out-up 0.22s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
    background: rgba(34, 197, 94, 0.25) !important;
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.4) !important;
}
body.light-theme .swipe-highlight-guess-mobile {
    background: #dcfce7 !important;
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.3) !important;
}
.swipe-highlight-skip-mobile {
    animation: fly-out-down 0.22s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
    background: rgba(249, 115, 22, 0.25) !important;
    box-shadow: 0 0 25px rgba(249, 115, 22, 0.4) !important;
}
body.light-theme .swipe-highlight-skip-mobile {
    background: #ffedd5 !important;
    box-shadow: 0 0 25px rgba(249, 115, 22, 0.3) !important;
}

/* Mobile Slide-in animations: From Top/Bottom */
@keyframes slideInFromBottom {
    0% {
        transform: translateY(120px) scale(0.95);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}
@keyframes slideInFromTop {
    0% {
        transform: translateY(-120px) scale(0.95);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}
.animate-slide-up-mobile {
    animation: slideInFromBottom 0.26s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.animate-slide-down-mobile {
    animation: slideInFromTop 0.26s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}


