body { 
            font-family: 'Inter', sans-serif; 
            background-color: #0A141E;
            color: #E0E1DD;
            background: linear-gradient(-45deg, #0A141E, #0d1b2a, #1b263b, #111827);
            background-size: 400% 400%;
            animation: gradient-animation 15s ease infinite;
            padding-bottom: 3rem; /* Breathing room below content */
        }

        #main-particles-js { position: fixed; width: 100%; height: 100%; top: 0; left: 0; z-index: 0; }
        
        @keyframes gradient-animation { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

        .screen {
            width: 100%;
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 1rem;
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
            position: absolute;
            top: 0; left: 0;
            min-height: 100vh;
        }
        
        .screen.visible {
            display: flex;
            opacity: 1;
            transform: translateY(0);
            position: relative;
        }

        #dashboard-screen {
            justify-content: flex-start;
            align-items: stretch;
            padding-top: 2.5rem;
            padding-bottom: 4rem;
        }

        #dashboard-screen > div {
            width: 100%;
        }

        #app-container {
            display: none; /* Hide main app container by default */
        }

        #app-container.visible {
            display: flex; /* Show when user is logged in */
        }

        .avatar-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            border: none;
            background: transparent;
            cursor: pointer;
            border-radius: 9999px;
        }

        .avatar-toggle:focus-visible {
            outline: none;
        }

        .avatar-toggle:hover .user-avatar {
            transform: translateY(-1px);
            box-shadow: 0 16px 32px rgba(7, 13, 24, 0.55);
        }

        .avatar-toggle:active .user-avatar {
            transform: translateY(0);
        }

        .avatar-toggle:focus-visible .user-avatar {
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.55), 0 12px 28px rgba(7, 13, 24, 0.45);
            border-color: rgba(96, 165, 250, 0.45);
        }
        
        .tile {
            --tile-accent: #60a5fa;
            --tile-accent-secondary: #c084fc;
            --tile-glow: rgba(96, 165, 250, 0.35);
            background: rgba(13, 27, 42, 0.75);
            backdrop-filter: blur(10px);
            border: 1px solid transparent;
            border-image: linear-gradient(135deg, var(--tile-accent), var(--tile-accent-secondary)) 1;
            transition: transform 0.3s ease-out, background 0.3s ease-out, box-shadow 0.3s ease-out, border-image 0.3s ease-out;
            cursor: pointer;
            box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
            position: relative;
            overflow: hidden;
            z-index: 0;
        }

        .tile::after {
            content: '';
            position: absolute;
            inset: 1px;
            border-radius: inherit;
            background: rgba(8, 18, 35, 0.9);
            z-index: 0;
            pointer-events: none;
        }

        .tile > * {
            position: relative;
            z-index: 2;
        }

        .tile:hover {
            transform: translateY(-8px) scale(1.03);
            background: rgba(13, 27, 42, 0.95);
            box-shadow: 0 18px 45px var(--tile-glow);
            border-image: linear-gradient(135deg, var(--tile-accent-secondary), var(--tile-accent)) 1;
        }

        @keyframes shimmer-sweep {
            0% { transform: translateX(-150%) skewX(-30deg); }
            100% { transform: translateX(250%) skewX(-30deg); }
        }

        .tile.anim-shimmer::before {
            content: ''; position: absolute; top: 0; left: 0; width: 50%; height: 100%;
            background: linear-gradient(to right, rgba(96, 165, 250,0) 0%, rgba(96, 165, 250,0.2) 50%, rgba(96, 165, 250,0) 100%);
            animation: shimmer-sweep 4s ease-in-out infinite; z-index: 1; pointer-events: none; border-radius: inherit;
        }

        @keyframes breathing-icon {
            0% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(96, 165, 250, 0.3)); }
            50% { transform: scale(1.08); filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.7)); }
            100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(96, 165, 250, 0.3)); }
        }
        
        .tile-icon {
             display: block;
             font-size: 2.5rem;
             margin-bottom: 0.75rem;
             transition: transform 0.3s ease-in-out;
        }

        .tile.anim-breathing .tile-icon {
            animation: breathing-icon 3.5s ease-in-out infinite;
        }


        .btn { transition: all 0.2s ease-out; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
        .btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 7px 14px rgba(0,0,0,0.15); }
        .btn:active:not(:disabled) { transform: translateY(0); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
        .btn-primary { background: linear-gradient(to right, #3b82f6, #60a5fa); color: #ffffff; }
        .btn-secondary { background: linear-gradient(to right, #4A5568, #2D3748); color: #E0E1DD; }
        .btn-ai { background: linear-gradient(to right, #8b5cf6, #c084fc); color: #ffffff; }
        .btn-upgrade { 
            background: linear-gradient(to right, #f59e0b, #fbbf24);
            color: #ffffff;
            animation: pulse-upgrade 2s infinite;
        }
        
        @keyframes pulse-upgrade {
            0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7); }
            70% { box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); }
            100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
        }

        .card { 
            background: rgba(27, 38, 59, 0.7);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .answer-panel, .ai-feedback-panel, .key-insights-panel {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.7s ease-in-out, opacity 0.5s ease-in-out, margin-top 0.7s ease-in-out;
            opacity: 0;
            margin-top: 0;
        }
        .answer-panel.visible, .ai-feedback-panel.visible, .key-insights-panel.visible {
             max-height: 1500px; /* Increased for more content */
             opacity: 1;
             margin-top: 1rem;
        }
        
        .no-transition {
            transition: none !important;
        }
        
        .speak-button { background: none; border: none; font-size: 1.75rem; cursor: pointer; transition: transform 0.2s, color 0.2s; color: #9ca3af; }
        .speak-button:hover { transform: scale(1.1); color: #60a5fa; }
        
        .modal-overlay {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(4, 12, 22, 0.55);
            backdrop-filter: blur(8px);
            display: flex; justify-content: center; align-items: center;
            z-index: 1000; opacity: 0; transition: opacity 0.3s ease-in-out;
            pointer-events: none;
        }
        .modal-overlay.visible { opacity: 1; pointer-events: auto; }
        .modal-content {
            background: linear-gradient(145deg, rgba(27, 38, 59, 0.85), rgba(17, 27, 41, 0.78));
            padding: 2rem; border-radius: 1rem;
            border: 1px solid rgba(96, 165, 250, 0.35);
            box-shadow: 0 25px 55px rgba(8, 15, 26, 0.55);
            text-align: center; color: #E0E1DD;
            transform: scale(0.9); transition: transform 0.3s ease-in-out;
            max-width: 90%;
            width: 400px;
        }
        .modal-overlay.visible .modal-content { transform: scale(1); }

        .onboarding-modal {
            padding: 2.25rem 2rem 2rem;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            background: linear-gradient(155deg, rgba(25, 45, 70, 0.88), rgba(15, 26, 42, 0.72));
        }

        .onboarding-progress {
            width: 100%;
            height: 0.5rem;
            background: rgba(96, 165, 250, 0.18);
            border-radius: 9999px;
            position: relative;
            overflow: hidden;
        }

        .onboarding-progress-bar {
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 0%;
            border-radius: inherit;
            background: linear-gradient(90deg, #60a5fa, #c084fc);
            box-shadow: 0 0 12px rgba(96, 165, 250, 0.45);
            transition: width 0.4s ease-in-out;
        }

        .onboarding-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            text-align: left;
        }

        .onboarding-icon {
            width: 3.25rem;
            height: 3.25rem;
            border-radius: 0.75rem;
            background: rgba(96, 165, 250, 0.15);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.8rem;
            box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.45);
        }

        .onboarding-title-group {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
        }

        .onboarding-step-label {
            font-size: 0.75rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: rgba(129, 199, 255, 0.75);
            font-weight: 600;
        }

        .onboarding-title {
            font-size: 1.65rem;
            font-weight: 700;
            color: #cfe2ff;
            margin: 0;
        }

        .onboarding-body {
            text-align: left;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            color: #cbd5e1;
            font-size: 0.95rem;
            line-height: 1.55rem;
        }

        .onboarding-body p {
            margin: 0;
        }

        .onboarding-list {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .onboarding-list li {
            position: relative;
            padding-left: 1.75rem;
        }

        .onboarding-list li::before {
            content: '\272A';
            position: absolute;
            left: 0;
            top: 0.1rem;
            font-size: 0.9rem;
            color: #60a5fa;
        }

        .onboarding-callout {
            background: linear-gradient(135deg, rgba(96, 165, 250, 0.12), rgba(192, 132, 252, 0.05));
            border-radius: 0.85rem;
            padding: 1rem 1.1rem;
            border: 1px solid rgba(96, 165, 250, 0.25);
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
        }

        .onboarding-callout strong {
            color: #fcd34d;
            font-weight: 700;
        }

        .onboarding-callout em {
            color: rgba(224, 241, 255, 0.82);
            font-style: normal;
        }

        @media (max-width: 480px) {
            .modal-content {
                width: 92%;
                padding: 1.75rem 1.5rem;
            }
            .onboarding-header {
                gap: 0.75rem;
            }
            .onboarding-icon {
                width: 2.85rem;
                height: 2.85rem;
                font-size: 1.5rem;
                border-radius: 0.65rem;
            }
            .onboarding-title {
                font-size: 1.45rem;
            }
            .onboarding-body {
                font-size: 0.9rem;
            }
        }

        .btn-upgrade-header {
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1));
            border: 1px solid rgba(251, 191, 36, 0.45);
            color: #fcd34d;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.02em;
        }

        .btn-upgrade-header:hover {
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.35), rgba(245, 158, 11, 0.2));
            color: #fef3c7;
        }

        body.premium-active header {
            border-bottom: 1px solid rgba(250, 204, 21, 0.35);
            box-shadow: 0 15px 40px rgba(14, 116, 144, 0.28);
        }

        body.premium-active #app-container::before {
            content: '';
            position: fixed;
            inset: 0;
            pointer-events: none;
            background: radial-gradient(circle at 10% 20%, rgba(250, 204, 21, 0.15), transparent 40%),
                        radial-gradient(circle at 85% 15%, rgba(59, 130, 246, 0.18), transparent 45%),
                        radial-gradient(circle at 50% 80%, rgba(14, 116, 144, 0.12), transparent 50%);
            z-index: -1;
            opacity: 0.85;
            transition: opacity 0.3s ease;
        }

        body.premium-animations-paused #app-container::before {
            opacity: 0.45;
        }

        body.premium-animations-paused .premium-hero-orb,
        body.premium-animations-paused .premium-hero-ring {
            animation: none !important;
        }

        body.premium-animations-paused .premium-hero-ring {
            opacity: 0.3;
        }

        body.premium-animations-paused .premium-hero-orb {
            box-shadow: 0 0 20px rgba(148, 163, 184, 0.28);
        }

        body.premium-animations-paused .premium-hero-toggle {
            border-color: rgba(148, 163, 184, 0.55);
        }

        .user-avatar {
            width: 2.1rem;
            height: 2.1rem;
            border-radius: 0.75rem;
            background: linear-gradient(135deg, rgba(148, 163, 184, 0.25), rgba(96, 165, 250, 0.18));
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.95rem;
            font-weight: 600;
            color: #f9fafb;
            box-shadow: 0 12px 28px rgba(7, 13, 24, 0.45);
            border: 1px solid rgba(148, 163, 184, 0.35);
            position: relative;
            transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
        }

        .user-avatar::after {
            content: '\2699'; /* gear symbol */
            position: absolute;
            right: -0.45rem;
            bottom: -0.45rem;
            width: 1.05rem;
            height: 1.05rem;
            border-radius: 9999px;
            background: radial-gradient(circle at 30% 30%, rgba(148, 163, 184, 0.35), rgba(12, 24, 39, 0.95));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.55rem;
            color: rgba(224, 231, 255, 0.85);
            box-shadow: 0 8px 18px rgba(7, 13, 24, 0.55);
            opacity: 0;
            transform: scale(0.85);
            transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
            pointer-events: none;
        }

        .user-avatar[data-has-user="true"]::after {
            opacity: 1;
            transform: scale(1);
        }

        @media (max-width: 480px) {
            .user-avatar::after {
                right: -0.35rem;
                bottom: -0.35rem;
                width: 0.95rem;
                height: 0.95rem;
                font-size: 0.5rem;
            }
        }

        .avatar-toggle:hover .user-avatar[data-has-user="true"]::after {
            box-shadow: 0 12px 26px rgba(7, 13, 24, 0.6);
        }

        #subscription-info {
            display: flex;
            align-items: center;
            justify-content: flex-end;
        }

        .header-menu-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(8, 15, 26, 0.65);
            backdrop-filter: blur(10px);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.25s ease;
            z-index: 45;
        }

        .header-menu-backdrop.active {
            opacity: 1;
            pointer-events: auto;
        }

        /* Header menu positioning */
        .header-menu {
            position: fixed;
            top: calc(64px + env(safe-area-inset-top, 0px) + 8px);
            left: 50%;
            right: auto;
            bottom: auto;
            width: min(420px, 94vw);
            max-height: min(72vh, 520px);
            border-radius: 1.25rem;
            background: rgba(13, 27, 42, 0.96);
            backdrop-filter: blur(16px);
            border: 1px solid rgba(148, 163, 184, 0.14);
            box-shadow: 0 36px 72px rgba(8, 15, 26, 0.55);
            padding: 1.35rem clamp(1.15rem, 4vw, 1.75rem) 1.35rem;
            padding-bottom: calc(1.35rem + env(safe-area-inset-bottom, 0px));
            opacity: 0;
            pointer-events: none;
            transition: transform 0.26s ease, opacity 0.2s ease;
            z-index: 1000;
            overflow-y: auto;
            transform: translate(-50%, -18px);
            transform-origin: top center;
        }

        .header-menu.is-open {
            transform: translate(-50%, 0);
            opacity: 1;
            pointer-events: auto;
            visibility: visible;
        }

        .header-menu-panel {
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
            max-height: calc(100vh - 8rem);
            overflow-y: auto;
            padding-right: 0.25rem;
        }

        .header-menu-header {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .header-menu-avatar {
            width: 2.75rem;
            height: 2.75rem;
            border-radius: 0.85rem;
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(192, 132, 252, 0.14));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.35rem;
            box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
        }

        .header-menu-copy {
            display: flex;
            flex-direction: column;
            gap: 0.2rem;
        }

        .menu-greeting {
            font-size: 1rem;
            font-weight: 600;
            color: #e0f2fe;
        }

        .menu-identifier {
            font-size: 0.8rem;
            color: rgba(203, 213, 225, 0.75);
        }

        .header-menu-close {
            margin-left: auto;
            background: rgba(13, 27, 42, 0.55);
            border: 1px solid rgba(148, 163, 184, 0.2);
            border-radius: 0.65rem;
            padding: 0.4rem;
            display: inline-flex;
            color: rgba(224, 231, 255, 0.78);
        }

        .header-menu-close:hover {
            background: rgba(17, 36, 58, 0.85);
        }

        .header-menu-list {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .menu-item {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 0.9rem;
            padding: 0.85rem 1rem;
            border-radius: 0.9rem;
            background: rgba(17, 36, 58, 0.55);
            border: 1px solid transparent;
            text-align: left;
            transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
        }

        .menu-item:hover {
            transform: translateY(-1px);
            background: rgba(24, 46, 74, 0.85);
            border-color: rgba(96, 165, 250, 0.28);
            box-shadow: 0 12px 32px rgba(8, 15, 26, 0.45);
        }

        .menu-item:focus-visible {
            outline: none;
            border-color: rgba(96, 165, 250, 0.55);
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
        }

        .menu-item-icon {
            font-size: 1.15rem;
            width: 1.5rem;
            text-align: center;
            opacity: 0.9;
        }

        .menu-item-copy {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 0.15rem;
            line-height: 1.1;
        }

        .menu-item-label {
            font-size: 0.95rem;
            font-weight: 600;
            color: #f8fafc;
        }

        .menu-item-description {
            font-size: 0.75rem;
            color: rgba(203, 213, 225, 0.7);
        }

        .menu-item-trailing {
            font-size: 1.25rem;
            color: rgba(148, 163, 184, 0.4);
            transition: color 0.2s ease;
        }

        .menu-item:hover .menu-item-trailing {
            color: rgba(191, 219, 254, 0.75);
        }

        .menu-item-accent {
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(245, 158, 11, 0.1));
            border: 1px solid rgba(251, 191, 36, 0.45);
            box-shadow: 0 12px 40px rgba(253, 224, 71, 0.18);
        }

        .menu-item-accent:hover {
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.28), rgba(245, 158, 11, 0.18));
            border-color: rgba(253, 224, 71, 0.65);
        }

        .menu-item-destructive {
            margin-top: 0.25rem;
            background: rgba(55, 24, 26, 0.6);
            border: 1px solid rgba(248, 113, 113, 0.35);
            justify-content: flex-start;
        }

        .menu-item-destructive .menu-item-label {
            color: #fecaca;
        }

        .menu-item-destructive .menu-item-description {
            color: rgba(252, 165, 165, 0.75);
        }

        .menu-item-destructive:hover {
            background: rgba(127, 29, 29, 0.65);
            border-color: rgba(248, 113, 113, 0.55);
        }

        .header-menu-footer {
            border-top: 1px solid rgba(148, 163, 184, 0.18);
            padding-top: 0.75rem;
        }

        .menu-item-manage {
            background: rgba(22, 101, 52, 0.22);
            border: 1px solid rgba(134, 239, 172, 0.28);
            box-shadow: 0 12px 32px rgba(6, 24, 12, 0.35);
        }

        .menu-item-manage:hover {
            background: rgba(22, 101, 52, 0.32);
            border-color: rgba(134, 239, 172, 0.55);
        }

        .menu-item-manage .menu-item-label {
            color: #bbf7d0;
        }

        .menu-item-manage .menu-item-description {
            color: rgba(187, 247, 208, 0.75);
        }

        body.header-menu-open {
            overflow: hidden;
        }

        /* Desktop menu styling */
        @media (min-width: 640px) {
            .header-menu {
                top: calc(60px + env(safe-area-inset-top, 0px));
                right: clamp(16px, 5vw, 36px);
                left: auto;
                width: clamp(280px, 28vw, 320px);
                max-height: min(68vh, 520px);
                border-radius: 0.85rem;
                padding: 1.05rem clamp(1rem, 2.6vw, 1.35rem);
                padding-bottom: 1.05rem;
                transform: translateY(-14px);
                transform-origin: top right;
                box-shadow: 0 28px 54px rgba(8, 15, 26, 0.45);
            }
            
            .header-menu.is-open {
                transform: translateY(0);
                opacity: 1;
                pointer-events: auto;
                visibility: visible;
            }

            .header-menu-panel {
                padding-right: 0;
                gap: 0.75rem; /* Reduced gap for more compact appearance */
            }
            
            /* Make menu items more compact on desktop */
            .header-menu-list {
                gap: 0.35rem; /* Reduced gap between menu items */
            }
            
            .menu-item {
                padding: 0.5rem 0.75rem; /* Smaller padding for compact look */
            }

            .header-menu-close {
                display: none;
            }
        }

        .subscription-indicator {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            min-width: 0;
        }

        .subscription-chip {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.5rem 0.85rem;
            border-radius: 9999px;
            background: rgba(17, 34, 54, 0.7);
            border: 1px solid rgba(148, 163, 184, 0.24);
            box-shadow: 0 14px 32px rgba(7, 13, 24, 0.45);
        }

        .chip-icon {
            font-size: 0.95rem;
            filter: drop-shadow(0 0 6px rgba(96, 165, 250, 0.25));
        }

        .chip-metrics {
            display: flex;
            flex-direction: column;
            gap: 0.1rem;
            line-height: 1.05;
        }

        .chip-primary {
            font-size: 0.78rem;
            font-weight: 600;
            color: #d1d5db;
        }

        .chip-secondary {
            font-size: 0.7rem;
            color: rgba(203, 213, 225, 0.7);
        }

        .chip-alert {
            color: #fca5a5;
        }

        .premium-pill {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            padding: 0.45rem 0.85rem;
            border-radius: 9999px;
            background: linear-gradient(135deg, rgba(250, 204, 21, 0.16), rgba(59, 130, 246, 0.18));
            border: 1px solid rgba(250, 204, 21, 0.45);
            box-shadow: 0 10px 24px rgba(15, 23, 42, 0.35);
            color: #fef3c7;
            min-width: 8.5rem;
        }

        .premium-pill-icon {
            font-size: 1.15rem;
            filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.35));
        }

        .premium-pill-copy {
            display: flex;
            flex-direction: column;
            line-height: 1.05;
        }

        .premium-pill-label {
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.11em;
        }

        .premium-pill-subcopy {
            font-size: 0.62rem;
            color: rgba(248, 250, 252, 0.72);
            letter-spacing: 0.2em;
            text-transform: uppercase;
        }

        .premium-hero-toggle {
            align-self: flex-start;
            padding: 0.45rem 0.85rem;
            border-radius: 9999px;
            border: 1px solid rgba(148, 163, 184, 0.45);
            background: rgba(15, 23, 42, 0.55);
            color: rgba(226, 232, 240, 0.86);
            font-size: 0.7rem;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            font-weight: 700;
            transition: all 0.2s ease;
        }

        .premium-hero-toggle:hover,
        .premium-hero-toggle:focus-visible {
            border-color: rgba(209, 213, 219, 0.65);
            color: #f8fafc;
            outline: none;
            box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
        }

        .premium-hero-toggle[data-state="paused"] {
            border-color: rgba(250, 204, 21, 0.55);
            background: rgba(253, 224, 71, 0.12);
            color: #fef08a;
        }

        .premium-banner {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 1rem;
            background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(192, 132, 252, 0.18));
            border: 1px solid rgba(125, 211, 252, 0.35);
            box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
        }

        .premium-banner.locked {
            background: linear-gradient(135deg, rgba(247, 171, 10, 0.12), rgba(148, 163, 184, 0.12));
            border-color: rgba(251, 191, 36, 0.35);
        }

        .premium-banner .premium-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.35rem 0.85rem;
            border-radius: 9999px;
            background: rgba(12, 74, 110, 0.4);
            border: 1px solid rgba(56, 189, 248, 0.45);
            color: #38bdf8;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            font-size: 0.65rem;
        }

        .premium-banner.locked .premium-badge {
            background: rgba(120, 53, 15, 0.35);
            border-color: rgba(251, 191, 36, 0.4);
            color: #facc15;
        }

        .premium-badge--active {
            background: rgba(253, 224, 71, 0.18);
            border-color: rgba(253, 224, 71, 0.55);
            color: #fef9c3;
            box-shadow: 0 0 25px rgba(253, 224, 71, 0.25);
        }

        .premium-hero {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: clamp(1.5rem, 4vw, 3rem);
            width: 100%;
        }

        .premium-hero-copy {
            flex: 1 1 18rem;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .premium-hero-copy h3 {
            font-size: clamp(1.3rem, 3vw, 1.75rem);
            margin: 0;
        }

        .premium-hero-copy p {
            font-size: 0.95rem;
            color: rgba(226, 232, 240, 0.75);
            margin: 0;
        }

        .premium-hero-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .premium-hero-tags span {
            font-size: 0.65rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            padding: 0.4rem 0.7rem;
            border-radius: 9999px;
            background: rgba(59, 130, 246, 0.12);
            border: 1px solid rgba(147, 197, 253, 0.25);
            color: #bfdbfe;
            font-weight: 600;
        }

        .premium-hero-tags span:nth-child(2) {
            background: rgba(14, 116, 144, 0.14);
            border-color: rgba(103, 232, 249, 0.22);
            color: #99f6e4;
        }

        .premium-hero-tags span:nth-child(3) {
            background: rgba(192, 132, 252, 0.14);
            border-color: rgba(232, 121, 249, 0.22);
            color: #f5d0fe;
        }

        .premium-hero-art {
            position: relative;
            flex: 0 0 180px;
            height: 180px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: visible;
        }

        .premium-hero-art--locked {
            flex-direction: column;
            gap: 1rem;
        }

        .premium-hero-art--locked .premium-cta {
            width: 100%;
            max-width: 12rem;
            text-align: center;
        }

        @media (max-width: 640px) {
            .premium-pill {
                width: 100%;
                justify-content: center;
            }

            .premium-hero-art {
                flex: 1 1 100%;
                height: 140px;
            }

            .premium-hero {
                gap: 1.5rem;
            }

            .premium-hero-art--locked .premium-cta {
                align-self: center;
            }
        }

        .premium-hero-orb {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            background: radial-gradient(circle at 30% 30%, rgba(253, 224, 71, 0.9), rgba(251, 191, 36, 0.1));
            box-shadow: 0 0 35px rgba(253, 224, 71, 0.35), 0 0 60px rgba(59, 130, 246, 0.25);
            animation: premiumPulse 6s ease-in-out infinite;
        }

        .premium-hero-ring {
            position: absolute;
            border-radius: 50%;
            border: 1px solid rgba(148, 163, 184, 0.3);
            animation: premiumRotate 18s linear infinite;
        }

        .premium-hero-ring--outer {
            width: 170px;
            height: 170px;
        }

        .premium-hero-ring--inner {
            width: 145px;
            height: 145px;
            animation-direction: reverse;
        }

        .premium-hero--locked .premium-hero-ring,
        .premium-hero-art--locked .premium-hero-ring {
            border-color: rgba(148, 163, 184, 0.25);
        }

        .premium-hero-art--locked .premium-hero-orb {
            background: radial-gradient(circle at 30% 30%, rgba(148, 163, 184, 0.85), rgba(30, 41, 59, 0.6));
            box-shadow: 0 0 30px rgba(148, 163, 184, 0.3);
        }

        .premium-banner h3 {
            font-size: 1.25rem;
            font-weight: 700;
            color: #e2e8f0;
            margin: 0;
        }

        .premium-banner p {
            margin: 0;
            color: rgba(224, 229, 240, 0.78);
            font-size: 0.9rem;
        }

        .premium-banner .premium-cta {
            margin-left: auto;
        }

        .premium-insights-grid .premium-card {
            background: linear-gradient(160deg, rgba(13, 27, 42, 0.9), rgba(8, 18, 35, 0.78));
            border: 1px solid rgba(96, 165, 250, 0.18);
            box-shadow: 0 18px 42px rgba(9, 13, 26, 0.35);
        }

        .premium-insights-grid.locked {
            position: relative;
        }

        .premium-insights-grid.locked .premium-card {
            filter: blur(1px);
            opacity: 0.55;
            pointer-events: none;
        }

        .premium-lock-overlay {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            padding: 2rem 1.5rem;
            background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(17, 24, 39, 0.75));
            border-radius: 1rem;
            gap: 1rem;
            z-index: 5;
        }

        @keyframes premiumPulse {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.08); opacity: 0.88; }
        }

        @keyframes premiumRotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .premium-lock-overlay h4 {
            font-size: 1.2rem;
            font-weight: 700;
            color: #facc15;
        }

        .premium-lock-overlay p {
            color: rgba(226, 232, 240, 0.8);
            font-size: 0.95rem;
            max-width: 20rem;
        }

        .premium-card-header {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
        }

        .premium-card-title {
            font-size: 1rem;
            font-weight: 700;
            color: #cbd5f5;
        }

        .premium-card-meta {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: rgba(148, 163, 184, 0.85);
        }

        .premium-card-note {
            font-size: 0.85rem;
            color: rgba(203, 213, 225, 0.75);
        }

        .premium-momentum-bars {
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 0.75rem;
            align-items: end;
            min-height: 140px;
        }

        .premium-momentum-bar {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.35rem;
        }

        .premium-momentum-bar .premium-momentum-fill {
            width: 100%;
            border-radius: 0.75rem 0.75rem 0.35rem 0.35rem;
            background: linear-gradient(180deg, rgba(96, 165, 250, 0.65), rgba(30, 64, 175, 0.5));
            position: relative;
            box-shadow: 0 10px 20px rgba(30, 64, 175, 0.18);
            transition: height 0.4s ease, background 0.3s ease, box-shadow 0.3s ease;
        }

        .premium-momentum-bar.momentum-none .premium-momentum-fill {
            background: linear-gradient(180deg, rgba(71, 85, 105, 0.75), rgba(51, 65, 85, 0.55));
            box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
        }

        .premium-momentum-bar.momentum-low .premium-momentum-fill {
            background: linear-gradient(180deg, rgba(248, 113, 113, 0.92), rgba(220, 38, 38, 0.78));
            box-shadow: 0 12px 22px rgba(220, 38, 38, 0.32);
        }

        .premium-momentum-bar.momentum-mid .premium-momentum-fill {
            background: linear-gradient(180deg, rgba(251, 191, 36, 0.95), rgba(217, 119, 6, 0.78));
            box-shadow: 0 12px 22px rgba(217, 119, 6, 0.28);
        }

        .premium-momentum-bar.momentum-high .premium-momentum-fill {
            background: linear-gradient(120deg, rgba(16, 185, 129, 0.95), rgba(56, 189, 248, 0.7), rgba(16, 185, 129, 0.95));
            background-size: 220% 220%;
            animation: momentum-shimmer 2.4s linear infinite;
            box-shadow: 0 14px 26px rgba(16, 185, 129, 0.35);
        }

        @keyframes momentum-shimmer {
            0% {
                background-position: 0% 50%;
                filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0.0));
            }
            50% {
                background-position: 100% 50%;
                filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.25));
            }
            100% {
                background-position: 0% 50%;
                filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0.0));
            }
        }

        .premium-momentum-value {
            font-size: 0.75rem;
            color: rgba(148, 163, 184, 0.85);
            font-weight: 600;
        }

        .premium-momentum-bar.momentum-low .premium-momentum-value {
            color: rgba(248, 113, 113, 0.85);
        }

        .premium-momentum-bar.momentum-mid .premium-momentum-value {
            color: rgba(251, 191, 36, 0.85);
        }

        .premium-momentum-bar.momentum-high .premium-momentum-value {
            color: rgba(16, 185, 129, 0.95);
        }

        .premium-momentum-bar.momentum-none .premium-momentum-value {
            color: rgba(100, 116, 139, 0.55);
        }

        .premium-momentum-label {
            font-size: 0.7rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: rgba(148, 163, 184, 0.6);
        }

        .premium-category-item {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }

        .premium-category-header {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            font-size: 0.85rem;
            color: rgba(226, 232, 240, 0.85);
            font-weight: 600;
        }

        .premium-category-progress {
            position: relative;
            height: 0.65rem;
            border-radius: 9999px;
            background: rgba(15, 23, 42, 0.65);
            overflow: hidden;
            border: 1px solid rgba(59, 130, 246, 0.25);
        }

        .premium-category-progress::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            width: var(--progress, 0%);
            border-radius: inherit;
            background: linear-gradient(90deg, rgba(96, 165, 250, 0.95), rgba(129, 140, 248, 0.85));
            box-shadow: 0 8px 18px rgba(96, 165, 250, 0.3);
        }

        .premium-feedback-meter {
            width: 100%;
            height: 1.2rem;
            border-radius: 9999px;
            background: rgba(15, 23, 42, 0.65);
            border: 1px solid rgba(45, 212, 191, 0.3);
            overflow: hidden;
            position: relative;
        }

        .premium-feedback-meter-fill {
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            width: 0%;
            background: linear-gradient(90deg, rgba(45, 212, 191, 0.9), rgba(59, 130, 246, 0.85));
            box-shadow: 0 12px 30px rgba(59, 130, 246, 0.35);
            transition: width 0.4s ease;
        }

        .premium-feedback-meter-fill.low {
            background: linear-gradient(90deg, rgba(248, 113, 113, 0.9), rgba(251, 191, 36, 0.8));
            box-shadow: 0 12px 30px rgba(248, 113, 113, 0.35);
        }

        .premium-feedback-meter-fill.mid {
            background: linear-gradient(90deg, rgba(251, 191, 36, 0.9), rgba(56, 189, 248, 0.85));
            box-shadow: 0 12px 30px rgba(251, 191, 36, 0.35);
        }

        @media (max-width: 768px) {
            .premium-momentum-bars {
                gap: 0.5rem;
            }
            .premium-banner {
                align-items: flex-start;
            }
            .premium-banner .premium-cta {
                width: 100%;
                justify-content: center;
            }
        }

        @keyframes fade-in-scale { 0% { opacity: 0; transform: scale(0.9); } 100% { opacity: 1; transform: scale(1); } }
        .splash-content { animation: fade-in-scale 1.5s ease-in-out forwards; }
        
        @keyframes shimmer { 100% { transform: translateX(100%); } }
        .shimmer { position: relative; overflow: hidden; }
        .shimmer::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform: translateX(-100%); background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.5) 60%, rgba(255, 255, 255, 0)); animation: shimmer 2s infinite; }

        #user-answer-container { position: relative; }
        #user-answer-textarea, .auth-input {
            background-color: rgba(10, 20, 30, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: #E0E1DD;
            -webkit-text-fill-color: #E0E1DD;
            transition: border-color 0.3s, background-color 0.3s;
        }
        #user-answer-textarea:focus, .auth-input:focus {
            background-color: rgba(10, 20, 30, 0.8);
            border-color: #60a5fa;
            outline: none;
        }
        select.auth-input {
            min-width: 6rem;
            text-align-last: center;
            color: #E0E1DD;
            -webkit-text-fill-color: #E0E1DD;
            background-color: rgba(10, 20, 30, 0.8);
            padding-right: 2rem;
        }
        select.auth-input option {
            color: #111827;
        }
        #dictate-btn {
            position: absolute;
            bottom: 1rem;
            right: 1rem;
            background: #4A5568;
            border: none;
            border-radius: 9999px;
            width: 3rem;
            height: 3rem;
            font-size: 1.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease-out;
        }
        #dictate-btn:hover { background: #2D3748; }
        #dictate-btn.recording {
            background: #ef4444;
            animation: pulse 1.5s infinite;
        }
        @keyframes pulse {
            0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
            70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
            100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
        }

        .ai-feedback-panel .spinner {
            border-color: rgba(96, 165, 250, 0.2);
            border-left-color: #60a5fa;
            animation: spin 1s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }

        @keyframes high-five-pop {
            0% { transform: scale(0.5); opacity: 0; }
            60% { transform: scale(1.1); opacity: 1; }
            100% { transform: scale(1); opacity: 1; }
        }
        #high-five-modal .modal-content { animation: high-five-pop 0.5s ease-out forwards; }

        .feedback-bad { border-color: #ef4444 !important; }
        .feedback-bad .feedback-title { color: #f87171 !important; }
        .feedback-ok { border-color: #f59e0b !important; }
        .feedback-ok .feedback-title { color: #fbbf24 !important; }
        .feedback-good { border-color: #22c55e !important; }
        .feedback-good .feedback-title { color: #4ade80 !important; }

        .feedback-card {
            background: rgba(255, 255, 255, 0.05);
            border-left: 4px solid #9ca3af;
            padding: 1rem;
            border-radius: 0.5rem;
            margin-top: 1rem;
        }
        .feedback-card h4 {
            font-weight: bold;
            color: #cbd5e1;
            margin-bottom: 0.5rem;
        }
        .feedback-card p {
            color: #9ca3af;
            font-size: 0.9rem;
            line-height: 1.5;
        }
        .feedback-list {
            list-style-position: inside;
            padding-left: 0.5rem;
        }
        .feedback-list li {
            display: flex;
            align-items: flex-start;
            line-height: 1.5;
            margin-top: 0.5rem;
        }
        .feedback-list li::before {
            margin-right: 0.75rem;
            margin-top: 0.25rem;
            flex-shrink: 0;
        }
        .feedback-strength::before {
            content: '✅';
        }
        .feedback-improvement::before {
            content: '💡';
        }
        .breadcrumb {
            background-color: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 9999px;
            padding: 0.25rem 0.75rem;
            font-size: 0.75rem;
            font-weight: 500;
        }
        .achievement-unlocked {
            filter: none;
            opacity: 1;
        }
        .achievement-locked {
            filter: grayscale(100%) brightness(0.6);
            opacity: 0.7;
        }

        #feedback-button-container {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin-top: 1rem;
        }

        #feedback-button-container .btn {
            flex-grow: 1;
            padding: 0.75rem 1rem;
            font-size: 0.9rem;
        }
        
        /* OOCSS Header Button Styles */
        .btn-header {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.25rem;
            padding: 0.375rem 0.75rem;
            border-radius: 0.375rem;
            font-weight: 600;
            font-size: 0.75rem;
            transition: all 0.2s ease;
        }
        
        .btn-gray {
            background-color: rgba(75, 85, 99, 0.8);
            color: white;
        }
        
        .btn-gray:hover {
            background-color: rgb(75, 85, 99);
        }
        
        .btn-red {
            background-color: rgba(239, 68, 68, 0.8);
            color: white;
        }
        
        .btn-red:hover {
            background-color: rgb(239, 68, 68);
        }
        
        /* Button disabled states */
        button:disabled, 
        button.disabled {
            opacity: 0.6;
            cursor: not-allowed;
            pointer-events: none;
        }