:root {
            /* Removed old --bg-gradient; design now uses fixed background layer + orbs */
            --liquid-glass-tint: rgba(10, 4, 25, 0.45);
            --app-height: 100svh;
            --overlay-height: 100vh;
        }

        @supports (height: 100dvh) {
            :root {
                --app-height: 100dvh;
            }
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        html {
            height: 100%;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            margin: 0;
            padding: 0;
            min-height: 100vh;
            min-height: 100dvh;
            min-height: 100svh;
            min-height: var(--app-height, 100svh);
            overflow-x: hidden;
            color: #1a1a1a;
            position: relative;
            background: transparent;
        }

        body::before {
            content: "";
            position: fixed;
            inset: 0;
            background: var(--liquid-glass-tint);
            backdrop-filter: blur(26px);
            -webkit-backdrop-filter: blur(26px);
            pointer-events: none;
            z-index: -1;
        }

        body.modal-open::before,
        body.popup-open::before,
        html.modal-open body::before {
            background: rgba(10, 4, 25, 0.65);
        }

        .container {
            max-width: 100%;
            margin: 0 auto;
            padding: 20px;
            padding-top: calc(20px + env(safe-area-inset-top));
            padding-bottom: calc(20px + env(safe-area-inset-bottom));
            min-height: 100vh;
            min-height: 100dvh;
            min-height: 100svh;
            min-height: var(--app-height, 100svh);
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 1;
        }

        /* Removed old gradientShift animation (unused) */

        /* Auth Card */
        .auth-card {
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 30px;
            padding: 40px 30px;
            width: 100%;
            max-width: 400px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            position: relative;
            animation: slideInUp 0.8s ease-out;
        }

        /* Logo */
        .auth-logo {
            text-align: center;
            margin-bottom: 30px;
        }

        .logo-link {
            text-decoration: none;
            display: inline-block;
        }

        .logo-container {
            display: inline-flex;
            align-items: center;
            gap: 15px;
            transition: transform 0.2s ease;
            cursor: pointer;
        }

        .logo-container:hover {
            transform: scale(1.05);
        }

        .logo-icon {
            width: 187,57px;
            height: 60px;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
        }

        .logo-text {
            font-size: 28px;
            font-weight: 700;
            background: linear-gradient(45deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        /* Form Elements */
        .form-group {
            margin-bottom: 20px;
        }

        .form-label {
            color: #fff;
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 8px;
            display: block;
        }

        .form-input {
            width: 100%;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 12px;
            padding: 14px 16px;
            color: #fff;
            font-size: 16px;
            transition: all 0.3s ease;
        }

        .form-input::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .form-input:focus {
            outline: none;
            background: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.4);
        }

        /* Buttons */
    .btn-primary {
            width: 100%;
            position: relative;
            overflow: hidden;
            background: linear-gradient(135deg, #b854ff 0%, #ff54d0 100%);
            color: #fff;
            border: none;
            border-radius: 12px;
            padding: 16px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s ease, box-shadow 0.3s ease;
            box-shadow: 0 10px 30px rgba(184, 84, 255, 0.3);
        }

        .btn-primary:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 12px 34px rgba(184, 84, 255, 0.35);
        }
    .btn-primary::before { content:''; position:absolute; inset:50% auto auto 50%; width:0; height:0; border-radius:50%; background:rgba(255,255,255,0.3); transform:translate(-50%,-50%); transition: width 0.6s, height 0.6s; pointer-events:none; }
    .btn-primary:active::before { width:300px; height:300px; }

        .btn-primary:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .btn-secondary {
            width: 100%;
            background: transparent;
            color: #fff;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 12px;
            padding: 16px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-top: 15px;
        }

        .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.5);
        }

        /* Links */
        .auth-link {
            color: rgba(255, 255, 255, 0.8);
            text-align: center;
            margin-top: 20px;
            font-size: 14px;
        }

        .auth-link a {
            color: #fff;
            text-decoration: none;
            font-weight: 600;
            transition: opacity 0.3s ease;
        }

        .auth-link a:hover {
            opacity: 0.8;
        }

        /* Google OAuth Button */
        .btn-google {
            width: 100%;
            background: #fff;
            color: #000;
            border: none;
            border-radius: 12px;
            padding: 14px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-top: 12px;
        }
        .btn-google:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.18); }
        .g-logo { 
            width: 18px; 
            height: 18px; 
            display: inline-block; 
            background: url('https://fra.cloud.appwrite.io/v1/storage/buckets/6895258600042314049c/files/6896677d0032e3b33ed9/view?project=688fbd1a002c51341977&mode=admin') center/contain no-repeat; 
        }

        /* Messages */
    .message {
            padding: 12px 16px;
            border-radius: 8px;
            margin-bottom: 20px;
            font-size: 14px;
            text-align: center;
        }

        .message-error {
            background: rgba(239, 68, 68, 0.2);
            color: #fef2f2;
            border: 1px solid rgba(239, 68, 68, 0.3);
        }

        .message-success {
            background: rgba(34, 197, 94, 0.2);
            color: #f0fdf4;
            border: 1px solid rgba(34, 197, 94, 0.3);
        }

        .message-info {
            background: rgba(59, 130, 246, 0.2);
            color: #eff6ff;
            border: 1px solid rgba(59, 130, 246, 0.3);
        }

        /* Agreement checkboxes (custom UI) */
        .agreements {
            width: 100%;
            max-width: 245px; /* match Turnstile width */
            margin: 6px auto 12px auto; /* center to match Turnstile position */
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .agree-item {
            position: relative;
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 8px 10px; /* slightly tighter to match compact elements */
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 12px;
            transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
        }
        .agree-item:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); }
        .agree-item:focus-within { box-shadow: 0 0 0 3px rgba(184,84,255,0.15); border-color: rgba(184,84,255,0.35); }
        .agree-item input[type="checkbox"] {
            position: absolute;
            opacity: 0;
            width: 1px;
            height: 1px;
            overflow: hidden;
        }
        .agree-box {
            flex: 0 0 auto;
            width: 18px;
            height: 18px;
            border-radius: 6px;
            border: 1px solid rgba(255,255,255,0.28);
            background: rgba(255,255,255,0.06);
            position: relative;
            transition: all 0.2s ease;
            margin-top: 1px;
        }
        .agree-item input[type="checkbox"]:checked + .agree-box {
            background: linear-gradient(135deg, #b854ff 0%, #ff54d0 100%);
            border-color: transparent;
            box-shadow: 0 4px 12px rgba(184,84,255,0.35);
        }
        .agree-box::after {
            content: '';
            position: absolute;
            left: 4px;
            top: 1px;
            width: 6px;
            height: 10px;
            border: solid #fff;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
            opacity: 0;
            transition: opacity 0.2s ease;
        }
        .agree-item input[type="checkbox"]:checked + .agree-box::after { opacity: 1; }
        .agree-text {
            color: #fff;
            font-size: 12px;
            line-height: 1.35;
        }
        .agree-text a { color: #60a5fa; text-decoration: underline; text-underline-offset: 2px; }
        .required-star { color: #fda4af; margin-left: 2px; }

        /* Greyed-out style for disabled signup button */
        #signupBtn:disabled {
            background: linear-gradient(135deg, #747b87 0%, #9aa0ab 100%) !important;
            box-shadow: none !important;
            filter: grayscale(10%);
        }

        /* Loading */
        .loading-spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-top: 2px solid #fff;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-right: 8px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Verification Page */
        .verification-container {
            text-align: center;
            color: #fff;
        }

        .verification-icon {
            font-size: 80px;
            margin-bottom: 20px;
        }

        .verification-title {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 10px;
        }

        .verification-text {
            color: rgba(255, 255, 255, 0.8);
            font-size: 16px;
            line-height: 1.5;
        }

        /* Hide elements by default */
        .page {
            display: none;
        }

        .page.active {
            display: block;
        }

        /* Responsive */
        @media (max-width: 480px) {
            .auth-card {
                padding: 30px 20px;
                /* Make the card narrower on small screens to avoid edge-to-edge look */
                max-width: 360px;
                margin-inline: auto;
            }

            .logo-text {
                font-size: 24px;
            }

            .logo-icon {
                width: 156,31px;
                height: 50px;
            }
            /* Keep agreements at desktop width so they match the Turnstile widget */
            .agreements { max-width: 245px; }
        }

        

        /* Dark theme overrides (remove animated page gradients; keep text colors) */
        html.dark { 
            background-color: #181f25; 
        }

        .dark body { 
            color: #e5e7eb; 
        }

        .dark .auth-card {
            background: rgba(17, 24, 39, 0.6);
            border-color: rgba(255,255,255,0.08);
            box-shadow: 0 10px 30px rgba(0,0,0,0.4);
        }
        .dark .form-label { color: #e5e7eb; }
        .dark .form-input { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.18); color: #f3f4f6; }
        .dark .form-input::placeholder { color: rgba(229,231,235,0.5); }
        .dark .form-input:focus { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.28); }
        .dark .btn-secondary { color: #e5e7eb; border-color: rgba(255,255,255,0.25); }
        .dark .btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); }
        .dark .auth-link, .dark .auth-link a { color: rgba(229,231,235,0.85); }
        .dark .logo-text { background: linear-gradient(45deg, #93c5fd, #c084fc); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
        .dark .upload-text, .dark .option-label, .dark .card-counter { color: #e5e7eb; }
        .dark .message-error { background: rgba(239, 68, 68, 0.18); color: #fecaca; border-color: rgba(239,68,68,0.35); }
        .dark .message-success { background: rgba(34, 197, 94, 0.18); color: #bbf7d0; border-color: rgba(34,197,94,0.35); }
        .dark .message-info { background: rgba(59, 130, 246, 0.18); color: #bfdbfe; border-color: rgba(59,130,246,0.35); }
    /* Force override white inline backgrounds in modals if any */
    .dark [style*="background: white"] { background: #0b1220 !important; color: #e5e7eb !important; }
    .dark [style*="background: white"] * { color: #e5e7eb !important; }
    .dark [style*="background:#fff"], .dark [style*="background: #fff"] { background: #0b1220 !important; color: #e5e7eb !important; }
    .dark [style*="background:#fff"] *, .dark [style*="background: #fff"] * { color: #e5e7eb !important; }
    /* Dark adjustments for agreements */
    .dark .agree-item { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }
    .dark .agree-item:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.14); }
    .dark .agree-box { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.2); }
    .dark .agree-text { color: #e5e7eb; }
    .dark .agree-text a { color: #93c5fd; }
    .dark .required-star { color: #fda4af; }

    /* Language Selector */
    .language-selector {
        position: absolute;
        bottom: 16px;
        right: 16px;
        z-index: 10;
    }

    /* Help link (mirrors language selector styling) */
    .help-link {
        position: absolute;
        bottom: 16px;
        left: 16px;
        z-index: 10;
    }

    .language-dropdown {
        position: relative;
        display: inline-block;
    }

    .language-btn {
        background: none;
        border: none;
        color: rgba(255,255,255,0.6);
        font-size: 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 4px 6px;
        border-radius: 4px;
        transition: all 0.2s ease;
        text-decoration: underline;
        text-underline-offset: 2px;
        text-decoration-color: rgba(255,255,255,0.3);
    }

    .language-btn:hover {
        color: rgba(255,255,255,0.8);
        background: rgba(255,255,255,0.05);
        text-decoration-color: rgba(255,255,255,0.5);
    }

    .language-arrow {
        font-size: 10px;
        transition: transform 0.2s ease;
    }

    .language-dropdown.open .language-arrow {
        transform: rotate(180deg);
    }

    .language-menu {
        position: absolute;
        bottom: 100%;
        right: 0;
        margin-bottom: 4px;
        background: rgba(15,15,25,0.6);
        border: 1px solid rgba(255,255,255,0.18);
        border-radius: 10px;
        box-shadow: 0 14px 34px rgba(0,0,0,0.35);
        min-width: 140px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(6px);
        transition: all 0.2s ease;
        backdrop-filter: blur(18px) saturate(120%);
        -webkit-backdrop-filter: blur(18px) saturate(120%);
        z-index: 100001;
        overflow: hidden;
    }

    .language-dropdown.open .language-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .language-option {
        display: block;
        width: 100%;
        padding: 10px 14px;
        background: none;
        border: none;
        color: #e5e7eb;
        font-size: 13px;
        cursor: pointer;
        text-align: left;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .language-option:hover { background: rgba(184,84,255,0.14); }

    .language-option.selected { background: rgba(184,84,255,0.22); font-weight: 600; }

    .language-option:first-child {
        border-radius: 6px 6px 0 0;
    }

    .language-option:last-child {
        border-radius: 0 0 6px 6px;
    }

    /* Dark mode overrides for language selector */
    .dark .language-btn {
        color: rgba(229,231,235,0.6);
        text-decoration-color: rgba(229,231,235,0.3);
    }

    .dark .language-btn:hover {
        color: rgba(229,231,235,0.8);
        background: rgba(255,255,255,0.05);
        text-decoration-color: rgba(229,231,235,0.5);
    }

    .dark .language-menu {
        background: rgba(17,24,39,0.95);
        border-color: rgba(255,255,255,0.1);
    }

    .dark .language-option {
        color: #e5e7eb;
    }

    .dark .language-option:hover {
        background: rgba(118,75,162,0.2);
    }

    .dark .language-option.selected {
        background: rgba(118,75,162,0.3);
    }

    /* iOS 26+ Safari Liquid Glass specific fixes */
    @supports (top: env(safe-area-inset-top)) {
        @media screen and (max-width: 768px) {
            body {
                min-height: 100vh;
                min-height: 100svh;
                min-height: var(--app-height, 100svh);
                padding-top: 0 !important;
                padding-bottom: 0 !important;
            }
            
            .container {
                padding-top: calc(20px + env(safe-area-inset-top));
                padding-bottom: calc(20px + env(safe-area-inset-bottom));
            }
            
            body::before {
                top: -100px;
                bottom: -100px;
                position: fixed !important;
            }
        }
    }

    /* Fix for iOS 26 bottom white space */
    @supports (padding: max(0px)) {
        body {
            padding-bottom: 0;
            margin-bottom: -1px;
        }
        
        .container {
            padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
            margin-bottom: 0;
        }
    }
    /* iOS 26 Safari Liquid Glass Extended Fix */
@supports (height: 100dvh) {
    /* For iOS devices with Safari */
    @media screen and (max-width: 768px) and (-webkit-touch-callout: default) {
        /* Removed body::after gradient extension (obsolete) */
        
        /* Ensure body fills the entire viewport */
        body {
            min-height: 100vh;
            min-height: -webkit-fill-available;
            min-height: 100dvh;
            min-height: 100svh;
            min-height: var(--app-height, 100svh);
            /* Remove ALL padding from body */
            padding: 0 !important;
            margin: 0 !important;
        }
        
        /* Container handles safe areas */
        .container {
            padding-top: max(20px, env(safe-area-inset-top));
            padding-bottom: max(20px, env(safe-area-inset-bottom));
            min-height: var(--app-height, 100svh);
        }
    }
}

/* Prevent white flash on overscroll: handled by new fixed background; keep colors defined later. */

/* Turnstile scaled to ~245px actual width (original ~300px) */
    .turnstile-wrap{width:245px;height:65px;overflow:hidden;margin:0 auto;}
        .turnstile-wrap .cf-turnstile{transform:scale(0.8167);transform-origin:0 0;}

/* Ensure only one gradient layer: no fixed backdrop */
        /* In Standalone mode, zero body padding; let .container handle safe areas */
        @media (display-mode: standalone) {
            body { padding-top: 0 !important; padding-bottom: 0 !important; }
            .container {
                padding-top: max(20px, env(safe-area-inset-top)) !important;
                padding-bottom: max(20px, env(safe-area-inset-bottom)) !important;
                min-height: 100svh;
                min-height: var(--app-height, 100svh);
            }
        }
        @supports (height: 100dvh) {
            @media (display-mode: standalone) {
                html, body, .container { min-height: 100dvh !important; }
            }
        }

/* Replace painted body gradient with a fixed background layer and animated orbs */
        html { background-color: #0a0a0f; }
        html.dark { background-color: #0a0a0f; }
        body { background: none !important; }
        body::after { content: none !important; }

        /* Background layer behind all content */
        .background {
            position: fixed;
            inset: 0;
            z-index: -2;
            background: linear-gradient(135deg, #0a0a0f 0%, #1a0a2e 100%);
        }
        .gradient-orb {
            position: absolute;
            border-radius: 50%;
            filter: blur(100px);
            opacity: 0.5;
            animation: float 20s ease-in-out infinite alternate;
            will-change: transform;
        }
        .orb1 {
            width: 600px; height: 600px;
            background: linear-gradient(135deg, #b854ff 0%, #ff54d0 100%);
            top: -200px; right: -200px;
            animation-delay: 0s;
        }
        .orb2 {
            width: 400px; height: 400px;
            background: linear-gradient(135deg, #54a0ff 0%, #b854ff 100%);
            bottom: -150px; left: -150px;
            animation-delay: 5s;
        }
        .orb3 {
            width: 300px; height: 300px;
            background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
            top: 50%; left: 50%; transform: translate(-50%, -50%);
            animation-delay: 10s;
        }
        @keyframes float {
            0%, 100% { transform: translate(0, 0) scale(1); }
            33% { transform: translate(30px, -50px) scale(1.08); }
            66% { transform: translate(-20px, 30px) scale(0.95); }
        }

        /* Ensure app content sits above background */
        .container { position: relative; z-index: 1; }

        /* Glassmorphism adjustments (keep layout, update visuals) */
        .auth-card {
            background: rgba(255, 255, 255, 0.06) !important;
            backdrop-filter: blur(20px) !important;
            -webkit-backdrop-filter: blur(20px) !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
        }
        .btn-secondary { border-color: rgba(255,255,255,0.25); }
        .btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); }
        .btn-google { box-shadow: 0 10px 24px rgba(0,0,0,0.25); }

        .form-input {
            background: rgba(255,255,255,0.08) !important;
            border-color: rgba(255,255,255,0.18) !important;
        }
        .form-input:focus {
            background: rgba(255,255,255,0.12) !important;
            border-color: rgba(255,255,255,0.28) !important;
        }
        .message { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

        /* Language dropdown glass tweaks */
    .language-menu { background: rgba(15,15,25,0.6) !important; border-color: rgba(255,255,255,0.18) !important; }
    .language-option { color: #e5e7eb; }
    .language-option:hover { background: rgba(184,84,255,0.14); }
    .language-option.selected { background: rgba(184,84,255,0.22); }

        /* iOS PWA: keep safe-area and overscroll fixes intact; background is separate layer */

/* Hide any theme toggles and disable dark mode hooks */

        /* Support-style primary gradient buttons (+ ripple) */
        .btn-primary,
        .generate-btn,
        .add-set-btn {
            position: relative;
            overflow: hidden;
            background: linear-gradient(135deg, #b854ff 0%, #ff54d0 100%) !important;
            border: none !important;
            color: #ffffff !important;
            box-shadow: 0 10px 30px rgba(184, 84, 255, 0.3) !important;
            transition: transform 0.2s ease, box-shadow 0.3s ease !important;
        }
        .btn-primary:hover:not(:disabled),
        .generate-btn:hover:not(:disabled),
        .add-set-btn:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 12px 34px rgba(184, 84, 255, 0.35) !important;
        }
        .btn-primary::before,
        .generate-btn::before,
        .add-set-btn::before {
            content: '';
            position: absolute; inset: 50% auto auto 50%;
            width: 0; height: 0; border-radius: 50%;
            background: rgba(255,255,255,0.3);
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
            pointer-events: none;
        }
        .btn-primary:active::before,
        .generate-btn:active::before,
        .add-set-btn:active::before {
            width: 300px; height: 300px;
        }

        /* Inputs: support-style focus outline */
        .form-input:focus,
        .custom-prompt-input:focus,
        input:focus, textarea:focus, select:focus {
            outline: none !important;
            background: rgba(255,255,255,0.10) !important;
            border-color: #b854ff !important;
            box-shadow: 0 0 0 3px rgba(184,84,255,0.15) !important;
        }

        /* Shimmer outline on glass surfaces */
        .auth-card::before,
        .main-content::before {
            content: '';
            position: absolute; top: 0; left: 0; right: 0; height: 1px;
            background: linear-gradient(90deg, transparent, rgba(184,84,255,0.35), transparent);
            animation: shimmer 3.4s infinite;
            pointer-events: none;
        }
        .auth-card { overflow: hidden; border-radius: 30px; }
        .auth-card::before { border-top-left-radius: 30px; border-top-right-radius: 30px; }
    .main-content { overflow: hidden; }
        @keyframes shimmer { 0% { transform: translateX(-100%);} 100% { transform: translateX(100%);} }

        /* Menus: stronger blur, better readability, topmost layer */
        .language-selector { z-index: 100000 !important; }
        .language-menu {
            backdrop-filter: blur(18px) !important; -webkit-backdrop-filter: blur(18px) !important;
            background: rgba(15,15,25,0.6) !important;
            border-color: rgba(255,255,255,0.18) !important;
            z-index: 100001 !important;
        }

        /* Slide-in on load */
        @keyframes slideInUp { from { opacity: 0; transform: translateY(16px);} to { opacity: 1; transform: translateY(0);} }
        .auth-card { animation: slideInUp 0.8s ease-out; }

        /* Smooth orb animation: avoid reset jump on centered orb */
        @keyframes float-centered {
            0%,100% { transform: translate(-50%, -50%) scale(1); }
            33% { transform: translate(calc(-50% + 30px), calc(-50% - 50px)) scale(1.08); }
            66% { transform: translate(calc(-50% - 20px), calc(-50% + 30px)) scale(0.95); }
        }
        .orb3 { animation-name: float-centered !important; }

        /* Performance optimization: Pause expensive animations during Turnstile verification */
        html.captcha-active {
            animation-play-state: paused !important;
        }
        
        html.captcha-active .gradient-orb {
            animation-play-state: paused !important;
            will-change: auto !important;
        }
        
        html.captcha-active body::before {
            backdrop-filter: blur(10px) !important;
            -webkit-backdrop-filter: blur(10px) !important;
        }
        
        html.captcha-active .auth-card {
            backdrop-filter: blur(10px) !important;
            -webkit-backdrop-filter: blur(10px) !important;
        }
