        /* ============================================
           CSS RESET & BASE
           ============================================ */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            color: #1a1a1a;
            background: #f7f7f8;
            line-height: 1.6;
            overflow-x: hidden;
            width: 100%;
            max-width: 100%;
            margin: 0;
            padding: 0;
        }
        
        html {
            overflow-x: hidden;
            width: 100%;
            max-width: 100%;
        }
        
        /* ============================================
           CSS VARIABLES
           ============================================ */
        :root {
            /* Premium Blue Color System - Apple-inspired, unified palette */
            --french-blue: #3b82f6; /* Primary blue - softer, premium feel */
            --french-blue-dark: #2563eb; /* Darker shade for gradients and depth */
            --french-blue-light: #60a5fa; /* Lighter shade for highlights */
            --french-blue-rgb: 59, 130, 246; /* RGB values for rgba() usage */
            --french-blue-dark-rgb: 37, 99, 235; /* Darker RGB for rgba() */
            
            /* Refined opacity levels for premium feel */
            --blue-opacity-subtle: 0.08; /* Very subtle backgrounds */
            --blue-opacity-light: 0.12; /* Light backgrounds */
            --blue-opacity-medium: 0.15; /* Medium backgrounds */
            --blue-opacity-strong: 0.25; /* Strong backgrounds */
            --blue-opacity-border: 0.3; /* Border opacity */
            --blue-opacity-glow: 0.4; /* Glow effects */
            
            --ink: #1a1a1a;
            --ink-muted: #4b5563;
            --glass-blur: 14px; /* Match landing page exactly */
            --glass-sat: 120%; /* Match landing page exactly */
            --glass-tint: rgba(255, 255, 255, 0.55);
            --glass-border: rgba(255, 255, 255, 0.6);
            --leak-opacity: 0.6;
            --leak-color-blue: rgba(0, 86, 199, 0.18);
            --leak-color-orange: rgba(255, 107, 53, 0.12);
            --leak-color-pink: rgba(255, 99, 132, 0.12);
            --leak-color-yellow: rgba(255, 199, 0, 0.125);
        }
        
        /* ============================================
           NAVIGATION BAR
           ============================================ */
        .navbar {
            position: -webkit-sticky; /* Safari support */
            position: sticky;
            top: 0;
            left: 0;
            right: 0;
            z-index: 100;
            /* Glass Morphism Effect - Match landing page exactly */
            background: rgba(247, 247, 248, 0.75); /* Semi-transparent background */
            backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
            -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
            border-bottom: none !important;
            box-shadow: none;
            isolation: isolate;
            transform: translateZ(0);
            width: 100%;
            /* Ensure navbar stays intact during scrolling */
            will-change: transform;
        }
        
        @media (max-width: 768px) {
            .navbar {
                /* Glass Morphism Effect - Mobile - Match landing page exactly */
                background: rgba(247, 247, 248, 0.75); /* Semi-transparent background */
                backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
                -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
                border-bottom: none !important;
                box-shadow: none;
                /* Ensure navbar stays intact during scrolling on mobile */
                position: -webkit-sticky;
                position: sticky;
                top: 0;
                z-index: 100;
            }
        }
        
        .nav-container {
            width: 100%;
            padding: 14px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 24px;
            position: relative;
        }
        
        .nav-left {
            display: flex;
            align-items: center;
            gap: 24px;
            flex: 1;
        }
        
        .nav-center {
            display: none; /* Hide center positioning - streak counter moved to nav-right */
        }
        
        .nav-right {
            display: flex;
            align-items: center;
            gap: 8px; /* Uniform spacing between all elements */
            flex: 1;
            justify-content: flex-end;
        }
        
        /* Streak counter in nav-right on desktop (same as mobile) */
        .nav-right .streak-counter {
            order: 1;
            margin: 0;
        }
        
        /* FR and EN buttons - direct children of nav-right on desktop (flattened structure) */
        .nav-right .mode-flag-btn {
            order: 2; /* FR button */
            margin: 0;
        }
        
        .nav-right .mode-flag-btn[data-mode="english"] {
            order: 3; /* EN button */
        }
        
        /* Hide the mode-toggle container on desktop (buttons are now direct children) */
        .nav-right .mode-toggle {
            display: none;
        }
        
        /* Search - fourth in nav-right on desktop */
        .nav-right .search-container {
            order: 4;
            margin: 0;
        }
        
        /* Profile - fifth in nav-right on desktop */
        .nav-right .profile-menu-container {
            order: 5;
            margin: 0;
        }
        
        @media (max-width: 768px) {
            .nav-container {
                padding: 12px 16px; /* Standard mobile padding (16px like Apple/Google) */
                flex-wrap: nowrap;
                align-items: center;
                gap: 0; /* Remove gap, use individual margins for control */
                overflow: hidden;
            }
            
            .nav-center {
                display: none; /* Hide center positioning on mobile */
            }
            
            /* Show mobile streak counter, hide desktop one */
            .streak-counter-mobile {
                display: flex !important;
            }
            
            .nav-center .streak-counter {
                display: none !important; /* Hide desktop streak counter on mobile */
            }
            
            .nav-left {
                flex: 0 0 auto;
                margin-right: auto; /* Push everything else to right */
            }
            
            .nav-right {
                flex: 0 0 auto;
                gap: 4px; /* Reduced by 50% for mobile - tighter spacing */
                display: flex;
                align-items: center;
            }
            
            .logo {
                order: 1;
                text-align: left;
                font-size: 1.125rem !important; /* Mobile: 18px - ChatGPT style consistent sizing (15% smaller than desktop) */
                font-weight: 700;
                letter-spacing: 0.07em; /* Increased for better readability and elegance */
                line-height: 1.1;
                margin: 0;
                flex-shrink: 0; /* Prevent logo from shrinking when space is tight - matches landing page behavior */
            }
            
            /* Streak counter - first in nav-right on mobile */
            .nav-right .streak-counter-mobile {
                order: 1;
                margin: 0;
            }
            
            /* FR and EN buttons - direct children of nav-right (flattened structure) */
            .mode-flag-btn {
                order: 2; /* FR button */
                margin: 0;
            }
            
            .mode-flag-btn[data-mode="english"] {
                order: 3; /* EN button */
            }
            
            /* Hide the mode-toggle container on mobile (buttons are now direct children) */
            .mode-toggle {
                display: none;
            }
            
            /* Search - fourth in nav-right on mobile */
            .search-container {
                order: 4;
                width: auto;
                margin: 0;
                position: relative;
                flex-shrink: 0;
            }
            
            /* Profile - fifth in nav-right on mobile */
            .profile-menu-container {
                order: 5;
                margin: 0; /* Remove all margins, gap handles spacing */
            }
        }
        
        /* ============================================
           LOGO
           ============================================ */
        .logo {
            font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            font-size: clamp(1.25rem, 2.5vw, 1.625rem); /* Desktop: 20px-26px */
            font-weight: 700;
            letter-spacing: 0.07em; /* Increased for better readability and elegance */
            line-height: 1.1;
            text-decoration: none;
            display: inline-flex;
            gap: 6px;
            align-items: baseline;
            color: var(--ink);
            text-shadow: 
                0 1px 2px rgba(0, 0, 0, 0.04),
                0 0.5px 1px rgba(0, 0, 0, 0.02);
            transition: text-shadow 0.3s ease;
        }
        
        .logo:hover {
            text-shadow: 
                0 1.5px 3px rgba(0, 0, 0, 0.06),
                0 0.5px 1px rgba(0, 0, 0, 0.03);
        }
        
        .logo-better {
            color: var(--ink);
        }
        
        .logo-french {
            color: var(--ink);
        }
        
        .logo-h {
            color: var(--ink);
        }
        
        /* ============================================
           MODE TOGGLE (Modernized)
           ============================================ */
        .mode-toggle {
            display: flex;
            align-items: center;
            gap: 4px;
            margin-left: auto;
            margin-right: -8px; /* Pull closer to search bar (reduces gap from 24px to ~16px) */
        }
        
        .mode-switcher-flags {
            display: flex;
            gap: 2px;
            align-items: center;
        }
        
        .mode-flag-btn {
            /* Minimalist - text only, no background or border-radius */
            background: transparent;
            border: none;
            border-radius: 0; /* No border radius */
            padding: 8px 12px;
            font-size: 14px;
            font-weight: 500;
            line-height: 1.4;
            color: rgba(0, 0, 0, 0.5);
            cursor: pointer;
            transition: color 0.2s ease;
            position: relative;
            min-width: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1;
            /* Remove all focus rings */
            outline: none !important;
            box-shadow: none !important;
            -webkit-tap-highlight-color: transparent !important;
        }
        
        /* Active state - dark blue text only, no background */
        .mode-flag-btn.active {
            color: var(--french-blue); /* #2563eb - solid blue text */
            background: transparent !important; /* No background */
        }
        
        /* Unselected state - muted text */
        .mode-flag-btn:not(.active) {
            color: rgba(0, 0, 0, 0.4);
        }
        
        /* Hover on unselected - slight text darkening */
        .mode-flag-btn:hover:not(.active) {
            color: rgba(0, 0, 0, 0.6);
            background: transparent; /* No background on hover */
        }
        
        /* Hover on active - keep blue text, no background */
        .mode-flag-btn.active:hover {
            color: var(--french-blue); /* Keep blue text */
            background: transparent !important; /* No background on hover */
        }
        
        /* ============================================
           SEARCH (Modernized)
           ============================================ */
        .search-container {
            position: relative;
            display: flex;
            align-items: center;
        }
        
        .search-input {
            font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            font-size: 13px;
            line-height: 1.4;
            /* Remove browser default search input styling */
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            /* Desktop: Hidden by default, expands on icon click (same as mobile) */
            width: 0;
            padding: 0;
            border: none;
            background: transparent;
            opacity: 0;
            transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
            position: absolute;
            right: 50px;
            top: 50%;
            transform: translateY(-50%);
            border-radius: 20px;
            z-index: 10;
            box-sizing: border-box;
            text-align: left;
            box-shadow: none;
        }
        
        .search-input:not(.expanded) {
            transition: all 600ms cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        .search-input.expanded {
            width: 140px;
            padding: 6px 14px;
            opacity: 1;
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(15, 23, 42, 0.12);
            border-radius: 20px;
            color: rgba(0, 0, 0, 0.7);
        }
        
        /* Remove browser default search input clear button and icons */
        .search-input::-webkit-search-decoration,
        .search-input::-webkit-search-cancel-button,
        .search-input::-webkit-search-results-button,
        .search-input::-webkit-search-results-decoration {
            -webkit-appearance: none;
            appearance: none;
            display: none;
        }
        
        .search-input::-ms-clear,
        .search-input::-ms-reveal {
            display: none;
            width: 0;
            height: 0;
        }
        
        .search-input::placeholder {
            color: rgba(0, 0, 0, 0.4);
            text-align: center !important;
            opacity: 1;
        }
        
        /* Keep centered when showing placeholder and not focused */
        .search-input:not(:focus):placeholder-shown {
            text-align: center !important;
        }
        
        .search-input:not(:focus):placeholder-shown::placeholder {
            text-align: center !important;
        }
        
        /* Left align when focused or has value */
        .search-input:focus,
        .search-input:not(:placeholder-shown) {
            text-align: left;
        }
        
        .search-input:focus {
            outline: none !important;
            border-color: rgba(15, 23, 42, 0.15) !important; /* Keep original border color, no blue */
            box-shadow: none !important; /* Remove focus ring */
            width: 150px;
        }
        
        .search-input:focus::placeholder {
            text-align: left;
        }
        
        .search-icon {
            display: flex; /* Show search icon on desktop (same as mobile) */
            position: static;
            right: auto;
            color: rgba(0, 0, 0, 0.5);
            pointer-events: auto;
            cursor: pointer;
            width: auto;
            padding: 6px 10px;
            align-items: center;
            justify-content: center;
            background: transparent;
            border: none;
            border-radius: 6px;
            transition: color 0.2s ease, background-color 0.2s ease;
            min-width: 32px;
            -webkit-tap-highlight-color: transparent;
            outline: none;
        }
        
        .search-icon svg {
            width: 20px;
            height: 20px;
            display: block;
            flex-shrink: 0;
        }
        
        .search-icon:hover {
            color: rgba(0, 0, 0, 0.7);
            background: rgba(0, 0, 0, 0.03);
        }
        
        .search-icon.active {
            color: rgba(0, 0, 0, 0.9);
            background: rgba(0, 0, 0, 0.05);
        }
        
        /* ============================================
           PROFILE MENU
           ============================================ */
        .streak-counter {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 10px; /* Match mobile padding */
            background: transparent !important; /* Transparent background (same as mobile) */
            border-radius: 0; /* No border radius (same as mobile) */
            border: none !important;
            font-size: 13px; /* Match mobile font size */
            font-weight: 700;
            color: #ffffff;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: none !important; /* No shadow (same as mobile) */
            position: relative;
            overflow: hidden;
            margin: 0;
            line-height: 1.4; /* Match mobile line-height */
        }
        
        .streak-counter::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.6s ease;
        }
        
        .streak-counter:hover::before {
            left: 100%;
        }
        
        .streak-counter:hover {
            transform: translateY(-2px) scale(1.05);
            box-shadow: 0 4px 16px rgba(255, 107, 53, 0.35), 0 2px 6px rgba(0, 0, 0, 0.15);
        }
        
        .streak-counter:active {
            transform: translateY(0) scale(1);
        }
        
        .streak-icon {
            font-size: 20px;
            animation: flamePulse 2s ease-in-out infinite;
        }
        
        @keyframes flamePulse {
            0%, 100% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.1);
            }
        }
        
        .streak-text {
            white-space: nowrap;
            letter-spacing: -0.01em;
        }
        
        .streak-days {
            color: #ff6b35 !important; /* Orange color (same as mobile) - default active state */
            font-weight: 800;
            transition: color 0.3s ease, opacity 0.3s ease;
        }
        
        /* Streak visual states (Duolingo-style) */
        .streak-counter.streak-active .streak-days {
            color: #ff6b35 !important; /* Orange - completed today */
            opacity: 1;
        }
        
        .streak-counter.streak-inactive .streak-days {
            color: rgba(0, 0, 0, 0.4) !important; /* Grey - not completed today (at risk) */
            opacity: 0.6; /* Slightly faded to show it's at risk */
        }
        
        .streak-counter.streak-broken .streak-days {
            color: rgba(0, 0, 0, 0.4) !important; /* Grey - no streak */
            opacity: 0.5;
        }
        
        .streak-counter.streak-inactive .streak-icon,
        .streak-counter.streak-broken .streak-icon {
            opacity: 0.5; /* Fade flame icon when inactive/broken */
        }
        
        /* Desktop streak icon size */
        .streak-icon {
            font-size: 16px; /* Match mobile icon size */
            transition: opacity 0.3s ease;
        }
        
        @media (max-width: 768px) {
            .streak-counter {
                font-size: 13px;
                padding: 6px 10px; /* Match mode-flag-btn padding exactly */
                gap: 6px;
                border-radius: 0; /* Remove border radius - square corners */
                height: auto; /* Let content determine height */
                line-height: 1.4; /* Match mode-flag-btn line-height */
                background: transparent !important; /* Remove gradient background */
                border: none !important; /* Remove border */
                box-shadow: none !important; /* Remove shadow */
            }
            
            .streak-icon {
                font-size: 16px; /* Slightly smaller to match button proportions */
                transition: opacity 0.3s ease;
            }
            
            .streak-days {
                color: #ff6b35 !important; /* Orange color for number - default active state */
                transition: color 0.3s ease, opacity 0.3s ease;
            }
            
            /* Streak visual states (mobile) */
            .streak-counter.streak-active .streak-days {
                color: #ff6b35 !important; /* Orange - completed today */
                opacity: 1;
            }
            
            .streak-counter.streak-inactive .streak-days {
                color: rgba(0, 0, 0, 0.4) !important; /* Grey - not completed today (at risk) */
                opacity: 0.6;
            }
            
            .streak-counter.streak-broken .streak-days {
                color: rgba(0, 0, 0, 0.4) !important; /* Grey - no streak */
                opacity: 0.5;
            }
            
            .streak-counter.streak-inactive .streak-icon,
            .streak-counter.streak-broken .streak-icon {
                opacity: 0.5; /* Fade flame icon when inactive/broken */
            }
        }
        
        /* Streak Calendar Modal */
        .streak-calendar-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(8px);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            padding: 20px;
            animation: fadeIn 0.3s ease;
        }
        
        .streak-calendar-modal.open {
            display: flex;
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }
        
        .streak-calendar-content {
            background: #ffffff;
            border-radius: 20px;
            padding: 32px;
            max-width: 600px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .streak-calendar-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 24px;
        }
        
        .streak-calendar-title {
            font-size: 24px;
            font-weight: 700;
            color: var(--ink);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .streak-calendar-close {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: rgba(0, 0, 0, 0.5);
            padding: 4px;
            line-height: 1;
            transition: color 0.2s;
        }
        
        .streak-calendar-close:hover {
            color: var(--ink);
        }
        
        .streak-calendar-stats {
            display: flex;
            gap: 24px;
            margin-bottom: 24px;
            padding: 20px;
            background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(247, 147, 30, 0.1) 100%);
            border-radius: 16px;
        }
        
        .streak-stat {
            flex: 1;
        }
        
        .streak-stat-label {
            font-size: 13px;
            color: rgba(0, 0, 0, 0.6);
            margin-bottom: 4px;
            font-weight: 500;
        }
        
        .streak-stat-value {
            font-size: 24px;
            font-weight: 700;
            color: var(--ink);
        }
        
        .streak-calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 8px;
            margin-bottom: 16px;
        }
        
        .streak-calendar-day-label {
            text-align: center;
            font-size: 12px;
            font-weight: 600;
            color: rgba(0, 0, 0, 0.5);
            padding: 8px 4px;
        }
        
        .streak-calendar-day {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
        }
        
        .streak-calendar-day.empty {
            background: rgba(0, 0, 0, 0.03);
            color: rgba(0, 0, 0, 0.3);
        }
        
        .streak-calendar-day.completed {
            background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
            color: #ffffff;
            font-weight: 600;
        }
        
        .streak-calendar-day.today {
            border: 2px solid #ff6b35;
        }
        
        .streak-calendar-day:hover:not(.empty) {
            transform: scale(1.1);
        }
        
        .streak-calendar-legend {
            display: flex;
            gap: 16px;
            justify-content: center;
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid rgba(0, 0, 0, 0.1);
        }
        
        .streak-legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            color: rgba(0, 0, 0, 0.7);
        }
        
        .streak-legend-color {
            width: 16px;
            height: 16px;
            border-radius: 4px;
        }
        
        .streak-legend-color.completed {
            background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
        }
        
        .streak-legend-color.empty {
            background: rgba(0, 0, 0, 0.03);
        }
        
        @media (max-width: 768px) {
            .streak-calendar-content {
                padding: 24px;
                max-width: 95%;
            }
            
            .streak-calendar-title {
                font-size: 20px;
            }
            
            .streak-calendar-stats {
                flex-direction: column;
                gap: 16px;
            }
        }
        
        /* Streak Celebration Toast - Centered on Screen */
        .streak-celebration {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.9);
            opacity: 0;
            z-index: 10000;
            pointer-events: none;
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            width: 100%;
            max-width: 400px;
        }
        
        .streak-celebration.show {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
            pointer-events: auto;
        }
        
        .streak-celebration-backdrop {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.3);
            backdrop-filter: blur(4px);
            z-index: 9999;
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }
        
        .streak-celebration-backdrop.show {
            opacity: 1;
            pointer-events: auto;
        }
        
        .streak-celebration-content {
            background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
            border-radius: 20px;
            padding: 24px 28px 26px 28px; /* Slightly more bottom padding for visual balance */
            display: flex;
            align-items: center;
            gap: 18px;
            box-shadow: 0 12px 32px rgba(255, 107, 53, 0.4), 0 8px 16px rgba(0, 0, 0, 0.2);
            border: 2px solid rgba(255, 255, 255, 0.3);
            position: relative;
        }
        
        .streak-celebration-close {
            position: absolute;
            top: 12px;
            right: 12px;
            background: rgba(255, 255, 255, 0.2);
            border: none;
            border-radius: 50%;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: #ffffff;
            font-size: 18px;
            line-height: 1;
            transition: all 0.2s ease;
            opacity: 0.8;
        }
        
        .streak-celebration-close:hover {
            background: rgba(255, 255, 255, 0.3);
            opacity: 1;
            transform: scale(1.1);
        }
        
        .streak-celebration-close:active {
            transform: scale(0.95);
        }
        
        .streak-celebration-icon {
            font-size: 32px;
            animation: celebrationPulse 1s ease-in-out infinite;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        @keyframes celebrationPulse {
            0%, 100% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.2) rotate(5deg);
            }
        }
        
        .streak-celebration-text {
            flex: 1;
            color: #ffffff;
            display: flex;
            flex-direction: column;
            justify-content: center;
            line-height: 1.4;
        }
        
        .streak-celebration-title {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 6px; /* Increased from 4px for better spacing */
            line-height: 1.2;
        }
        
        .streak-celebration-subtitle {
                font-size: 14px;
            opacity: 0.95;
            line-height: 1.3;
        }
        
        .streak-celebration-subtitle strong {
            font-weight: 800;
            font-size: 16px;
        }
        
        /* Streak Counter Update Animation */
        .streak-counter.streak-update-animation {
            animation: streakCounterPulse 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        @keyframes streakCounterPulse {
            0% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.3);
            }
            100% {
                transform: scale(1);
            }
        }
        
        @media (max-width: 768px) {
            .streak-celebration {
                max-width: 85%;
            }
            
            .streak-celebration-content {
                padding: 20px 24px 22px 24px; /* Proportional: slightly more bottom padding on mobile too */
            }
            
            .streak-celebration-icon {
                font-size: 28px;
            }
            
            .streak-celebration-title {
                font-size: 16px;
                margin-bottom: 5px; /* Proportional spacing on mobile */
            }
            
            .streak-celebration-subtitle {
                font-size: 13px;
            }
        }
        
        .profile-menu-container {
            position: relative;
            margin-left: -12px; /* Pull closer to search bar to compensate for profile button padding */
        }
        
        .profile-btn {
            background: transparent;
            border: none;
            border-radius: 8px;
            padding: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: rgba(0, 0, 0, 0.6);
            transition: all 0.2s ease;
            outline: none;
        }
        
        .profile-btn:hover {
            background: rgba(0, 0, 0, 0.05);
            color: rgba(0, 0, 0, 0.8);
        }
        
        .profile-btn[aria-expanded="true"] {
            background: rgba(0, 0, 0, 0.08);
            color: rgba(0, 0, 0, 0.9);
        }
        
        .profile-icon {
            width: 20px;
            height: 20px;
        }
        
        .profile-dropdown {
            position: fixed;
            z-index: 9999;
            /* Default position - JS will set top/right dynamically */
            top: 0;
            right: 0;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px) saturate(180%);
            -webkit-backdrop-filter: blur(20px) saturate(180%);
            border: 1px solid rgba(255, 255, 255, 0.6);
            border-radius: 16px;
            box-shadow: 
                0 8px 32px rgba(0, 0, 0, 0.12),
                0 2px 8px rgba(0, 0, 0, 0.08),
                0 0 20px rgba(10, 102, 255, 0.1);
            padding: 12px;
            min-width: 200px;
            opacity: 0;
            pointer-events: none;
            transform: scale(0.98) translateY(-6px);
            transform-origin: top right;
            transition: 
                opacity 150ms ease,
                transform 150ms ease;
        }
        
        .profile-dropdown.visible {
            opacity: 1;
            pointer-events: auto;
            transform: scale(1) translateY(0);
        }
        
        .profile-dropdown-header {
            padding: 8px 12px;
        }
        
        .profile-info {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        
        .profile-name {
            font-size: 0.9375rem;
            font-weight: 500;
            color: var(--ink);
        }
        
        .profile-plan {
            font-size: 0.8125rem;
            font-weight: 400;
            color: var(--ink-muted);
            text-transform: capitalize;
        }
        
        .profile-language {
            font-size: 0.8125rem;
            font-weight: 400;
            color: var(--ink-muted);
            text-transform: capitalize;
            margin-top: 2px;
        }
        
        .profile-dropdown-divider {
            height: 1px;
            background: rgba(15, 23, 42, 0.1);
            margin: 8px 12px;
        }
        
        .profile-dropdown-item {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            border: none;
            background: transparent;
            border-radius: 12px;
            font-family: inherit;
            font-size: 0.9375rem;
            font-weight: 500;
            color: var(--ink);
            cursor: pointer;
            transition: background-color 200ms ease;
            text-align: left;
        }
        
        /* Sign out button - smaller, more subtle like plan text */
        #logout-btn {
            font-size: 0.8125rem; /* 13px - matches plan text size */
            font-weight: 400; /* Lighter weight like plan text */
            color: var(--ink-muted); /* Muted color like plan text */
            padding: 10px 12px; /* Match profile name left padding */
            width: auto; /* Fit content, not full width */
            min-width: fit-content;
            align-self: flex-start; /* Align to left */
        }
        
        #logout-btn:hover {
            color: var(--ink); /* Darker on hover */
        }
        
        .profile-dropdown-item:hover {
            background-color: rgba(37, 99, 235, 0.08);
        }
        
        .profile-dropdown-item svg {
            flex-shrink: 0;
            color: var(--ink-muted);
        }
        
        .profile-dropdown-item:hover svg {
            color: var(--ink);
        }
        
        .profile-dropdown-section {
            padding: 12px 12px;
        }
        
        .profile-dropdown-label {
            font-size: 0.9375rem;
            font-weight: 600;
            color: var(--ink);
            margin-bottom: 12px;
        }
        
        .read-lang-buttons,
        .explanation-lang-buttons {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        
        .read-lang-btn,
        .explanation-lang-btn {
            width: auto;
            min-width: fit-content;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 8px 6px;
            background: transparent;
            border: 1px solid rgba(15, 23, 42, 0.1);
            border-radius: 8px;
            font-size: 0.8125rem;
            font-weight: 400;
            color: var(--ink-muted);
            text-transform: capitalize;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: center;
        }
        
        .read-lang-btn:hover,
        .explanation-lang-btn:hover {
            background-color: rgba(37, 99, 235, 0.05);
            border-color: rgba(37, 99, 235, 0.2);
        }
        
        .read-lang-btn.selected,
        .explanation-lang-btn.selected {
            background-color: rgba(37, 99, 235, 0.1);
            border-color: var(--french-blue);
            font-weight: 500;
        }
        
        
        @media (max-width: 768px) {
            /* Profile menu container spacing handled by nav-right gap */
            
            .profile-btn {
                padding: 6px 10px; /* Match search-icon and mode-flag-btn padding for visual consistency */
            }
            
            .profile-icon {
                width: 18px;
                height: 18px;
            }
            
            .profile-dropdown {
                min-width: 180px;
                z-index: 9999;
            }
            
            .search-container {
                position: relative;
            }
            
            .search-input {
                width: 0;
                padding: 0;
                border: none;
                background: transparent;
                opacity: 0;
                transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
                position: absolute;
                right: 50px; /* Adjusted to prevent overlap with magnifying glass */
                top: 50%;
                transform: translateY(-50%);
                font-size: 13px;
                border-radius: 20px; /* Pill-shaped from the start */
                z-index: 10;
            }
            
            .search-input:not(.expanded) {
                transition: all 600ms cubic-bezier(0.16, 1, 0.3, 1);
            }
            
            .search-input.expanded {
                width: 140px; /* Reduced from 200px - smaller and more compact */
                padding: 6px 14px; /* Reduced vertical padding, increased horizontal for better text proportion */
                opacity: 1;
                background: rgba(255, 255, 255, 0.9); /* Light background for visibility */
                border: 1px solid rgba(15, 23, 42, 0.12); /* Subtle border */
                border-radius: 20px; /* More elliptical/pill-shaped (was 6px - too square) */
                box-shadow: none;
                font-size: 13px; /* Slightly smaller font to match field size */
                color: rgba(0, 0, 0, 0.7);
                right: 50px; /* Move further right to avoid overlap with magnifying glass */
            }
            
            .search-icon {
                display: flex;
                position: static;
                right: auto;
                color: rgba(0, 0, 0, 0.5);
                pointer-events: auto;
                cursor: pointer;
                width: auto;
                padding: 6px 10px;
                align-items: center;
                justify-content: center;
                background: transparent;
                border: none;
                border-radius: 6px;
                transition: color 0.2s ease, background-color 0.2s ease;
                min-width: 32px;
                /* Remove all mobile tap highlights and focus rings */
                -webkit-tap-highlight-color: transparent !important;
                -webkit-focus-ring-color: transparent !important;
                user-select: none;
                -webkit-user-select: none;
                /* Completely remove any outline or border */
                outline: none !important;
                outline-offset: 0 !important;
                box-shadow: none !important;
            }
            
            .search-icon svg {
                width: 20px;
                height: 20px;
                display: block;
                flex-shrink: 0;
            }
            
            .search-icon:hover {
                color: rgba(0, 0, 0, 0.7);
                background: rgba(0, 0, 0, 0.03);
            }
            
            .search-icon.active {
                color: rgba(0, 0, 0, 0.9);
                background: rgba(0, 0, 0, 0.05);
            }
            
            .search-icon:focus {
                outline: none !important;
                outline-offset: 0 !important;
                box-shadow: none !important;
                border: none !important;
                -webkit-tap-highlight-color: transparent !important;
            }
            
            .search-icon:focus-visible {
                outline: none !important;
                outline-offset: 0 !important;
                box-shadow: none !important;
                border: none !important;
                -webkit-tap-highlight-color: transparent !important;
            }
            
            .search-icon:active {
                outline: none !important;
                outline-offset: 0 !important;
                box-shadow: none !important;
                border: none !important;
                background: rgba(0, 0, 0, 0.03);
                -webkit-tap-highlight-color: transparent !important;
            }
            
            .search-icon:focus-within {
                outline: none !important;
                outline-offset: 0 !important;
                box-shadow: none !important;
            }
            
            /* Remove all focus rings - text color change is enough for visual feedback */
            .mode-flag-btn:focus {
                outline: none !important;
                box-shadow: none !important;
            }
            
            .mode-flag-btn:focus-visible {
                outline: none !important;
                box-shadow: none !important;
            }
            
            .mode-flag-btn:active {
                outline: none !important;
                box-shadow: none !important;
            }
            
            .search-input:focus {
                outline: none !important;
                box-shadow: none !important;
            }
            
            .search-input:focus-visible {
                outline: none !important;
                box-shadow: none !important;
            }
            
            .mode-flag-btn {
                min-width: 32px;
                padding: 6px 10px;
                font-size: 13px;
                line-height: 1.4;
            }
            
            .mode-toggle {
                margin-left: auto; /* Push language buttons and everything after them to the right */
            }
        }
        
        /* ============================================
           MAIN CONTENT
           ============================================ */
        .main-content {
            max-width: 1024px;
            margin: 0 auto;
            padding: 40px 24px;
        }
        
        @media (max-width: 768px) {
            .main-content {
                padding: 32px 16px;
            }
            
            /* Match main-content mobile padding for skeleton */
            .loading {
                padding: 15px 16px !important; /* Reduced top padding for skeleton on mobile */
            }
        }
        
        .content-container {
            display: flex;
            flex-direction: column;
            gap: 32px;
        }
        
        /* ============================================
           SEARCH STATES
           ============================================ */
        .loading-state,
        .no-results {
            text-align: center;
            padding: 60px 24px;
            color: var(--ink-muted);
            font-size: 16px;
            line-height: 1.6;
        }
        
        .loading-state {
            color: var(--french-blue);
        }
        
        .no-results {
            color: var(--ink-muted);
        }
        
        /* ============================================
           ARTICLE CARDS (Glass Morphism)
           ============================================ */
        .articles-list {
            display: flex;
            flex-direction: column;
            gap: 32px;
        }
        
        .article-card {
            background: #ffffff;
            backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
            -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
            border: 1px solid rgba(15, 42, 107, 0.2);
            border-radius: 20px;
            padding: 40px 32px 35px 32px; /* top, right, bottom, left */
            box-shadow: 
                0 2.5px 5.5px rgba(15, 23, 42, 0.09),
                0 8px 18px rgba(15, 23, 42, 0.07),
                0 14px 32px rgba(15, 23, 42, 0.05);
            transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                        box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                        border-color 0.5s ease,
                        padding-top 0.3s ease; /* Smooth transition for padding change */
            position: relative;
            overflow: hidden;
            isolation: isolate;
            transform: translateY(-1px) scale(1.003);
            backface-visibility: hidden;
        }
        
        /* Reduce top padding when any game is active (Quiz, VocaMatch, or Breakdown) */
        .article-card:has(.bf-quiz-link.open),
        .article-card:has(.bf-match-game-link.open),
        .article-card:has(.bf-breakdown-link.open) {
            padding-top: 24px; /* Reduced from 40px when games are active */
        }
        
        .article-card::before {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: 20px;
            /* Very subtle texture - ChatGPT style */
            background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncA type='table' tableValues='0 0 .015 .03'/></feComponentTransfer></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>") repeat;
            opacity: 0.3;
            mix-blend-mode: soft-light;
            pointer-events: none;
            z-index: 0;
            clip-path: inset(0 round 20px);
            -webkit-clip-path: inset(0 round 20px);
            overflow: hidden;
        }
        
        .article-card::after {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            transform: translateZ(0);
            isolation: isolate;
            backface-visibility: hidden;
            border-radius: 20px;
            /* No color - pure white card */
            opacity: 0;
            pointer-events: none;
            z-index: 0;
            mix-blend-mode: normal;
            transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        .article-card:hover {
            transform: translateY(-1px) scale(1.003);
            box-shadow: 
                0 2.5px 5.5px rgba(0, 0, 0, 0.08),
                0 8px 18px rgba(0, 0, 0, 0.06),
                0 14px 32px rgba(0, 0, 0, 0.04);
            border-color: rgba(0, 0, 0, 0.08);
        }
        
        .article-card:hover::after {
            opacity: 0;
        }
        
        .article-card > * {
            position: relative;
            z-index: 1;
        }
        
        /* Article Content Styles */
        .article-title {
            font-size: 22px !important;
            font-weight: 550;
            color: var(--ink);
            margin-top: 0;
            margin-bottom: 11px;
            padding-top: 0;
            line-height: 1.5;
            cursor: pointer;
            /* Smooth transition for hiding/showing */
            transition: opacity 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                        max-height 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                        margin-top 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                        margin-bottom 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
            overflow: hidden;
            max-height: 200px; /* Initial max-height for smooth transition */
        }
        
        /* Hide simplified title when breakdown or match game is open (mobile and desktop) */
        .article-card:has(.bf-breakdown-link.open) .article-title,
        .article-card:has(.bf-match-game-link.open) .article-title,
        .article-card:has(.bf-quiz-link.open) .article-title,
        .article-title.hidden-by-breakdown {
            opacity: 0;
            max-height: 0;
            margin-top: 0;
            margin-bottom: 0;
        }
        
        .summary-text {
            font-size: 16px !important;
            color: rgba(0, 0, 0, 0.85);
            line-height: 1.6;
            margin: 0;
            padding-left: 0;
            padding-right: 0;
            font-weight: 400;
            text-align: justify;
            text-justify: inter-word;
            /* Default to open state */
            opacity: 1;
            margin-top: 4px;
            overflow: hidden;
            /* Slower, smoother transition to match breakdown panel */
            transition: max-height 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                        opacity 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                        margin-top 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
        
        .summary-text:not(.expanded) {
            opacity: 0;
            max-height: 0;
            margin-top: 0;
        }
        
        .summary-text.expanded {
            opacity: 1;
            max-height: 1000px;
            margin-top: 5px; /* Increased by 20% from 4px (4 * 1.2 = 4.8px ≈ 5px) */
        }
        
        .secondary-title {
            margin-top: 36px; /* Space between primary title and original title */
            margin-bottom: 15px !important;
        }
        
        /* Remove summary margin-top when it follows secondary-title to achieve even spacing */
        .secondary-title + .summary-text.expanded {
            margin-top: 0 !important; /* Remove margin-top so spacing is controlled by secondary-title margin-bottom only */
        }
        
        .summary-text.expanded + .article-quiz {
            margin-top: 16px; /* Space between summary and quiz */
        }
        
        /* When quiz is hidden/collapsed (display:none), add spacing between summary and breakdown-meta-container */
        .summary-text.expanded + .breakdown-meta-container {
            margin-top: 10px; /* Spacing when quiz is hidden */
        }
        
        /* Force spacing when quiz is hidden - higher specificity */
        .article-quiz[style*="display: none"] + .breakdown-meta-container {
            margin-top: 10px !important; /* Spacing when quiz is hidden */
        }
        
        /* When quiz is visible, remove the extra spacing (quiz handles it) */
        .summary-text.expanded + .article-quiz:not([style*="display: none"]) + .breakdown-meta-container {
            margin-top: 0; /* Quiz already provides spacing */
        }
        
        /* Quiz Section Styles - Seamlessly Integrated Design */
        .article-quiz {
            margin-top: 0;
            margin-bottom: 0;
            padding-top: 0;
            padding-bottom: 0;
            padding-left: 0;
            padding-right: 0;
            background: transparent;
            border: none;
            border-top: 1px solid transparent; /* Hidden by default */
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                        margin-top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                        padding-top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                        border-top-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .article-quiz.open {
            max-height: 5000px; /* Large enough for quiz content */
            opacity: 1;
            margin-top: 8px; /* Match VocaMatch/Breakdown panel spacing */
            padding-top: 8px; /* Reduced by 30% (was 12px) - compact spacing */
            padding-bottom: 24px; /* Bottom padding */
            padding-right: 4px; /* Add right padding to prevent progress indicator from being clipped */
            border-top: none !important; /* Remove top border line */
        }
        
        .article-quiz .quiz-container {
            padding-top: 0;
            border-radius: 0;
            box-shadow: none;
            position: relative;
        }
        
        /* Quiz Progress Header - Compact progress + question counter below question */
        .quiz-progress-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin-top: 16px;
            margin-bottom: 20px;
        }
        
        .quiz-progress {
            flex: 1;
            position: relative;
            margin: 0;
        }
        
        .quiz-subtitle {
            font-size: 14px !important; /* Smaller, secondary text */
            font-weight: 500 !important; /* Medium weight */
            color: var(--ink-muted) !important; /* Muted color */
            margin: 0;
            white-space: nowrap;
            line-height: 1.4;
        }
        
        /* Legacy quiz-header (no longer used but kept for compatibility) */
        .quiz-header {
            margin-bottom: 8px;
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 16px;
        }
        
        .quiz-title {
            font-size: 18px;
            font-weight: 500;
            color: var(--ink);
            margin: 0;
            letter-spacing: -0.01em;
            line-height: 1.4;
        }
        
        .quiz-progress-bar-container {
            width: 100%;
            height: 7px; /* Desktop height */
            margin: 0 4px; /* 4px margin on left and right */
            background: linear-gradient(90deg, 
                rgba(0, 0, 0, 0.04) 0%,
                rgba(0, 0, 0, 0.08) 50%,
                rgba(0, 0, 0, 0.04) 100%);
            background-size: 200% 100%;
            border-radius: 100px;
            overflow: hidden;
            position: relative;
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
            animation: containerIdleShimmer 3s ease-in-out infinite;
        }
        
        /* Duolingo-style idle animation - subtle shimmer on empty container */
        @keyframes containerIdleShimmer {
            0%, 100% {
                background-position: 0% 0;
                box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05),
                            0 0 0 rgba(37, 99, 235, 0);
            }
            50% {
                background-position: 100% 0;
                box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05),
                            0 0 8px rgba(37, 99, 235, 0.1);
            }
        }
        
        /* Subtle pulse effect on container to draw attention */
        .quiz-progress-bar-container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg,
                transparent 0%,
                rgba(37, 99, 235, 0.05) 30%,
                rgba(37, 99, 235, 0.1) 50%,
                rgba(37, 99, 235, 0.05) 70%,
                transparent 100%);
            background-size: 200% 100%;
            border-radius: 100px;
            animation: containerPulse 2.5s ease-in-out infinite;
            opacity: 0;
        }
        
        @keyframes containerPulse {
            0%, 100% {
                opacity: 0;
                background-position: -100% 0;
            }
            50% {
                opacity: 1;
                background-position: 200% 0;
            }
        }
        
        /* When progress bar has content, reduce container animation */
        .quiz-progress-bar-container.has-progress {
            animation: none;
        }
        
        .quiz-progress-bar-container.has-progress::before {
            animation: none;
            opacity: 0;
        }
        
        .quiz-progress-bar {
            height: 100%;
            background: linear-gradient(90deg, 
                #2563eb 0%, 
                #3b82f6 25%, 
                #60a5fa 50%, 
                #3b82f6 75%, 
                #2563eb 100%);
            background-size: 200% 100%;
            border-radius: 100px;
            transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1); /* Slowed down by 50% (0.6s -> 1.2s) for sleek feel */
            position: relative;
            overflow: hidden;
            box-shadow: 0 0 10px rgba(37, 99, 235, 0.3),
                        0 0 20px rgba(37, 99, 235, 0.15),
                        inset 0 1px 0 rgba(255, 255, 255, 0.2);
            animation: progressShimmer 2s ease-in-out infinite;
        }
        
        /* Initial state: progress bar starts at 12% to show it's waiting to be filled */
        /* The shimmer and container animations provide the "living" effect */
        
        /* Shimmer animation for progress bar */
        @keyframes progressShimmer {
            0% {
                background-position: 200% 0;
            }
            100% {
                background-position: -200% 0;
            }
        }
        
        /* Glow effect that intensifies as progress increases */
        .quiz-progress-bar::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, 
                transparent 0%, 
                rgba(255, 255, 255, 0.3) 50%, 
                transparent 100%);
            border-radius: 100px;
            animation: progressGlow 1.5s ease-in-out infinite;
        }
        
        @keyframes progressGlow {
            0%, 100% {
                opacity: 0.3;
            }
            50% {
                opacity: 0.6;
            }
        }
        
        /* Pulse effect on progress updates */
        .quiz-progress-bar.progress-update {
            animation: progressShimmer 2s ease-in-out infinite,
                       progressPulse 0.5s ease-out;
        }
        
        @keyframes progressPulse {
            0% {
                transform: scaleY(1);
                box-shadow: 0 0 10px rgba(37, 99, 235, 0.3),
                            0 0 20px rgba(37, 99, 235, 0.15);
            }
            50% {
                transform: scaleY(1.15);
                box-shadow: 0 0 20px rgba(37, 99, 235, 0.5),
                            0 0 30px rgba(37, 99, 235, 0.3);
            }
            100% {
                transform: scaleY(1);
                box-shadow: 0 0 10px rgba(37, 99, 235, 0.3),
                            0 0 20px rgba(37, 99, 235, 0.15);
            }
        }
        
        /* Completion celebration animation - Duolingo-style dopamine hit! */
        .quiz-progress-bar.complete {
            background: linear-gradient(90deg, 
                #10b981 0%, 
                #34d399 20%,
                #6ee7b7 40%,
                #34d399 60%,
                #10b981 80%,
                #34d399 100%);
            background-size: 300% 100%;
            animation: progressShimmer 0.8s ease-in-out infinite,
                       completeCelebration 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: 0 0 30px rgba(16, 185, 129, 0.6),
                        0 0 50px rgba(16, 185, 129, 0.4),
                        0 0 70px rgba(16, 185, 129, 0.2),
                        inset 0 1px 0 rgba(255, 255, 255, 0.4);
        }
        
        @keyframes completeCelebration {
            0% {
                transform: scaleY(1);
                box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
            }
            25% {
                transform: scaleY(1.4);
                box-shadow: 0 0 40px rgba(16, 185, 129, 0.8);
            }
            50% {
                transform: scaleY(1.1);
                box-shadow: 0 0 50px rgba(16, 185, 129, 0.9);
            }
            75% {
                transform: scaleY(1.25);
                box-shadow: 0 0 45px rgba(16, 185, 129, 0.8);
            }
            100% {
                transform: scaleY(1);
                box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
            }
        }
        
        /* Enhanced particle effects for completion celebration */
        .quiz-progress-bar-container.complete::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 6px;
            height: 6px;
            background: #10b981;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            animation: particleBurst 1s ease-out forwards;
            box-shadow: 
                -25px -15px 0 -2px #34d399,
                25px -15px 0 -2px #6ee7b7,
                -20px 20px 0 -2px #10b981,
                20px 20px 0 -2px #34d399,
                -35px 8px 0 -2px #6ee7b7,
                35px 8px 0 -2px #10b981,
                -15px -25px 0 -2px #34d399,
                15px -25px 0 -2px #10b981,
                0 30px 0 -2px #6ee7b7,
                -40px 0 0 -2px #34d399,
                40px 0 0 -2px #10b981;
        }
        
        @keyframes particleBurst {
            0% {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
            50% {
                opacity: 0.8;
                transform: translate(-50%, -50%) scale(1.2);
            }
            100% {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0);
            }
        }
        
        .quiz-questions {
            position: relative;
            min-height: 200px;
        }
        
        .quiz-question {
            display: block;
            animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(8px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .quiz-question.hidden {
            display: none;
        }
        
        /* New Quiz Layout - Question First, Progress Secondary */
        .quiz-question-header {
            margin-bottom: 40px; /* Increased by 100% (from 20px to 40px) for better spacing between question and progress bar */
        }
        
        .quiz-question-header .question-text {
            margin: 0 4px; /* 4px margin on left and right */
            margin-bottom: 0;
        }
        
        .quiz-progress-indicator {
            flex-shrink: 0;
            padding: 4px 10px;
            margin: 0 4px; /* 4px margin on left and right */
            background: rgba(15, 23, 42, 0.06);
            border-radius: 999px;
            font-size: 13px;
            font-weight: 600;
            color: var(--ink-muted);
            white-space: nowrap;
        }
        
        .quiz-progress-text {
            display: inline-block;
        }
        
        .quiz-progress-bar-wrapper {
            margin-bottom: 20px;
        }
        
        .quiz-progress-bar-wrapper .quiz-progress {
            margin-bottom: 0;
        }
        
        .question-text {
            font-size: 18px !important; /* Larger - question is primary focus */
            font-weight: 600 !important; /* Bolder to make it look like a question */
            color: rgba(0, 0, 0, 0.9) !important; /* Slightly darker for better contrast */
            margin: 0 4px; /* 4px margin on left and right */
            margin-bottom: 0;
            line-height: 1.5;
            text-align: left; /* Left align for better readability */
            text-justify: inter-word;
        }
        
        .quiz-hint-section {
            margin-bottom: 18px;
            margin-right: 4px; /* Add right margin to prevent progress indicator from being cut off */
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            flex-wrap: wrap; /* Allow hint display to wrap to new line */
        }
        
        /* Progress indicator in hint section, aligned to right */
        .quiz-hint-section .quiz-progress-indicator {
            margin: 0; /* Remove margins - parent section handles spacing */
            flex-shrink: 0;
        }
        
        /* Hint display should appear below the hint button, taking full width */
        .quiz-hint-section .quiz-hint-display {
            width: 100%; /* Take full width to break out of flex layout */
            margin-top: 12px; /* Spacing below hint button */
            margin-left: 0; /* Reset any left margin */
            order: 3; /* Ensure it appears after hint button and progress indicator */
        }
        
        .quiz-hint-btn {
            /* Premium minimalist design - no button styling, just elegant text */
            background: transparent !important;
            border: none !important;
            border-radius: 0 !important;
            padding: 0 !important;
            margin: 0 4px; /* 4px margin on left and right */
            color: rgba(0, 0, 0, 0.65) !important;
            font-size: 14px !important;
            font-weight: 400 !important;
            letter-spacing: -0.01em;
            cursor: pointer;
            transition: color 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            display: inline-block;
            text-decoration: none;
            box-shadow: none !important;
            -webkit-tap-highlight-color: transparent;
            outline: none;
        }
        
        .quiz-hint-btn:hover:not(:disabled) {
            color: rgba(0, 0, 0, 0.85) !important;
        }
        
        .quiz-hint-btn:active:not(:disabled) {
            color: rgba(0, 0, 0, 0.7) !important;
        }
        
        .quiz-hint-btn:disabled {
            cursor: not-allowed;
            opacity: 0.4;
            color: rgba(0, 0, 0, 0.4) !important;
        }
        
        .hint-count {
            font-weight: 500; /* Match button font-weight */
            color: inherit; /* Inherit button text color */
            font-size: 13px; /* Match button font-size */
            letter-spacing: -0.01em; /* Match button letter-spacing */
        }
        
        .quiz-hint-display {
            margin-top: 12px; /* Spacing below hint button - controlled by parent flex */
            padding: 16px 20px;
            background: rgba(0, 0, 0, 0.02);
            border: 1.5px solid rgba(0, 0, 0, 0.08);
            border-radius: 12px;
            font-size: 14px;
            color: rgba(0, 0, 0, 0.85);
            line-height: 1.7;
            animation: hintReveal 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            position: relative;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
            font-weight: 400;
            will-change: transform, opacity;
            transform-origin: top center;
        }
        
        .quiz-hint-display.hidden {
            display: none;
        }
        
        @keyframes hintReveal {
            0% {
                opacity: 0;
                transform: translateY(-12px) scale(0.96);
                filter: blur(4px);
            }
            40% {
                opacity: 0.6;
                transform: translateY(-4px) scale(0.98);
                filter: blur(2px);
            }
            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
                filter: blur(0);
            }
        }
        
        /* Fade out eliminated options for elimination hints */
        .quiz-option.eliminated {
            opacity: 0.5;
            pointer-events: none;
            transition: opacity 0.5s ease-out;
        }
        
        /* Wrong-disabled option (retry mechanism) */
        .quiz-option.wrong-disabled {
            opacity: 0.4;
            pointer-events: none;
            text-decoration: line-through;
            background: rgba(220, 38, 38, 0.05);
            border-color: rgba(220, 38, 38, 0.3);
            transition: all 0.3s ease-out;
        }
        
        /* Retry message */
        .quiz-retry-message {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 16px;
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(251, 191, 36, 0.15) 100%);
            border: 1px solid rgba(251, 191, 36, 0.3);
            border-radius: 12px;
            margin-bottom: 16px;
            color: #92400e;
            font-size: 15px;
            font-weight: 500;
        }
        
        .quiz-retry-message.hidden {
            display: none;
        }
        
        .quiz-retry-message.retry-animate {
            animation: retryPulse 0.5s ease-out;
        }
        
        @keyframes retryPulse {
            0% { transform: scale(0.95); opacity: 0; }
            50% { transform: scale(1.02); }
            100% { transform: scale(1); opacity: 1; }
        }
        
        .retry-icon {
            font-size: 18px;
        }
        
        /* Auto-clue section (replaces hint buttons) */
        .quiz-clue-section {
            margin-bottom: 18px;
            margin-right: 4px;
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            flex-wrap: wrap;
            gap: 12px;
        }
        
        .quiz-auto-clue {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 14px;
            background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.12) 100%);
            border: 1px solid rgba(37, 99, 235, 0.2);
            border-radius: 10px;
            font-size: 14px;
            color: #1e40af;
            max-width: 100%;
            flex: 1;
        }
        
        .quiz-auto-clue.hidden {
            display: none;
        }
        
        .quiz-auto-clue.clue-animate {
            animation: clueReveal 0.4s ease-out;
        }
        
        @keyframes clueReveal {
            0% { opacity: 0; transform: translateY(-8px); }
            100% { opacity: 1; transform: translateY(0); }
        }
        
        .clue-icon {
            font-size: 16px;
            flex-shrink: 0;
        }
        
        .clue-text {
            line-height: 1.4;
        }
        
        /* Fill-in-the-blank styles */
        .fill-blank-prompt {
            font-size: 14px !important;
            color: rgba(0, 0, 0, 0.5) !important;
            margin-bottom: 8px;
            font-weight: 500;
        }
        
        .fill-blank-sentence {
            font-size: 17px;
            line-height: 1.6;
            color: rgba(0, 0, 0, 0.85);
            margin-bottom: 8px;
        }
        
        .blank-slot {
            display: inline-block;
            min-width: 100px;
            border-bottom: 2px dashed var(--french-blue, #2563eb);
            color: var(--french-blue, #2563eb);
            font-weight: 600;
            padding: 0 8px;
            margin: 0 4px;
            text-align: center;
        }
        
        .blank-slot.filled {
            border-bottom-style: solid;
            background: rgba(37, 99, 235, 0.08);
            border-radius: 4px;
        }
        
        /* Word bank (for fill-in-blank) */
        .question-options.word-bank {
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
        }
        
        .quiz-option.word-option {
            flex: 0 0 auto;
            padding: 10px 18px;
            font-size: 15px;
            min-width: auto;
        }
        
        /* Did you know section */
        .did-you-know {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            padding: 14px 16px;
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(251, 191, 36, 0.15) 100%);
            border: 1px solid rgba(251, 191, 36, 0.25);
            border-radius: 12px;
            margin-top: 16px;
            animation: dykReveal 0.4s ease-out 0.2s both;
        }
        
        .did-you-know.hidden {
            display: none;
        }
        
        @keyframes dykReveal {
            0% { opacity: 0; transform: translateY(8px); }
            100% { opacity: 1; transform: translateY(0); }
        }
        
        .dyk-icon {
            font-size: 16px;
            flex-shrink: 0;
        }
        
        .dyk-label {
            font-weight: 600;
            color: #92400e;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }
        
        .dyk-fact {
            color: #78350f;
            font-size: 14px;
            line-height: 1.5;
            flex: 1;
        }
        
        /* Learning Summary */
        .quiz-summary {
            padding: 24px;
            text-align: center;
        }
        
        .quiz-summary.hidden {
            display: none;
        }
        
        .summary-header {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-bottom: 16px;
        }
        
        .summary-icon {
            font-size: 28px;
            animation: summaryBounce 0.6s ease-out;
        }
        
        @keyframes summaryBounce {
            0% { transform: scale(0); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }
        
        .summary-title {
            font-size: 22px;
            font-weight: 700;
            color: #059669;
        }
        
        .summary-score {
            font-size: 16px;
            color: rgba(0, 0, 0, 0.6);
            margin-bottom: 20px;
        }
        
        .summary-learnings {
            background: rgba(0, 0, 0, 0.02);
            border-radius: 16px;
            padding: 20px;
            text-align: left;
            margin-bottom: 20px;
        }
        
        .learnings-title {
            font-size: 15px;
            font-weight: 600;
            color: rgba(0, 0, 0, 0.7);
            margin-bottom: 14px;
        }
        
        .learnings-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        
        .learning-item {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            font-size: 14px;
            line-height: 1.5;
            color: rgba(0, 0, 0, 0.75);
        }
        
        .learning-item::before {
            content: '✨';
            flex-shrink: 0;
        }
        
        .summary-continue-btn {
            padding: 14px 32px;
            background: var(--french-blue, #2563eb);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .summary-continue-btn:hover {
            background: #1d4ed8;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
        }
        
        /* Distractor hint styling */
        .feedback-explanation.distractor-hint {
            background: rgba(251, 191, 36, 0.1);
            border-left: 3px solid #f59e0b;
            padding: 10px 14px;
            border-radius: 0 8px 8px 0;
            font-style: italic;
        }
        
        .question-options {
            display: flex;
            flex-direction: column;
            gap: 12px; /* Slightly more spacing for Duolingo-style */
            margin-bottom: 20px;
        }
        
        .quiz-option {
            padding: 12px 18px; /* More compact: reduced from 16px to 12px top/bottom (Duolingo-style) */
            margin: 0 4px; /* 4px margin on left and right */
            background: #ffffff;
            border: 1px solid rgba(0, 0, 0, 0.08);
            border-radius: 16px; /* Duolingo-style rounded corners */
            font-size: 14px !important;
            color: rgba(0, 0, 0, 0.85) !important;
            text-align: left; /* Left align for better readability in buttons */
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            font-weight: 400 !important;
            font-style: normal;
            position: relative;
            line-height: 1.5;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03),
                        0 1px 2px rgba(0, 0, 0, 0.04); /* Subtle Duolingo-style shadow */
            overflow: hidden;
        }
        
        /* Duolingo-style hover effect - lift and glow */
        .quiz-option:hover:not(:disabled) {
            border-color: rgba(37, 99, 235, 0.3);
            background: #f8f9ff;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15),
                        0 2px 4px rgba(0, 0, 0, 0.08);
            color: rgba(0, 0, 0, 0.85) !important;
        }
        
        .quiz-option:active:not(:disabled) {
            transform: translateY(0) scale(0.98);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
            color: rgba(0, 0, 0, 0.85) !important;
        }
        
        .quiz-option.selected {
            border-color: var(--french-blue);
            background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.12) 100%);
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2),
                        inset 0 1px 0 rgba(255, 255, 255, 0.5);
            font-weight: 500;
            color: rgba(0, 0, 0, 0.85) !important;
        }
        
        .quiz-option.correct {
            border-color: #10b981;
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.15) 100%);
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25),
                        inset 0 1px 0 rgba(255, 255, 255, 0.5);
            color: #059669 !important;
            font-weight: 500;
            animation: correctPulse 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        @keyframes correctPulse {
            0% {
                transform: scale(1);
                box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
            }
            50% {
                transform: scale(1.02);
                box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
            }
            100% {
                transform: scale(1);
                box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
            }
        }
        
        .quiz-option.incorrect {
            border-color: rgba(239, 68, 68, 0.4);
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.06) 0%, rgba(239, 68, 68, 0.1) 100%);
            box-shadow: 0 1px 3px rgba(239, 68, 68, 0.15);
            color: rgba(0, 0, 0, 0.85) !important;
            opacity: 0.75;
        }
        
        .quiz-option:disabled {
            cursor: not-allowed;
            opacity: 0.6;
            transform: none !important;
        }
        
        .quiz-option:disabled {
            cursor: not-allowed;
            opacity: 0.6;
            transform: none !important;
        }
        
        .quiz-feedback {
            padding: 16px 0;
            margin-top: 16px;
            animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
            border-top: 1px solid rgba(0, 0, 0, 0.06);
            padding-top: 16px;
        }
        
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(4px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .quiz-feedback.hidden {
            display: none;
        }
        
        .quiz-feedback.correct {
            border-top-color: rgba(16, 185, 129, 0.2);
        }
        
        .quiz-feedback.incorrect {
            border-top-color: rgba(239, 68, 68, 0.15);
        }
        
        .feedback-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }
        
        .feedback-left {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1;
        }
        
        .feedback-icon {
            font-size: 20px;
            display: inline-block;
            animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            flex-shrink: 0;
        }
        
        @keyframes bounceIn {
            0% {
                transform: scale(0);
            }
            50% {
                transform: scale(1.15);
            }
            100% {
                transform: scale(1);
            }
        }
        
        .feedback-message {
            font-size: 15px;
            font-weight: 500;
            letter-spacing: -0.01em;
            line-height: 1.4;
        }
        
        /* Premium completion experience - elegant and celebratory */
        .quiz-feedback.premium-completion {
            animation: premiumCompletionSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        .quiz-feedback.premium-completion .feedback-message {
            font-size: 17px;
            font-weight: 600;
            color: #059669;
            letter-spacing: -0.02em;
            animation: premiumMessagePulse 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        
        @keyframes premiumCompletionSlide {
            0% {
                opacity: 0;
                transform: translateY(10px);
            }
            100% {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        @keyframes premiumMessagePulse {
            0% {
                transform: scale(0.95);
            }
            50% {
                transform: scale(1.05);
            }
            100% {
                transform: scale(1);
            }
        }
        
        .feedback-explanation {
            font-size: 16px !important;
            font-weight: 400 !important;
            color: rgba(0, 0, 0, 0.85) !important; /* Match summary-text color */
            line-height: 1.6;
            margin-top: 12px;
            margin-bottom: 18px;
            text-align: justify;
            text-justify: inter-word;
        }
        
        .feedback-cultural-context {
            font-size: 13px;
            color: var(--ink-muted);
            line-height: 1.6;
            font-style: italic;
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid rgba(0, 0, 0, 0.06);
        }
        
        .quiz-next-btn,
        .quiz-complete-btn {
            padding: 12px 16px; /* Compact padding - only as much as needed for text */
            background: var(--french-blue);
            color: #ffffff;
            border: none;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 600;
            letter-spacing: -0.01em;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
            overflow: hidden;
            white-space: nowrap;
            width: auto; /* Let button size to content */
            display: inline-flex; /* Compact display */
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25), 0 1px 3px rgba(0, 0, 0, 0.1);
            will-change: transform, box-shadow;
        }
        
        .quiz-next-btn::before,
        .quiz-complete-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.6s ease;
        }
        
        .quiz-next-btn:hover::before,
        .quiz-complete-btn:hover::before {
            left: 100%;
        }
        
        .quiz-next-btn:hover,
        .quiz-complete-btn:hover {
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            transform: translateY(-2px) scale(1.02);
            box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35), 0 2px 6px rgba(0, 0, 0, 0.15);
        }
        
        .quiz-next-btn:active,
        .quiz-complete-btn:active {
            transform: translateY(0) scale(0.98);
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25), 0 1px 3px rgba(0, 0, 0, 0.1);
            transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        .quiz-next-btn {
            animation: nextButtonPulse 2s ease-in-out infinite;
        }
        
        @keyframes nextButtonPulse {
            0%, 100% {
                box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25), 0 1px 3px rgba(0, 0, 0, 0.1);
            }
            50% {
                box-shadow: 0 2px 12px rgba(37, 99, 235, 0.3), 0 1px 4px rgba(0, 0, 0, 0.12);
            }
        }
        
        .quiz-next-btn.hidden,
        .quiz-complete-btn.hidden {
            display: none;
        }
        
        .quiz-completion {
            padding: 0;
            position: relative;
            animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid rgba(16, 185, 129, 0.2);
        }
        
        @keyframes slideUpFade {
            from {
                opacity: 0;
                transform: translateY(4px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .quiz-completion.hidden {
            display: none;
        }
        
        .completion-content {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .completion-icon {
            font-size: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            animation: sparkle 1s ease-in-out;
        }
        
        @keyframes sparkle {
            0%, 100% {
                transform: scale(1) rotate(0deg);
            }
            50% {
                transform: scale(1.1) rotate(5deg);
            }
        }
        
        .completion-text {
            flex: 1;
        }
        
        .completion-message {
            font-size: 15px;
            font-weight: 500;
            color: #059669;
            margin-bottom: 2px;
            letter-spacing: -0.01em;
            line-height: 1.4;
        }
        
        .completion-subtitle {
            font-size: 13px;
            color: var(--ink-muted);
            line-height: 1.4;
            font-weight: 400;
        }
        
        /* Mobile Quiz Styles */
        @media (max-width: 768px) {
            .article-quiz.open {
                margin-top: 8px; /* Match VocaMatch/Breakdown spacing */
                padding-top: 7px; /* Reduced by 30% (was 10px) - compact spacing */
                padding-bottom: 14px; /* Equal bottom padding */
                padding-right: 4px; /* Add right padding to prevent progress indicator from being clipped */
                border-top: none !important; /* Remove top border line */
            }
            
            .quiz-progress-header {
                margin-top: 12px;
                margin-bottom: 16px;
                gap: 12px;
            }
            
            .quiz-subtitle {
                font-size: 13px !important; /* Smaller on mobile */
                font-weight: 500 !important;
                color: var(--ink-muted) !important;
            }
            
            .quiz-question-header {
                flex-direction: column;
                gap: 8px;
                margin-bottom: 20px; /* Increased by 100% (from 10px to 20px) for better spacing between question and progress bar */
            }
            
            .quiz-progress-indicator {
                align-self: flex-start; /* Align to left, matching hint section */
                font-size: 12px;
                padding: 3px 8px;
            }
            
            .quiz-progress-bar-wrapper .quiz-progress-indicator {
                align-self: flex-start; /* Ensure left alignment on mobile */
            }
            
            .match-progress-count {
                font-size: 12px;
                padding: 3px 8px;
            }
            
            .quiz-progress-bar-wrapper {
                margin-bottom: 16px;
            }
            
            .question-text {
                font-size: 17px !important; /* Slightly smaller on mobile but still prominent */
                margin-bottom: 0;
            }
            
            .quiz-progress-bar-container {
                height: 5px; /* Increased by 50% (from 3px to 5px) - thinner on mobile */
            }
            
            .quiz-option {
                padding: 12px 16px;
            font-size: 14px;
            }
            
            .quiz-feedback {
                padding-top: 14px;
                margin-top: 14px;
            }
        }
        
        @media (max-width: 480px) {
            .article-quiz.open {
                margin-top: 8px; /* Match VocaMatch/Breakdown spacing */
                padding-top: 6px; /* Reduced by 30% (was 8px) - compact spacing */
                padding-bottom: 12px; /* Equal bottom padding */
                padding-right: 4px; /* Add right padding to prevent progress indicator from being clipped */
                border-top: none !important; /* Remove top border line */
            }
            
            .quiz-progress-header {
                margin-top: 10px;
                margin-bottom: 14px;
                gap: 10px;
            }
            
            .quiz-subtitle {
                font-size: 12px !important; /* Even smaller on small mobile */
                font-weight: 500 !important;
                color: var(--ink-muted) !important;
            }
            
            .question-text {
                font-size: 16px !important; /* Still readable on small screens */
            }
            
            .quiz-option {
                padding: 12px 14px;
                font-size: 14px;
            }
            
            .quiz-feedback {
                padding-top: 12px;
                margin-top: 12px;
            }
        }
        
        .secondary-title {
            font-size: 16px !important; /* Match summary-text font size */
            line-height: 1.6 !important; /* Match summary-text spacing */
            font-weight: 150 !important;
            font-style: normal !important; /* Regular (non-italic) style */
            margin-top: 0;
            margin-bottom: 11px !important;
            padding-top: 0 !important; /* Removed to match spacing between article-title and summary */
            border-top: none !important; /* Removed line above contextual words */
            color: var(--french-blue) !important; /* Blue color - match contextual words for aesthetic consistency */
            text-align: justify; /* Justify alignment for even spacing */
            /* Prevent horizontal overflow on mobile */
            word-wrap: break-word;
            overflow-wrap: break-word;
            overflow-x: hidden; /* Prevent horizontal scroll */
            max-width: 100%; /* Ensure it doesn't exceed container */
            transition: opacity 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                        max-height 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                        margin-top 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                        margin-bottom 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                        padding-top 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
        
        /* Remove summary margin-top when it follows secondary-title on mobile to achieve even spacing */
        .secondary-title + .summary-text.expanded {
            margin-top: 0 !important; /* Remove margin-top so spacing is controlled by secondary-title margin-bottom only */
        }
        
        /* Make french-word elements inside secondary-title - blue by default, black on hover/tap */
        .secondary-title .french-word {
            color: var(--french-blue) !important; /* #2563eb - blue by default */
            font-size: 16px !important;
            font-weight: 400 !important;
            line-height: 1.6 !important;
        }
        
        /* Hide French title completely when breakdown or match game is open (mobile and desktop) */
        .article-card:has(.bf-breakdown-link.open) .secondary-title,
        .article-card:has(.bf-match-game-link.open) .secondary-title,
        .article-card:has(.bf-quiz-link.open) .secondary-title,
        .secondary-title.hide-line-by-breakdown {
            opacity: 0;
            max-height: 0;
            margin-top: 0;
            margin-bottom: 0;
            padding-top: 0;
            border-top: 0.5px solid transparent;
            border-bottom: none; /* Ensure no border below */
        }
        
        /* Also hide any line in breakdown-meta-container when buttons are active */
        .article-card:has(.bf-breakdown-link.open) .breakdown-meta-container,
        .article-card:has(.bf-match-game-link.open) .breakdown-meta-container,
        .article-card:has(.bf-quiz-link.open) .breakdown-meta-container {
            border-top: 0.5px solid transparent; /* Keep it hidden */
            padding-top: 0; /* No padding when title is hidden */
        }
        
        .breakdown-meta-container {
            display: flex;
            justify-content: space-between; /* Restored to space-between so buttons and meta are on same line */
            align-items: baseline;
            margin-top: 8px; /* Reduced spacing from panels above */
            margin-bottom: 0;
            padding-top: 0;
            border-top: 0.5px solid transparent;
            /* Smooth transition for the line above breakdown button */
            transition: border-top 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                        padding-top 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
        
        /* Reduce spacing when panels are open */
        .bf-match-game-panel.open + .bf-breakdown-panel + .breakdown-meta-container,
        .bf-breakdown-panel.open + .breakdown-meta-container,
        .bf-match-game-panel.open + .breakdown-meta-container {
            margin-top: 0; /* No extra margin - container padding handles spacing */
        }
        
        /* Don't show line above breakdown button when it's open - French title is hidden, so no line needed */
        /* Line is now handled by the game-buttons-container::after pseudo-element */
        
        /* Article meta wrapper - flex container for language selector and meta */
        .article-meta-wrapper {
            display: flex;
            justify-content: flex-end; /* Right-align on desktop */
            align-items: baseline;
            flex: 1; /* Take remaining space after buttons */
            min-width: 0; /* Allow shrinking */
        }
        
        /* Language selector - left side (for mobile) */
        .article-language-selector {
            font-size: 12px;
            font-weight: 300;
            color: var(--ink-muted);
            text-align: left;
            flex-shrink: 0;
        }
        
        /* Language selector - inline (for desktop, inside article-meta) */
        .article-language-selector-inline {
            font-size: 12px;
            font-weight: 300;
            color: var(--ink-muted);
        }
        
        .article-language-selector .lang-option,
        .article-language-selector-inline .lang-option {
            cursor: pointer;
            transition: opacity 0.2s ease, color 0.2s ease;
            user-select: none;
        }
        
        .article-language-selector .lang-option:hover,
        .article-language-selector-inline .lang-option:hover {
            opacity: 0.7;
        }
        
        .article-language-selector .lang-option:active,
        .article-language-selector-inline .lang-option:active {
            opacity: 0.5;
        }
        
        .article-language-selector .lang-option.lang-selected,
        .article-language-selector-inline .lang-option.lang-selected {
            font-weight: 400;
            color: var(--french-blue); /* Same blue as relative-time */
        }
        
        .article-meta {
            font-size: 12px;
            font-weight: 300;
            color: var(--ink-muted);
            margin-top: 0;
            margin-bottom: 0;
            padding-top: 0;
            text-align: right;
            white-space: nowrap; /* Keep everything on one line */
        }
        
        .article-meta .source-link {
            color: inherit;
            text-decoration: none;
            cursor: pointer;
            transition: opacity 0.2s ease;
        }
        
        .article-meta .source-link:hover {
            opacity: 0.7;
        }
        
        .article-meta .source-link:active {
            opacity: 0.5;
        }
        
        .article-meta .relative-time {
            color: var(--french-blue); /* Uses updated softer blue #3b82f6 */
        }
        
        /* Desktop: show source/date in container, hide bottom one */
        .article-meta-mobile {
            display: none;
        }
        
        .article-meta-wrapper-mobile {
            display: none;
        }
        
        /* Mobile: hide source/date in container, show bottom one */
        @media (max-width: 768px) {
            .article-meta-wrapper {
                display: none; /* Hide desktop wrapper on mobile */
            }
            
            .article-meta-wrapper-mobile {
                display: flex; /* Show mobile wrapper */
                justify-content: space-between;
                align-items: baseline;
                width: 100%;
                margin-top: 16px;
            }
            .breakdown-meta-container {
                flex-direction: column; /* Stack vertically on mobile for proper centering */
                flex-wrap: nowrap;
                align-items: stretch; /* Full width */
                gap: 8px;
            }
            
            .game-buttons-container {
                width: 100% !important; /* Full width on mobile for proper centering */
                flex: none !important; /* Don't flex - take full width */
                min-width: 0;
                justify-content: center !important; /* Center buttons horizontally */
                order: 1;
                margin-left: 0 !important; /* Remove any left margin */
                margin-right: 0 !important; /* Remove any right margin */
            }
            
            .article-meta-desktop {
                display: none; /* Hide source/date in container on mobile */
            }
            
            .article-meta-mobile {
                display: block; /* Show source/date at bottom on mobile */
                margin-top: 16px;
                text-align: right;
            }
        }
        
        /* .bf-breakdown-link styles are now unified with .bf-match-game-link above */
        /* Duplicate styles removed - using shared button styles */
        
        
        .bf-breakdown-panel {
            margin-top: 0;
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            /* Performance optimization: hint browser to optimize for transforms */
            will-change: max-height, opacity, margin-top;
            transition: margin-top 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                        max-height 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                        opacity 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
        
        .bf-breakdown-panel.open {
            margin-top: 8px; /* Space from game buttons - kept for visual separation */
            margin-bottom: 0; /* No bottom margin - reduce space before buttons */
            opacity: 1;
            max-height: 1200px;
            /* Remove will-change after animation completes to free up resources */
            will-change: auto;
        }
        
        .bf-breakdown-content {
            font-size: 15px;
            padding: 0;
            padding-top: 3px; /* Space for tier toggle shadow (8px blur needs ~3px clearance) - same as VocaMatch */
        }

        /* Add spacing between game buttons and Breakdown tier toggle (same as VocaMatch) */
        .bf-breakdown-content .bf-tier-toggle {
            margin-top: 0; /* No top margin - container padding handles spacing (same as VocaMatch) */
            margin-bottom: 24px; /* Spacing below tier toggle - increased by 50% (from 16px to 24px) */
            margin-left: 8px; /* Match game-buttons-container left padding (8px) for proper alignment */
        }
        
        /* Breakdown text content - match tier toggle left alignment */
        .bf-breakdown-content .bf-tier-panel {
            padding-left: 8px; /* Match tier toggle and game-buttons-container left padding */
            padding-right: 8px; /* Match game-buttons-container right padding */
        }

        /* Match Game Styles */
        .game-buttons-container {
            display: flex;
            flex-direction: row;
            gap: 16px !important; /* Spacing between buttons */
            align-items: center !important;
            flex-wrap: nowrap;
            position: relative;
            padding: 12px 8px; /* Padding for shadows (buttons can lift 2px + 24px shadow = ~26px, using 12px top/bottom, 8px sides) */
            margin-bottom: 0;
        }

        .bf-quiz-link,
        .bf-match-game-link,
        .bf-breakdown-link {
            /* Glass Morphism Pill Buttons - Modern & Elegant */
            background: var(--glass-tint) !important;
            backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) !important;
            -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) !important;
            border: 1.5px solid var(--glass-border) !important;
            border-radius: 999px !important; /* Perfect pill shape */
            padding: 10px 20px !important; /* Comfortable padding */
            color: var(--french-blue) !important; /* Same blue as relative-time */
            text-align: center !important;
            cursor: pointer;
            font-family: inherit;
            font-size: 15px !important;
            font-weight: 500 !important;
            text-decoration: none;
            position: relative;
            display: inline-block;
            white-space: nowrap;
            z-index: 1;
            box-shadow: 
                0 2px 8px rgba(15, 23, 42, 0.08),
                0 4px 16px rgba(15, 23, 42, 0.04),
                inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
            box-sizing: border-box !important;
            isolation: isolate;
            transform: translateZ(0);
            /* Remove grey flash on tap (mobile) */
            -webkit-tap-highlight-color: transparent;
            outline: none;
            -webkit-focus-ring-color: transparent;
            user-select: none;
            -webkit-user-select: none;
        }
        
        /* Ensure buttons fit content */
        .bf-quiz-link,
        .bf-match-game-link,
        .bf-breakdown-link {
            width: fit-content !important;
        }
        
        /* Glass morphism grain texture (optional subtle effect) */
        .bf-quiz-link::before,
        .bf-match-game-link::before,
        .bf-breakdown-link::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 999px;
            background: 
                radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
            z-index: -1;
        }
        
        /* Hover state - lift + blue glow */
        .bf-quiz-link:hover:not(.open),
        .bf-match-game-link:hover:not(.open),
        .bf-breakdown-link:hover:not(.open) {
            transform: translateY(-2px) scale(1.02) translateZ(0) !important;
            box-shadow: 
                0 4px 12px rgba(var(--french-blue-dark-rgb), var(--blue-opacity-medium)),
                0 8px 24px rgba(15, 23, 42, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
            border-color: rgba(var(--french-blue-dark-rgb), var(--blue-opacity-glow)) !important;
            background: rgba(255, 255, 255, 0.65) !important;
        }
        
        .bf-quiz-link:hover:not(.open)::before,
        .bf-match-game-link:hover:not(.open)::before,
        .bf-breakdown-link:hover:not(.open)::before {
            opacity: 1;
        }
        
        /* Active/pressed state - gentle press */
        .bf-quiz-link:active:not(.open),
        .bf-match-game-link:active:not(.open),
        .bf-breakdown-link:active:not(.open) {
            transform: translateY(0) scale(0.98) translateZ(0) !important;
            box-shadow: 
                0 1px 4px rgba(15, 23, 42, 0.1),
                0 2px 8px rgba(15, 23, 42, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
        }
        
        /* Open/Active state - keep glass effect, no blue background */
        .bf-quiz-link.open,
        .bf-match-game-link.open,
        .bf-breakdown-link.open {
            background: var(--glass-tint) !important; /* Same as default - no blue background */
            backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) !important;
            -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) !important;
            border-color: rgba(var(--french-blue-dark-rgb), 0.5) !important;
            color: var(--french-blue) !important; /* Keep blue color when open */
            font-weight: 600 !important;
            box-shadow: 
                0 2px 8px rgba(37, 99, 235, 0.2),
                0 4px 16px rgba(37, 99, 235, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
            transform: translateZ(0) !important;
        }
        
        .bf-quiz-link.open::before,
        .bf-match-game-link.open::before,
        .bf-breakdown-link.open::before {
            opacity: 0.5;
        }
        
        /* Clicked state - maintain active appearance */
        .bf-quiz-link.clicked,
        .bf-match-game-link.clicked,
        .bf-breakdown-link.clicked {
            /* Same as open state */
        }
        
        /* Focus states - accessible outline */
        .bf-quiz-link:focus,
        .bf-match-game-link:focus,
        .bf-breakdown-link:focus {
            outline: none;
        }
        
        .bf-quiz-link:focus-visible,
        .bf-match-game-link:focus-visible,
        .bf-breakdown-link:focus-visible {
            outline: 2px solid rgba(var(--french-blue-dark-rgb), 0.5) !important;
            outline-offset: 3px !important;
            border-radius: 999px !important;
        }
        

        .bf-match-game-panel {
            margin-top: 0;
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            background: transparent; /* Ensure no gray background during animation */
            will-change: max-height, opacity, margin-top;
            transition: margin-top 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                        max-height 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                        opacity 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .bf-match-game-panel.open {
            margin-top: 8px;
            margin-bottom: 0; /* No bottom margin - reduce space before buttons */
            opacity: 1;
            max-height: 2000px; /* Large enough for any content - content determines actual height */
            background: transparent; /* Ensure no gray background when open */
            will-change: auto;
        }

        .bf-match-game-panel.open:has(.match-game-reward.show) {
            max-height: 2000px; /* Same - reward adds naturally to content height */
        }

        .match-game-container {
            padding: 0 0 24px 0; /* Premium spacing: 24px bottom padding to buttons */
            background: transparent; /* Ensure no gray background */
        }

        /* Classic Mode Badge */
        .match-game-classic-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            background: rgba(15, 23, 42, 0.06);
            border: 1px solid rgba(15, 23, 42, 0.1);
            border-radius: 999px;
            font-size: 13px;
            font-weight: 500;
            color: var(--ink-muted);
            margin-bottom: 16px;
        }

        .classic-badge-icon {
            font-size: 14px;
            line-height: 1;
        }

        .classic-badge-text {
            letter-spacing: 0.01em;
        }

        .match-game-progress {
            display: flex;
            justify-content: flex-start; /* Left-align the count */
            align-items: center;
            margin-top: 0; /* No top margin - spacing handled by container padding */
            margin-bottom: 32px; /* Equal spacing below - matches panel margin-top (8px) + container padding-top (24px) = 32px */
            /* Removed border-bottom - no line needed */
        }
        
        /* Ensure column labels don't add extra spacing */
        .match-game-grid {
            margin-top: 0; /* No top margin - spacing handled by progress margin-bottom */
        }

        .match-progress-count {
            flex-shrink: 0;
            padding: 4px 10px;
            background: rgba(15, 23, 42, 0.06);
            border-radius: 999px;
            font-size: 13px !important;
            font-weight: 600;
            color: var(--ink-muted);
            white-space: nowrap;
        }
        
        .match-progress-text {
            display: inline-block;
        }

        .match-game-grid {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            gap: 16px;
            row-gap: 16px; /* Spacing between rows */
            align-items: center; /* Vertically center all items in each row */
            margin-top: 0; /* No top margin - tier toggle handles spacing */
            margin-bottom: 0; /* No bottom margin - container handles spacing */
            padding: 0 4px; /* Small horizontal padding to prevent edge shadow clipping */
            /* Grid is invisible - no borders, backgrounds, or visible styling */
            border: none;
            background: transparent;
        }

        /* Column labels - first row of the grid */
        .match-game-column {
            display: contents; /* Make columns transparent - labels become direct grid children */
        }

        .match-game-column-label {
            font-size: 16px !important;
            font-weight: 700 !important;
            color: var(--ink) !important;
            text-transform: capitalize !important;
            letter-spacing: -0.01em !important;
            font-family: inherit !important;
            margin-top: 0;
            margin-bottom: 0; /* No bottom margin - grid gap handles spacing */
            text-align: center;
            padding: 0 12px; /* Horizontal padding for shadows */
            /* Labels are in first row, so they need bottom spacing */
            padding-bottom: 12px;
        }
        
        /* Practice column label: no padding */
        .match-game-column-practice .match-game-column-label {
            padding: 0 !important;
            padding-bottom: 12px !important; /* Keep bottom spacing */
        }

        /* Row-based structure: each row contains French word, Practice button, English word */
        .match-game-row {
            display: contents; /* Make rows transparent - items become direct grid children */
        }

        /* Row items - each is a direct child of the main grid, positioned in rows */
        .match-game-row-item {
            display: flex;
            align-items: center; /* Vertically center content within the item */
            padding: 0; /* No padding - grid gap handles spacing */
        }

        /* French word item - center the button */
        .match-game-row-item.match-game-row-french {
            justify-content: center;
            padding: 0 12px; /* Horizontal padding for shadows */
        }

        /* Practice button item - center it */
        .match-game-row-item.match-game-row-practice {
            justify-content: center;
        }

        /* English word item - center the button */
        .match-game-row-item.match-game-row-english {
            justify-content: center;
            padding: 0 12px; /* Horizontal padding for shadows */
        }

        .vocamatch-word-practice-placeholder {
            width: 40px;
            height: 40px;
            flex-shrink: 0;
        }

        .vocamatch-word-practice-btn {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, var(--french-blue) 0%, var(--french-blue-dark) 100%);
            border: none;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            color: white;
            box-shadow: 0 2px 8px rgba(var(--french-blue-dark-rgb), var(--blue-opacity-border)),
                        0 1px 3px rgba(var(--french-blue-dark-rgb), 0.2);
            flex-shrink: 0;
            position: relative;
            overflow: hidden;
        }

        /* Shiny animation removed for premium, clean feel */

        .vocamatch-word-practice-btn:hover {
            background: linear-gradient(135deg, var(--french-blue-dark) 0%, var(--french-blue) 100%);
            transform: translateY(-2px) scale(1.05);
            box-shadow: 0 4px 16px rgba(var(--french-blue-dark-rgb), var(--blue-opacity-glow)),
                        0 2px 6px rgba(var(--french-blue-dark-rgb), var(--blue-opacity-border));
        }

        .vocamatch-word-practice-btn:active {
            transform: translateY(0) scale(1);
            box-shadow: 0 2px 6px rgba(var(--french-blue-dark-rgb), var(--blue-opacity-border));
        }

        .vocamatch-word-practice-btn svg {
            filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
        }

        .match-word {
            /* Modern glass morphism word buttons */
            background: var(--glass-tint) !important;
            backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) !important;
            -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) !important;
            border: 1.5px solid var(--glass-border) !important;
            border-radius: 16px !important; /* Modern rounded corners */
            padding: 12px 18px !important; /* Comfortable padding */
            font-family: inherit;
            font-size: 15px !important;
            font-weight: 500 !important;
            color: var(--ink);
            text-align: center;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
            -webkit-tap-highlight-color: transparent;
            box-shadow: 
                0 2px 8px rgba(15, 23, 42, 0.08),
                0 4px 16px rgba(15, 23, 42, 0.04),
                inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
            isolation: isolate;
            transform: translateZ(0);
            /* Fixed width for uniform appearance */
            width: 100%; /* Take full width of grid cell */
            max-width: 100%;
            box-sizing: border-box;
            /* Text handling for long phrases */
            white-space: normal; /* Allow text wrapping */
            word-wrap: break-word;
            overflow-wrap: break-word;
            /* Subtle entrance animation */
            animation: fadeInUp 0.4s ease-out backwards;
        }
        
        /* Staggered entrance animation for word boxes */
        .match-word:nth-child(1) { animation-delay: 0.05s; }
        .match-word:nth-child(2) { animation-delay: 0.1s; }
        .match-word:nth-child(3) { animation-delay: 0.15s; }
        .match-word:nth-child(4) { animation-delay: 0.2s; }
        .match-word:nth-child(5) { animation-delay: 0.25s; }
        .match-word:nth-child(6) { animation-delay: 0.3s; }
        .match-word:nth-child(7) { animation-delay: 0.35s; }
        .match-word:nth-child(8) { animation-delay: 0.4s; }
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(8px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Hover state - premium subtle lift effect (50% reduced intensity) */
        .match-word:hover:not(.matched):not(.selected) {
            background: rgba(255, 255, 255, 0.75) !important;
            border-color: rgba(var(--french-blue-dark-rgb), 0.15) !important; /* 50% reduced from 0.3 */
            transform: translateY(-1px) scale(1.01) translateZ(0) !important; /* 50% reduced: -1px (was -2px), 1.01 (was 1.02) */
            box-shadow: 
                0 1px 4px rgba(var(--french-blue-dark-rgb), 0.06), /* 50% reduced from 0.12 */
                0 2px 6px rgba(15, 23, 42, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
        }

        /* Selected state - modern blue glow */
        .match-word.selected {
            background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0.25) 100%) !important;
            backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) !important;
            -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) !important;
            border-color: rgba(37, 99, 235, 0.5) !important;
            border-width: 1.5px !important;
            box-shadow: 
                0 1px 4px rgba(37, 99, 235, 0.12),
                0 2px 6px rgba(37, 99, 235, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
            transform: translateZ(0) !important;
        }

        /* Matched state - modern green success */
        .match-word.matched {
            background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.25) 100%) !important;
            backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) !important;
            -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) !important;
            border-color: rgba(34, 197, 94, 0.5) !important;
            opacity: 0.9;
            cursor: default;
            box-shadow: 
                0 1px 4px rgba(34, 197, 94, 0.12),
                0 2px 6px rgba(34, 197, 94, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
            animation: matchSuccess 0.5s ease-out;
        }
        
        @keyframes matchSuccess {
            0% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.05);
            }
            100% {
                transform: scale(1);
            }
        }

        /* Wrong match state - red tint with shake animation */
        .match-word.wrong {
            animation: shake 0.3s ease;
            border-color: rgba(239, 68, 68, 0.5) !important;
            background: rgba(239, 68, 68, 0.1) !important; /* Red tint for wrong */
            box-shadow: 
                0 2px 8px rgba(239, 68, 68, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-4px); }
            75% { transform: translateX(4px); }
        }

        .match-game-reward {
            margin-top: 16px;
            padding: 20px;
            background: rgba(15, 42, 107, 0.05);
            border-radius: 16px;
            border: 1px solid rgba(15, 42, 107, 0.1);
            text-align: center;
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.6s ease, transform 0.6s ease;
        }

        .match-game-reward.show {
            opacity: 1;
            transform: translateY(0);
        }

        .match-reward-title {
            font-size: 20px;
            font-weight: 600;
            color: var(--french-blue);
            margin-bottom: 12px;
        }

        .match-reward-text {
            font-size: 18px;
            font-weight: 500;
            color: var(--ink);
            line-height: 1.6;
        }

        .match-game-empty {
            padding: 24px;
            text-align: center;
            color: var(--ink-muted);
            font-size: 15px;
        }

        /* ============================================
           MODERNIZED VOCAMATCH - TIER TABS (Like Breakdown)
           ============================================ */
        .vocamatch-container {
            padding: 0;
            background: transparent; /* Ensure no gray background */
        }

        .vocamatch-content {
            padding: 0;
            padding-top: 3px; /* Space for tier toggle shadow (8px blur needs ~3px clearance) */
            background: transparent; /* Ensure no gray background */
            display: flex;
            flex-direction: column; /* Ensure tier toggle appears before game panels */
        }
        
        .vocamatch-game-panel {
            background: transparent; /* Ensure no gray background during animation */
        }
        
        .vocamatch-game-wrapper {
            background: transparent; /* Ensure no gray background */
        }

        /* Tier toggle first, then progress bar */
        .vocamatch-content .bf-tier-toggle {
            margin-top: 0; /* No top margin - container padding handles spacing */
            margin-bottom: 20px; /* Premium spacing: 20px to progress bar */
            margin-left: 8px; /* Match progress bar alignment: 8px from left (explicit for desktop) */
            margin-right: 8px; /* Symmetrical right margin for balanced appearance */
        }

        /* Progress bar comes after tier toggle */
        .vocamatch-progress-bar {
            margin-top: 0; /* No top margin - tier toggle handles spacing */
            margin-bottom: 24px; /* Premium spacing: 24px to game content */
            margin-left: 12px; /* Desktop: 12px from left for VocaMatch progress bar */
            margin-right: 8px; /* Symmetrical right margin for balanced appearance */
            padding-left: 8px; /* Shrink progress bar: 8px padding on left */
            padding-right: 8px; /* Shrink progress bar: 8px padding on right */
            width: calc(100% - 20px); /* Account for left and right margins (12px + 8px = 20px) */
            box-sizing: border-box; /* Include padding in width calculation */
        }
        
        /* Fix wrapper height for VocaMatch progress bar (not in flex container) */
        .vocamatch-progress-bar .match-progress-bar-wrapper {
            flex: none; /* Remove flex since not in flex container */
            width: 100%; /* Full width */
            height: auto; /* Auto height based on content */
        }
        
        .vocamatch-progress-bar .match-progress {
            flex: none; /* Remove flex since not in flex container */
            width: 100%; /* Full width */
            height: auto; /* Auto height based on content */
        }

        .vocamatch-game-panels {
            position: relative;
        }

        .vocamatch-game-panel {
            display: block;
        }

        .vocamatch-game-panel[hidden] {
            display: none;
        }

        /* VocaMatch Word Tooltip Styling - Match regular tooltip format */
        .vocamatch-word-tooltip {
            position: fixed;
            z-index: 10000;
            background: var(--glass-tint);
            backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
            -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
            border: 1.5px solid var(--glass-border);
            border-radius: 16px;
            padding: 16px 20px;
            box-shadow: 
                0 4px 16px rgba(15, 23, 42, 0.15),
                0 8px 32px rgba(15, 23, 42, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
            max-width: 300px;
            pointer-events: none;
        }

        /* Use same classes and styling as regular tooltip for consistency */
        .vocamatch-word-tooltip .word-display {
            display: block;
            font-weight: 700;
            font-style: italic; /* Translation in italic */
            font-size: 17px;
            color: #1a1a1c;
            margin-bottom: 16px;
            line-height: 1.3;
            letter-spacing: -0.01em;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
        }

        .vocamatch-word-tooltip .note {
            display: block;
            font-size: 15px;
            color: #3c3c43;
            line-height: 1.4;
            margin-top: 16px;
            margin-bottom: 10px;
            font-style: italic;
            font-weight: 600;
            letter-spacing: -0.003em;
        }

        .vocamatch-word-tooltip .definition {
            display: block;
            font-size: 15px;
            color: #3c3c43;
            line-height: 1.45;
            margin-top: 10px;
            margin-bottom: 0;
        }

        /* Buttons should always be visible - users need to switch between Quiz/VocaMatch/Breakdown */
        /* No special hiding needed - consistent with Quiz Me and Breakdown behavior */

        /* ============================================
           MODERNIZED VOCAMATCH - GAME UI
           ============================================ */
        .vocamatch-game-wrapper {
            padding: 24px 0;
        }

        .match-game-progress {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin-top: 0; /* No top margin - spacing handled by tier toggle margin-bottom */
            margin-bottom: 24px;
            margin-left: 8px; /* Match game-buttons-container left padding (8px) for proper alignment */
        }
        
        .match-progress-indicator {
            flex-shrink: 0;
            padding: 4px 10px;
            background: rgba(15, 23, 42, 0.06);
            border-radius: 999px;
            font-size: 13px;
            font-weight: 600;
            color: var(--ink-muted);
            white-space: nowrap;
        }
        
        .match-progress-text {
            display: inline-block;
        }
        
        .match-progress-bar-wrapper {
            flex: 1;
            position: relative;
            margin: 0;
        }
        
        .match-progress {
            flex: 1;
            position: relative;
            margin: 0;
        }

        /* VocaMatch Progress Bar - Match Quiz Styling Exactly */
        .match-progress-bar-container {
            width: 100%;
            height: 7px; /* Desktop height */
            margin-top: 8px;
            background: linear-gradient(90deg, 
                rgba(0, 0, 0, 0.04) 0%,
                rgba(0, 0, 0, 0.08) 50%,
                rgba(0, 0, 0, 0.04) 100%);
            background-size: 200% 100%;
            border-radius: 100px;
            overflow: hidden;
            position: relative;
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
            animation: containerIdleShimmer 3s ease-in-out infinite;
        }
        
        /* Duolingo-style idle animation - subtle shimmer on empty container */
        @keyframes containerIdleShimmer {
            0%, 100% {
                background-position: 0% 0;
                box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05),
                            0 0 0 rgba(37, 99, 235, 0);
            }
            50% {
                background-position: 100% 0;
                box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05),
                            0 0 8px rgba(37, 99, 235, 0.1);
            }
        }
        
        /* Subtle pulse effect on container to draw attention */
        .match-progress-bar-container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg,
                transparent 0%,
                rgba(var(--french-blue-dark-rgb), var(--blue-opacity-subtle)) 30%,
                rgba(var(--french-blue-dark-rgb), 0.1) 50%,
                rgba(var(--french-blue-dark-rgb), var(--blue-opacity-subtle)) 70%,
                transparent 100%);
            background-size: 200% 100%;
            border-radius: 100px;
            animation: containerPulse 2.5s ease-in-out infinite;
            opacity: 0;
        }
        
        @keyframes containerPulse {
            0%, 100% {
                opacity: 0;
                background-position: -100% 0;
            }
            50% {
                opacity: 1;
                background-position: 200% 0;
            }
        }
        
        /* When progress bar has content, reduce container animation */
        .match-progress-bar-container.has-progress {
            animation: none;
        }
        
        .match-progress-bar-container.has-progress::before {
            animation: none;
            opacity: 0;
        }

        .match-progress-bar {
            height: 100%;
            background: linear-gradient(90deg, 
                var(--french-blue-dark) 0%, 
                var(--french-blue) 25%, 
                var(--french-blue-light) 50%, 
                var(--french-blue) 75%, 
                var(--french-blue-dark) 100%);
            background-size: 200% 100%;
            border-radius: 100px;
            transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1); /* Match quiz transition */
            position: relative;
            overflow: hidden;
            box-shadow: 0 0 10px rgba(var(--french-blue-dark-rgb), var(--blue-opacity-border)),
                        0 0 20px rgba(var(--french-blue-dark-rgb), var(--blue-opacity-light)),
                        inset 0 1px 0 rgba(255, 255, 255, 0.2);
            animation: progressShimmer 2s ease-in-out infinite;
        }
        
        /* Shimmer animation for progress bar */
        @keyframes progressShimmer {
            0% {
                background-position: 200% 0;
            }
            100% {
                background-position: -200% 0;
            }
        }
        
        /* Glow effect that intensifies as progress increases */
        .match-progress-bar::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, 
                transparent 0%, 
                rgba(255, 255, 255, 0.3) 50%, 
                transparent 100%);
            border-radius: 100px;
            animation: progressGlow 1.5s ease-in-out infinite;
        }
        
        @keyframes progressGlow {
            0%, 100% {
                opacity: 0.3;
            }
            50% {
                opacity: 0.6;
            }
        }
        
        /* Pulse effect on progress updates */
        .match-progress-bar.progress-update {
            animation: progressShimmer 2s ease-in-out infinite,
                       progressPulse 0.5s ease-out;
        }
        
        @keyframes progressPulse {
            0% {
                transform: scaleY(1);
                box-shadow: 0 0 10px rgba(37, 99, 235, 0.3),
                            0 0 20px rgba(37, 99, 235, 0.15);
            }
            50% {
                transform: scaleY(1.15);
                box-shadow: 0 0 20px rgba(37, 99, 235, 0.5),
                            0 0 30px rgba(37, 99, 235, 0.3);
            }
            100% {
                transform: scaleY(1);
                box-shadow: 0 0 10px rgba(37, 99, 235, 0.3),
                            0 0 20px rgba(37, 99, 235, 0.15);
            }
        }
        
        /* Completion celebration animation - Duolingo-style dopamine hit! */
        .match-progress-bar.complete {
            background: linear-gradient(90deg, 
                #10b981 0%, 
                #34d399 20%,
                #6ee7b7 40%,
                #34d399 60%,
                #10b981 80%,
                #34d399 100%);
            background-size: 300% 100%;
            animation: progressShimmer 0.8s ease-in-out infinite,
                       completeCelebration 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: 0 0 30px rgba(16, 185, 129, 0.6),
                        0 0 50px rgba(16, 185, 129, 0.4),
                        0 0 70px rgba(16, 185, 129, 0.2),
                        inset 0 1px 0 rgba(255, 255, 255, 0.4);
        }
        
        @keyframes completeCelebration {
            0% {
                transform: scaleY(1);
                box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
            }
            25% {
                transform: scaleY(1.4);
                box-shadow: 0 0 40px rgba(16, 185, 129, 0.8);
            }
            50% {
                transform: scaleY(1.1);
                box-shadow: 0 0 50px rgba(16, 185, 129, 0.9);
            }
            75% {
                transform: scaleY(1.25);
                box-shadow: 0 0 45px rgba(16, 185, 129, 0.8);
            }
            100% {
                transform: scaleY(1);
                box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
            }
        }
        
        /* Enhanced particle effects for completion celebration */
        .match-progress-bar-container.complete::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 6px;
            height: 6px;
            background: #10b981;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            animation: particleBurst 1s ease-out forwards;
            box-shadow: 
                -25px -15px 0 -2px #34d399,
                25px -15px 0 -2px #6ee7b7,
                -20px 20px 0 -2px #10b981,
                20px 20px 0 -2px #34d399,
                -35px 8px 0 -2px #6ee7b7,
                35px 8px 0 -2px #10b981,
                -15px -25px 0 -2px #34d399,
                15px -25px 0 -2px #10b981,
                0 30px 0 -2px #6ee7b7,
                -40px 0 0 -2px #34d399,
                40px 0 0 -2px #10b981;
        }
        
        @keyframes particleBurst {
            0% {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
            50% {
                opacity: 0.8;
                transform: translate(-50%, -50%) scale(1.2);
            }
            100% {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0);
            }
        }


        .match-game-hint {
            text-align: center;
            font-size: 14px;
            color: var(--ink-muted);
            margin-top: 20px;
            margin-bottom: 0;
        }

        /* Show desktop hint, hide mobile hint by default */
        .match-game-hint-mobile {
            display: none;
        }

        /* Hide desktop hint, show mobile hint on mobile */
        @media (max-width: 768px) {
            .match-game-hint-desktop {
                display: none;
            }

            .match-game-hint-mobile {
                display: inline;
            }
        }

        /* ============================================
           MODERNIZED VOCAMATCH - SIMPLE COMPLETION MESSAGE
           ============================================ */
        .vocamatch-completion-message {
            margin-top: 24px;
            margin-bottom: 0; /* No bottom margin */
            animation: fadeIn 0.3s ease-out;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        .vocamatch-completion-content {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            flex-wrap: wrap;
            padding: 8px 16px; /* 8px top/bottom, 16px left/right to match match-game-grid (4px) + match-game-column (12px) = 16px total padding for alignment */
        }

        .vocamatch-completion-left {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-shrink: 0;
        }

        .vocamatch-completion-text {
            font-size: 17px; /* Match quiz feedback-message premium-completion */
            font-weight: 600; /* Match quiz feedback-message premium-completion */
            color: #059669; /* Match quiz feedback-message premium-completion color */
            letter-spacing: -0.02em; /* Match quiz feedback-message premium-completion */
            margin: 0;
            flex-shrink: 0;
            animation: premiumMessagePulse 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); /* Match quiz feedback-message premium-completion animation */
        }

        .vocamatch-completion-actions {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 12px;
            flex-wrap: wrap;
            flex-shrink: 0;
        }

        .vocamatch-action-btn {
            padding: 6px 8px; /* Match bf-tier-tab compact padding (reduced by 50% from 16px to 8px) */
            font-size: 14px; /* Match bf-tier-tab font-size */
            font-weight: 600; /* Match bf-tier-tab font-weight */
            border-radius: 8px; /* Match bf-tier-tab border-radius */
            border: none;
            cursor: pointer;
            transition: all 0.2s ease;
            text-decoration: none;
            display: inline-block;
            font-family: inherit; /* Match bf-tier-tab font-family */
            margin: 0 4px; /* Match bf-tier-tab margin */
        }

        .vocamatch-play-another {
            background: rgba(37, 99, 235, 1);
            color: white;
        }

        .vocamatch-play-another:hover {
            background: rgba(29, 78, 216, 1);
        }

        .vocamatch-play-level {
            background: #fff; /* Match bf-tier-tab.active background */
            color: var(--french-blue); /* Match bf-tier-tab.active color */
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Match bf-tier-tab.active box-shadow */
        }

        .vocamatch-play-level:hover {
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
        }

        .vocamatch-continue {
            background: transparent; /* Match bf-tier-tab background */
            color: var(--ink-muted); /* Match bf-tier-tab color */
        }

        .vocamatch-continue:hover {
            background: rgba(0, 0, 0, 0.03);
        }

        .vocamatch-practice {
            background: rgba(37, 99, 235, 0.1);
            color: var(--french-blue);
            border: 1px solid rgba(37, 99, 235, 0.2);
        }

        .vocamatch-practice:hover {
            background: rgba(37, 99, 235, 0.15);
            border-color: rgba(37, 99, 235, 0.3);
        }

        /* ============================================
           VOCAMATCH PRACTICE MODAL
           ============================================ */
        .vocamatch-practice-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
            pointer-events: none;
        }

        .vocamatch-practice-modal-active {
            opacity: 1;
            visibility: visible;
            pointer-events: all;
        }

        .vocamatch-practice-modal-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(4px);
        }

        .vocamatch-practice-modal-content {
            position: relative;
            background: white;
            border-radius: 20px;
            max-width: 800px;
            width: 90%;
            max-height: 85vh;
            display: flex;
            flex-direction: column;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            transform: scale(0.95);
            transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            overflow: hidden;
        }

        .vocamatch-practice-modal-active .vocamatch-practice-modal-content {
            transform: scale(1);
        }

        .vocamatch-practice-modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 24px 28px;
            border-bottom: 1px solid rgba(0, 0, 0, 0.08);
            gap: 16px;
        }

        /* Word display in header */
        .vocamatch-practice-modal-header .vocamatch-practice-word-main {
            display: flex;
            align-items: baseline;
            gap: 12px;
            flex: 1;
            margin: 0;
        }

        .vocamatch-practice-modal-header .vocamatch-practice-word-french {
            font-size: 22px;
            font-weight: 600;
            color: var(--ink);
            letter-spacing: -0.01em;
        }

        .vocamatch-practice-modal-header .vocamatch-practice-word-english {
            font-size: 16px;
            color: var(--ink-muted);
            font-weight: 400;
        }

        .vocamatch-practice-modal-close {
            background: transparent;
            border: none;
            padding: 8px;
            cursor: pointer;
            color: var(--ink-muted);
            border-radius: 8px;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .vocamatch-practice-modal-close:hover {
            background: rgba(0, 0, 0, 0.05);
            color: var(--ink);
        }

        .vocamatch-practice-modal-body {
            padding: 24px 28px;
            overflow-y: auto;
            flex: 1;
            -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        }

        /* Simplified word item - no nested boxes */
        .vocamatch-practice-word-item {
            padding: 20px 0;
            border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        }

        .vocamatch-practice-word-item:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }

        .vocamatch-practice-word-item:first-child {
            padding-top: 0;
        }

        /* Main word display - prominent */
        .vocamatch-practice-word-main {
            display: flex;
            align-items: baseline;
            gap: 12px;
            margin-bottom: 16px;
        }

        .vocamatch-practice-word-french {
            font-size: 22px;
            font-weight: 600;
            color: var(--ink);
            letter-spacing: -0.01em;
        }

        .vocamatch-practice-word-english {
            font-size: 16px;
            color: var(--ink-muted);
            font-weight: 400;
        }

        /* Details section - clean, minimal, horizontal layout */
        .vocamatch-practice-word-details {
            display: flex;
            flex-direction: column;
            gap: 16px; /* Comfortable spacing between rows */
        }

        /* Detail rows - horizontal layout (label: value) */
        .vocamatch-practice-detail-row {
            display: flex;
            align-items: flex-start;
            gap: 8px; /* Gap between label and value */
            line-height: 1.6; /* Generous line height for readability */
        }

        /* Labels - bold and black like French word */
        .vocamatch-practice-detail-label {
            font-size: 14px;
            font-weight: 600;
            color: var(--ink); /* Black like French word, not muted */
            text-transform: none; /* Natural case */
            letter-spacing: -0.01em;
            margin: 0;
            flex-shrink: 0; /* Prevent label from shrinking */
        }

        /* Values - comfortable reading size */
        .vocamatch-practice-detail-value {
            font-size: 15px;
            color: var(--ink);
            line-height: 1.6; /* Generous line height for easy reading */
            margin: 0;
            flex: 1; /* Allow value to take remaining space */
        }

        /* Full-width rows (for Explanation and Cultural Note) - keep inline but allow wrapping */
        .vocamatch-practice-detail-row.vocamatch-practice-detail-full {
            flex-wrap: wrap; /* Allow content to wrap if needed */
        }

        .vocamatch-practice-detail-row.vocamatch-practice-detail-full .vocamatch-practice-detail-value {
            flex: 1;
            min-width: 200px; /* Ensure value has minimum width before wrapping */
        }

        /* Example sentences - beautiful, educational display */
        .vocamatch-practice-examples {
            display: flex;
            flex-direction: column;
            gap: 12px;
            width: 100%;
        }

        .vocamatch-practice-example-sentence {
            font-size: 15px;
            line-height: 1.7;
            color: var(--ink);
            padding: 12px 16px;
            background: rgba(37, 99, 235, 0.04);
            border-left: 3px solid rgba(37, 99, 235, 0.3);
            border-radius: 8px;
            font-style: italic;
            transition: all 0.2s ease;
        }

        .vocamatch-practice-example-sentence:hover {
            background: rgba(37, 99, 235, 0.06);
            border-left-color: rgba(37, 99, 235, 0.5);
        }

        .vocamatch-practice-register {
            display: inline;
            font-size: 15px;
            font-weight: 400;
            text-transform: capitalize;
            color: var(--ink);
            /* No background, border, or padding - just plain text */
        }

        /* Mobile responsive styles for practice modal */
        @media (max-width: 768px) {
            .vocamatch-practice-modal-content {
                width: 95%;
                max-height: 90vh;
                border-radius: 16px;
            }

            .vocamatch-practice-modal-header {
                padding: 20px;
            }

            .vocamatch-practice-modal-header .vocamatch-practice-word-french {
                font-size: 20px;
            }

            .vocamatch-practice-modal-header .vocamatch-practice-word-english {
                font-size: 15px;
            }

            .vocamatch-practice-modal-body {
                padding: 20px;
            }

            .vocamatch-practice-word-item {
                padding: 20px 0; /* More breathing room on mobile */
            }

            .vocamatch-practice-word-french {
                font-size: 20px;
            }

            .vocamatch-practice-word-english {
                font-size: 15px;
            }

            .vocamatch-practice-word-details {
                gap: 14px; /* Slightly tighter on mobile but still comfortable */
            }

            .vocamatch-practice-detail-label {
                font-size: 13px; /* Slightly smaller on mobile */
            }

            .vocamatch-practice-detail-value {
                font-size: 15px; /* Comfortable reading size on mobile */
                line-height: 1.6; /* Maintain generous line height */
            }
        }

        /* ============================================
           VOCAMATCH PRACTICE BUTTON (INLINE - BEFORE GAME)
           ============================================ */
        .vocamatch-practice-button-container {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            margin-bottom: 20px;
            padding: 0 4px; /* Match game grid padding */
        }

        .vocamatch-practice-btn-inline {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 12px 20px;
            font-size: 15px;
            font-weight: 600;
            color: white;
            background: linear-gradient(135deg, rgba(37, 99, 235, 1) 0%, rgba(29, 78, 216, 1) 100%);
            border: none;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            font-family: inherit;
            text-decoration: none;
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25),
                        0 2px 4px rgba(37, 99, 235, 0.15);
            position: relative;
            overflow: hidden;
        }

        .vocamatch-practice-btn-inline::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s ease;
        }

        .vocamatch-practice-btn-inline:hover::before {
            left: 100%;
        }

        .vocamatch-practice-btn-inline:hover {
            background: linear-gradient(135deg, rgba(29, 78, 216, 1) 0%, rgba(37, 99, 235, 1) 100%);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35),
                        0 4px 8px rgba(37, 99, 235, 0.2);
        }

        .vocamatch-practice-btn-inline:active {
            transform: translateY(0);
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
        }

        .vocamatch-practice-btn-inline svg {
            flex-shrink: 0;
            filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
        }

        .vocamatch-practice-unavailable {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 14px;
            font-size: 14px;
            font-weight: 500;
            color: var(--ink-muted);
            background: rgba(0, 0, 0, 0.03);
            border: 1px solid rgba(0, 0, 0, 0.08);
            border-radius: 10px;
            cursor: not-allowed;
            opacity: 0.7;
        }

        .vocamatch-practice-unavailable svg {
            flex-shrink: 0;
            opacity: 0.6;
        }

        /* Mobile responsive styles for practice button */
        @media (max-width: 768px) {
            .vocamatch-practice-button-container {
                justify-content: flex-start;
                margin-bottom: 16px;
            }

            .vocamatch-practice-btn-inline {
                padding: 11px 18px;
                font-size: 14px;
            }

            .vocamatch-practice-unavailable {
                padding: 10px 16px;
                font-size: 13px;
            }
        }

        /* Mobile responsive styles for completion */
        @media (max-width: 768px) {
            .vocamatch-completion-message {
                margin-left: 0;
                margin-right: 0;
                padding-left: 0;
                padding-right: 0;
                overflow: visible; /* Ensure content is not clipped */
            }

            .vocamatch-completion-content {
                flex-direction: column;
                align-items: stretch;
                gap: 12px;
                padding: 0; /* Remove horizontal padding on mobile - buttons take full width */
                width: 100%;
                box-sizing: border-box;
                overflow: visible; /* Ensure buttons are not clipped */
            }

            .vocamatch-completion-left {
                flex-direction: column;
                align-items: center; /* Center items */
                gap: 12px;
                width: 100%;
            }

            .vocamatch-completion-text {
                font-size: 15px;
                text-align: center;
                width: 100%; /* Full width for centering */
            }

            /* Continue Reading button - full width, centered */
            .vocamatch-completion-left .vocamatch-continue {
                width: 100%;
                padding: 10px 12px;
                font-size: 14px;
                margin: 0;
                box-sizing: border-box;
            }

            /* Actions row - three buttons horizontally */
            .vocamatch-completion-actions {
                display: flex;
                flex-direction: row; /* Horizontal layout */
                width: 100%;
                justify-content: center; /* Center the three buttons */
                gap: 8px; /* Small gap between buttons */
                box-sizing: border-box;
                flex-wrap: nowrap; /* Prevent wrapping */
            }

            /* Practice and level buttons - equal width, fit three in a row */
            .vocamatch-completion-actions .vocamatch-action-btn {
                flex: 1; /* Equal width for all three buttons */
                min-width: 0; /* Allow flex shrinking */
                padding: 10px 8px; /* Compact padding */
                font-size: 13px; /* Slightly smaller font */
                margin: 0; /* Remove margin - gap handles spacing */
                box-sizing: border-box;
                white-space: nowrap; /* Prevent text wrapping */
                overflow: hidden;
                text-overflow: ellipsis; /* Handle overflow gracefully */
                text-align: center; /* Center text in button */
            }

            .bf-quiz-link,
            .bf-match-game-link,
            .bf-breakdown-link {
                font-size: 14px !important; /* Slightly smaller on mobile */
                padding: 8px 16px !important; /* Reduced padding on mobile */
            }
            
            /* Adjust spacing on mobile - ensure perfect centering */
            .game-buttons-container {
                width: 100% !important; /* Full width on mobile for proper centering */
                gap: 12px !important; /* Tighter spacing on mobile */
                padding: 10px 8px !important; /* Equal left/right padding (8px) for shadows - symmetric */
                justify-content: center !important; /* Center buttons horizontally on mobile */
                margin-left: 0 !important; /* Remove any left margin */
                margin-right: 0 !important; /* Remove any right margin */
                flex: none !important; /* Don't flex - take full width */
                box-sizing: border-box !important; /* Ensure padding doesn't affect width */
            }
            
            .breakdown-meta-container {
                flex-direction: column;
                gap: 8px;
                align-items: stretch; /* Full width children */
            }
            
            /* order: 1 already set above in .game-buttons-container */
            
            .article-meta-desktop {
                order: 2;
                width: 100%;
                text-align: right;
            }
            

            .match-game-grid {
                grid-template-columns: 1fr auto 1fr;
                gap: 1px; /* Ultra-compact gap on mobile - 1px between French/Practice/English buttons */
                row-gap: 12px; /* Spacing between rows on mobile */
                width: 100%; /* Full width on mobile */
                margin-left: auto; /* Center alignment */
                margin-right: auto; /* Center alignment */
            }

            .match-game-column-label {
                font-size: 14px !important; /* Match VocaMatch button mobile size */
                padding: 0 4px; /* Less padding on mobile */
                padding-bottom: 8px; /* Premium spacing: 8px for tight, refined feel on mobile */
                letter-spacing: normal !important; /* Match VocaMatch button */
            }
            
            /* Practice column label: no padding on mobile */
            .match-game-column-practice .match-game-column-label {
                padding: 0 !important;
                padding-bottom: 8px !important; /* Keep bottom spacing */
            }

            /* Row items - adjust padding for mobile, center alignment */
            .match-game-row-item.match-game-row-french {
                justify-content: center; /* Center the button */
                padding: 0 4px; /* Symmetric padding on mobile */
            }

            .match-game-row-item.match-game-row-english {
                justify-content: center; /* Center the button */
                padding: 0 4px; /* Symmetric padding on mobile */
            }

            .vocamatch-word-practice-btn,
            .vocamatch-word-practice-placeholder {
                width: 36px;
                height: 36px;
            }

            .vocamatch-word-practice-btn svg {
                width: 16px;
                height: 16px;
            }
            
            /* Center the match game container on mobile */
            .match-game-container {
                display: flex;
                flex-direction: column;
                align-items: center; /* Center children horizontally */
            }
            
            /* Ensure grid and other children are centered */
            .match-game-container > * {
                width: 100%;
                max-width: 100%;
            }

            .match-game-progress {
                margin-bottom: 24px; /* Increased spacing on mobile to match desktop proportion */
            }

            .match-word {
                padding: 8px 12px !important; /* Slightly less padding on mobile */
                font-size: 14px !important; /* Match contextual words mobile size */
                border-radius: 20px !important; /* Same pill shape */
            }

            .match-game-reward {
                padding: 16px;
                margin-top: 12px;
            }

            .match-game-container {
                padding: 0 0 20px 0; /* Premium spacing: 20px bottom padding to buttons on mobile */
                background: transparent; /* Ensure no gray background on mobile */
            }
            
            /* Fix gray background issue - keep original animation speeds */
            .bf-match-game-panel {
                background: transparent !important; /* Force transparent background on mobile */
            }
            
            .vocamatch-container,
            .vocamatch-content,
            .vocamatch-game-panel,
            .vocamatch-game-wrapper {
                background: transparent !important; /* Force transparent background on mobile */
            }

            .match-game-classic-badge {
                font-size: 12px;
                padding: 5px 10px;
                margin-bottom: 12px;
            }

            .classic-badge-icon {
                font-size: 13px;
            }

            .match-game-grid {
                margin-bottom: 12px;
            }

            .match-reward-title {
                font-size: 18px;
            }

            .match-reward-text {
                font-size: 16px;
            }

            /* Mobile: Add padding-top for shadow clearance and left-align tier toggle */
            .vocamatch-content {
                padding-top: 3px; /* Space for tier toggle shadow (8px blur needs ~3px clearance) */
                align-items: flex-start; /* Left-align child elements */
            }
            
            /* Mobile: Tier toggle first, then progress bar - left-aligned and symmetric */
            .vocamatch-content .bf-tier-toggle {
                margin-top: 0; /* No top margin - container padding handles spacing */
                margin-bottom: 16px; /* Premium spacing: 16px to progress bar on mobile */
                margin-left: 8px; /* Match progress bar alignment: 8px from left */
                margin-right: 8px; /* Symmetrical right margin for balanced appearance */
                display: inline-flex; /* Keep inline-flex */
            }
            
            /* Mobile: Progress bar comes after tier toggle - align with tier toggle and word buttons */
            .vocamatch-progress-bar {
                margin-top: 0; /* No top margin - tier toggle handles spacing */
                margin-bottom: 20px; /* Premium spacing: 20px to game content on mobile */
                margin-left: 12px; /* Mobile: 12px from left for VocaMatch progress bar */
                margin-right: 8px; /* Symmetrical right margin for balanced appearance */
                padding-left: 8px; /* Shrink progress bar: 8px padding on left */
                padding-right: 8px; /* Shrink progress bar: 8px padding on right */
            }

            /* Breakdown - Mobile spacing - match VocaMatch exactly (same approach) */
            .bf-breakdown-content .bf-tier-toggle {
                margin-top: 0; /* No top margin - container padding handles spacing (same as VocaMatch) */
                margin-bottom: 18px; /* Spacing below tier toggle - increased by 50% (from 12px to 18px) */
                margin-left: 8px; /* Match VocaMatch toggle alignment: 8px from left */
                margin-right: 8px; /* Symmetrical right margin for balanced appearance */
            }
            
            /* Breakdown text content - match tier toggle left alignment on mobile */
            .bf-breakdown-content .bf-tier-panel {
                padding-left: 8px; /* Match tier toggle alignment: 8px from left */
                padding-right: 8px; /* Symmetrical right padding for balanced appearance */
            }
            
            /* Breakdown text lines - improve mobile readability and alignment */
            .bf-breakdown-content .bf-lines {
                padding: 0; /* Remove any extra padding */
                margin: 0; /* Remove any extra margin */
            }
            
            .bf-breakdown-content .bf-lines div {
                text-align: left; /* Ensure left alignment */
                line-height: 1.5; /* Better line spacing for readability */
            }

            .vocamatch-completion {
                padding: 32px 20px;
            }

            .vocamatch-completion-title {
                font-size: 28px;
            }

            .vocamatch-completion-text {
                font-size: 16px;
            }


            .match-progress-bar-container {
                height: 5px; /* Match quiz mobile height (increased by 50%) */
            }

            .match-game-hint {
                font-size: 13px;
                padding: 8px 12px;
            }
            }
        }
        
        .bf-tier-toggle {
            display: inline-flex;
            gap: 6px;
            background: rgba(240, 240, 240, 0.8);
            border-radius: 12px;
            padding: 8px; /* Increased from 4px to 8px for shadow clearance (active tab has 8px shadow) */
            margin-top: 10px;
            margin-bottom: 12px;
            margin-left: 8px; /* Match game-buttons-container left padding (8px) for proper alignment */
        }
        
        .bf-tier-tab {
            background: transparent;
            border: none;
            padding: 6px 8px; /* Left and right padding reduced by 50% (from 16px to 8px) for more proportionate button */
            margin: 0 4px; /* 4px margin on left and right */
            border-radius: 8px;
            font-family: inherit;
            font-size: 14px;
            font-weight: 600;
            color: var(--ink-muted);
            cursor: pointer;
        }
        
        .bf-tier-tab.active {
            background: #fff;
            color: var(--french-blue); /* Unified premium blue */
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }
        
        .bf-tier-panel {
            display: none;
        }
        
        .bf-tier-panel[data-tier]:not([hidden]) {
            display: block;
        }
        
        .bf-lines {
            display: grid;
            gap: 4px;
        }
        
        .bf-lines div {
            margin: 2px 0;
        }
        
        .bf-lines div:nth-child(2n) {
            margin-top: 1.4px;
            margin-bottom: 6px;
            font-weight: 400;
            color: var(--ink-muted);
        }
        
        .bf-lines div:nth-child(2n-1) {
            margin-bottom: 1.4px;
            font-weight: 600;
        }
        
        .bf-contextual-highlight {
            color: var(--ink);
            font-weight: 400;
            font-size: inherit;
        }
        
        .french-word {
            cursor: pointer;
            text-decoration: none;
            position: relative;
        }
        
        .french-word.active {
            background: rgba(0, 35, 149, 0.1);
            border-radius: 4px;
            padding: 2px 4px;
        }
        
        /* ============================================
           LOADING STATES (Aesthetic Skeleton Cards)
           ============================================ */
        .loading {
            display: none;
            max-width: 1024px; /* Match main-content exactly */
            margin: 0 auto; /* Match main-content exactly */
            padding: 15px 24px !important; /* Reduced top padding for skeleton */
            flex-direction: column;
            gap: 32px; /* Match articles-list gap */
        }
        
        .loading.visible {
            display: flex;
        }
        
        .loading-skeleton {
            display: flex;
            flex-direction: column;
            gap: 32px;
            width: 100%;
        }
        
        .skeleton-card {
            background: #ffffff;
            backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
            -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
            border: 1px solid rgba(15, 42, 107, 0.2);
            border-radius: 20px;
            padding: 40px 32px 35px 32px; /* top, right, bottom, left - match article-card exactly */
            box-shadow: 
                0 2.5px 5.5px rgba(15, 23, 42, 0.09),
                0 8px 18px rgba(15, 23, 42, 0.07),
                0 14px 32px rgba(15, 23, 42, 0.05);
            position: relative;
            overflow: hidden;
            isolation: isolate;
            transform: translateY(-1px) scale(1.003);
            backface-visibility: hidden;
        }
        
        .skeleton-card::before {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: 20px;
            /* Very subtle texture - ChatGPT style - match article-card */
            background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncA type='table' tableValues='0 0 .015 .03'/></feComponentTransfer></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>") repeat;
            opacity: 0.3;
            mix-blend-mode: soft-light;
            pointer-events: none;
            z-index: 0;
            clip-path: inset(0 round 20px);
            -webkit-clip-path: inset(0 round 20px);
            overflow: hidden;
        }
        
        .skeleton-card::after {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(
                90deg,
                transparent 0%,
                rgba(255, 255, 255, 0.5) 50%,
                transparent 100%
            );
            animation: shimmer 1.5s infinite;
            z-index: 1;
            pointer-events: none;
        }
        
        @keyframes shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }
        
        .skeleton-card > * {
            position: relative;
            z-index: 2;
        }
        
        /* Skeleton Title - Match article-title exactly */
        .skeleton-title {
            height: 33px; /* 22px font * 1.5 line-height */
            width: 80%;
            background: rgba(15, 23, 42, 0.08);
            border-radius: 4px;
            margin-top: 0;
            margin-bottom: 11px; /* Match article-title margin-bottom */
        }
        
        /* Skeleton Secondary Title - Match secondary-title exactly (2 lines) */
        .skeleton-secondary-title {
            margin-top: 36px; /* Match secondary-title margin-top */
            margin-bottom: 15px; /* Match secondary-title margin-bottom */
        }
        
        .skeleton-secondary-title .skeleton-line {
            height: 24px; /* Approximate for secondary title line */
            width: 60%;
            background: rgba(15, 23, 42, 0.08);
            border-radius: 4px;
            margin: 0;
        }
        
        .skeleton-secondary-title .skeleton-line + .skeleton-line {
            margin-top: 4px; /* Small gap between secondary title lines */
            width: 45%; /* Second line slightly shorter */
        }
        
        /* Skeleton Summary Container - Match summary-text spacing */
        .skeleton-summary {
            margin-top: 0; /* When following secondary-title, margin-top is 0 */
            margin-bottom: 0;
        }
        
        .skeleton-text {
            height: 25.6px; /* 16px font * 1.6 line-height */
            width: 100%;
            background: rgba(15, 23, 42, 0.08);
            border-radius: 4px;
            margin: 0; /* No margin - lines stack naturally like text */
        }
        
        /* Visual spacing between summary lines - match text line-height appearance */
        .skeleton-summary .skeleton-text + .skeleton-text {
            margin-top: 9.6px; /* Visual spacing to match line-height 1.6 (16px * 0.6 = 9.6px between lines) */
        }
        
        .skeleton-text.short {
            width: 70%;
        }
        
        /* Skeleton Breakdown Meta Container - Match breakdown-meta-container exactly */
        .skeleton-breakdown-meta {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            margin-top: 10px; /* Match spacing when quiz is hidden */
            margin-bottom: 0;
            padding-top: 0;
        }
        
        /* Skeleton Buttons Container - Match game-buttons-container */
        .skeleton-buttons {
            display: flex;
            flex-direction: row;
            gap: 16px;
            align-items: center;
            padding: 12px 8px; /* Match game-buttons-container padding */
        }
        
        .skeleton-button {
            width: 90px; /* Approximate button width */
            height: 36px; /* Approximate button height */
            background: rgba(15, 23, 42, 0.08);
            border-radius: 999px; /* Pill shape to match buttons */
        }
        
        /* Skeleton Meta - Match article-meta */
        .skeleton-meta {
            width: 180px; /* Approximate meta width */
            height: 14.4px; /* 12px font * 1.2 line-height */
            background: rgba(15, 23, 42, 0.08);
            border-radius: 4px;
            margin-top: 0;
            margin-bottom: 0;
        }
        
        /* Desktop: show meta in container, hide bottom one */
        .skeleton-meta-mobile {
            display: none;
        }
        
        @media (max-width: 768px) {
            .skeleton-breakdown-meta {
                flex-direction: column;
                gap: 8px;
                align-items: stretch;
            }
            
            .skeleton-buttons {
                width: 100%;
                justify-content: center;
                gap: 12px;
                padding: 10px 8px;
            }
            
            .skeleton-meta-desktop {
                display: none; /* Hide meta in container on mobile */
            }
            
            .skeleton-meta-mobile {
                display: block; /* Show meta at bottom on mobile */
                width: 100%;
                margin-top: 16px;
                text-align: right;
            }
        }
        
        /* ============================================
           ERROR MESSAGE
           ============================================ */
        .error-message {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 60px 24px;
            gap: 24px;
            text-align: center;
        }
        
        .error-message.visible {
            display: flex;
        }
        
        .error-message p {
            font-size: 1.125rem;
            color: var(--ink-muted);
        }
        
        .load-more-btn {
            display: block;
            width: 100%;
            max-width: 400px;
            margin: 40px auto;
            padding: 14px 28px;
            background: #ffffff;
            color: var(--ink);
            border: 1.5px solid rgba(0, 0, 0, 0.12);
            border-radius: 20px;
            font-size: 15px;
            font-weight: 500;
            font-family: inherit;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 
                0 2px 8px rgba(0, 0, 0, 0.08),
                0 4px 16px rgba(0, 0, 0, 0.04);
            text-align: center;
            -webkit-tap-highlight-color: transparent;
        }

        .load-more-btn:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 
                0 4px 12px rgba(0, 0, 0, 0.12),
                0 8px 24px rgba(0, 0, 0, 0.08);
            border-color: rgba(0, 0, 0, 0.18);
        }

        .load-more-btn:active:not(:disabled) {
            transform: translateY(0);
        }

        .load-more-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none !important;
        }

        .retry-btn {
            background: var(--french-blue);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 20px;
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .retry-btn:hover {
            background: rgba(0, 35, 149, 0.9);
            transform: translateY(-1px);
        }
        
        /* ============================================
           MOBILE RESPONSIVE
           ============================================ */
        @media (max-width: 768px) {
            .article-card {
                padding: 28px 24px;
                transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                            box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                            border-color 0.5s ease,
                            padding-top 0.3s ease; /* Smooth transition for padding change */
            }
            
            /* Reduce top padding when any game is active on mobile */
            .article-card:has(.bf-quiz-link.open),
            .article-card:has(.bf-match-game-link.open),
            .article-card:has(.bf-breakdown-link.open) {
                padding-top: 16px; /* Reduced from 28px when games are active on mobile */
            }
            
            .article-title {
                font-size: 18px !important;
                line-height: 1.6;
            }
            
            .secondary-title {
                font-size: 16px !important; /* Match summary-text font size on mobile */
                line-height: 1.6 !important; /* Match summary-text spacing on mobile */
                text-align: justify; /* Justify alignment for even spacing on mobile */
                word-wrap: break-word;
                overflow-wrap: break-word;
                overflow-x: hidden; /* Prevent horizontal scroll on mobile */
                max-width: 100%;
                /* Ensure proper wrapping of contextual word highlights */
                white-space: normal;
            }
            
            .bf-breakdown-link {
                font-size: 16px;
            }
        }
        
        /* ============================================
           PAYWALL MODAL
           ============================================ */
        .paywall-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
            /* Force visibility for browser compatibility */
            pointer-events: none;
        }

        /* Simplified: Use .modal-open class (researcher recommendation) */
        .paywall-modal.modal-open {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }
        
        /* Also support .active for backward compatibility */
        .paywall-modal.active {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

        .paywall-modal-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            /* Progressive enhancement: solid background works everywhere */
            background: rgba(0, 0, 0, 0.5);
            /* Fancy blur effect where supported (Safari/Atlas fallback to solid) */
            backdrop-filter: blur(4px);
        }
        
        /* Fallback for browsers that don't support backdrop-filter */
        @supports not (backdrop-filter: blur(1px)) {
            .paywall-modal-overlay {
                background: rgba(0, 0, 0, 0.65); /* Darker when no blur */
            }
        }

        .paywall-modal-content {
            position: relative;
            background: #ffffff;
            border-radius: 24px;
            padding: 40px 36px;
            max-width: 840px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 
                0 4px 6px rgba(15, 23, 42, 0.07),
                0 10px 20px rgba(15, 23, 42, 0.06),
                0 20px 40px rgba(15, 23, 42, 0.04);
            transform: scale(0.95);
            transition: transform 0.3s ease;
        }

        .paywall-modal.active .paywall-modal-content {
            transform: scale(1);
        }

        .paywall-modal-close {
            position: absolute;
            top: 16px;
            right: 16px;
            background: none;
            border: none;
            font-size: 28px;
            color: var(--ink-muted);
            cursor: pointer;
            padding: 4px;
            line-height: 1;
            transition: color 0.2s ease;
        }

        .paywall-modal-close:hover {
            color: var(--ink);
        }


        .paywall-modal-message {
            display: none;
        }

        .paywall-modal-message strong {
            color: var(--french-blue);
            font-weight: 600;
        }

        .paywall-modal-subtitle {
            font-size: 14px;
            color: var(--ink-muted);
            margin: 0 0 32px 0;
        }

        /* Usage Cards - Text Messages Only */
        .paywall-usage-cards {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin: 0;
            width: 100%;
        }

        .paywall-usage-card {
            background: none;
            border: none;
            padding: 0;
            width: 100%;
            margin: 0 0 40px 0;
        }

        .paywall-usage-card-content {
            display: flex;
            align-items: flex-start;
            justify-content: flex-start;
            gap: 0;
            width: 100%;
        }

        .paywall-usage-card-message {
            display: flex;
            flex-direction: column;
            gap: 12px;
            flex: 1;
        }

        .paywall-usage-card-limit-text {
            font-size: 0.875rem;
            font-weight: 500;
            color: #6b7280;
            line-height: 1.6;
            margin: 0;
        }

        .paywall-usage-card-upgrade-text {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--ink);
            line-height: 1.5;
            margin: 0;
            letter-spacing: -0.01em;
        }

        .paywall-usage-card-timer {
            text-align: right;
            flex-shrink: 0;
        }

        .paywall-usage-card-timer .paywall-reset-timer-label {
            font-size: 0.9375rem;
            font-weight: 500;
            color: var(--ink);
            line-height: 1.5;
            display: inline;
            margin-right: 2px;
        }

        .paywall-usage-card-timer .paywall-reset-timer-value {
            font-size: 0.9375rem;
            font-weight: 500;
            color: var(--ink);
            line-height: 1.5;
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.03em;
        }

        .paywall-reset-timer {
            text-align: right;
            flex-shrink: 0;
        }

        .paywall-reset-timer-label {
            font-size: 0.75rem;
            font-weight: 500;
            color: var(--ink-muted);
            display: block;
            margin-bottom: 6px;
        }

        .paywall-reset-timer-value {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--ink);
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.03em;
        }

        @media (max-width: 768px) {
            .paywall-usage-cards {
                gap: 12px;
                justify-content: center;
                flex-direction: column;
            }
            
            .paywall-usage-card {
                padding: 16px 20px;
                margin-bottom: 24px;
            }
            
            .paywall-usage-card-content {
                flex-direction: column;
                align-items: flex-start;
                gap: 16px;
            }
            
            .paywall-usage-card-message {
                font-size: 0.875rem;
            }
            
            .paywall-usage-card-timer {
                text-align: left;
                width: 100%;
            }
            
            .paywall-usage-card-timer .paywall-reset-timer-label {
                font-size: 0.875rem;
            }
            
            .paywall-usage-card-timer .paywall-reset-timer-value {
                font-size: 0.875rem;
            }
        }

        .paywall-modal-actions {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 32px;
            align-items: center;
        }

        /* Billing Toggle - Integrated in Pro Card */

        .paywall-billing-label {
            font-size: 0.75rem;
            font-weight: 400;
            color: #6b7280;
            padding: 6px 12px;
            border-radius: 999px;
            background: transparent;
            letter-spacing: 0.08em;
            line-height: 1.4;
            transition: color 0.2s ease, background 0.2s ease, font-weight 0.2s ease;
            display: inline-block;
            min-width: fit-content;
        }
        
        .paywall-billing-label.active {
            color: #000000;
            font-weight: 600;
        }
        
        .paywall-billing-label[data-period="monthly"].active {
            color: #22c55e;
            font-weight: 600;
            background: rgba(34, 197, 94, 0.06);
        }
        
        .paywall-billing-label[data-period="annual"].active {
            color: #22c55e;
            font-weight: 600;
            background: rgba(34, 197, 94, 0.06);
        }

        .paywall-billing-toggle {
            width: 40px;
            height: 20px;
            background: rgba(15, 23, 42, 0.08);
            border: none;
            border-radius: 999px;
            position: relative;
            cursor: pointer;
            transition: background 0.2s ease;
            padding: 2px;
            flex-shrink: 0;
        }

        .paywall-billing-toggle:hover {
            background: rgba(15, 23, 42, 0.12);
        }

        .paywall-billing-toggle-slider {
            display: block;
            width: 16px;
            height: 16px;
            background: #ffffff;
            border-radius: 50%;
            transition: transform 0.2s ease;
            transform: translateX(0);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
        }

        .paywall-billing-toggle-slider.annual {
            transform: translateX(20px);
        }

        .paywall-billing-toggle:has(.annual) {
            background: rgba(22, 163, 74, 0.2);
        }

        /* Pricing Card in Modal - Premium Spacing */
        .paywall-modal-pricing {
            margin: 0 0 45px 0;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
            justify-items: center;
        }

        .paywall-pricing-card {
            background: rgba(15, 23, 42, 0.02);
            border: 1px solid rgba(15, 23, 42, 0.06);
            border-radius: 20px;
            padding: 24px 20px;
            position: relative;
            min-width: 0;
            transition: all 0.2s ease;
        }

        .paywall-pricing-card-billing {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 8px;
            margin: 0;
            padding: 0;
            flex-shrink: 0;
        }

        .paywall-pricing-card:hover {
            border-color: rgba(15, 23, 42, 0.12);
            background: rgba(15, 23, 42, 0.03);
        }

        .paywall-pricing-card.selected {
            border: 1.25px solid var(--french-blue) !important;
            background: #ffffff !important;
            box-shadow: 
                0 2px 8px rgba(37, 99, 235, 0.075),
                0 4px 16px rgba(37, 99, 235, 0.05) !important;
        }

        @media (max-width: 768px) {
            .paywall-modal-pricing {
                grid-template-columns: 1fr;
                gap: 20px;
            }
            
            .paywall-pricing-card {
                padding: 20px;
                max-width: 100%;
            }
            
            .paywall-pricing-badge {
                padding: 5px 12px;
                font-size: 0.6875rem;
            }
            
            .paywall-pricing-card-header {
                margin-top: 0;
            }
            
            .paywall-pricing-card-billing {
                margin-bottom: 10px;
                gap: 8px;
            }
            
            .paywall-billing-label {
                font-size: 0.75rem;
            }
            
            .paywall-billing-toggle {
                width: 36px;
                height: 18px;
            }
            
            .paywall-billing-toggle-slider {
                width: 14px;
                height: 14px;
            }
            
            .paywall-billing-toggle-slider.annual {
                transform: translateX(18px);
            }
            
            .paywall-usage-card-limit-text {
                font-size: 0.8125rem;
            }
            
            .paywall-usage-card-upgrade-text {
                font-size: 1.05rem;
            }
        }

        .paywall-pricing-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 0;
            margin-bottom: 29px;
            gap: 12px;
        }

        .paywall-pricing-badge {
            position: static;
            padding: 0;
            border-radius: 0;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: none;
            letter-spacing: 0.01em;
            background: none;
            color: #22c55e;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .paywall-pricing-badge-current {
            position: static;
            background: none;
            color: var(--ink-muted);
            flex-shrink: 0;
            font-size: 0.875rem;
            font-weight: 400;
        }

        .paywall-pricing-title {
            margin: 0;
            font-size: 1.625rem;
            font-weight: 600;
            color: var(--ink);
            letter-spacing: -0.015em;
            flex: 1;
            line-height: 1.2;
        }

        .paywall-pricing-amount {
            display: flex;
            align-items: baseline;
            gap: 4px;
            margin: 0 0 29px 0;
            flex-wrap: wrap;
        }

        .paywall-price-symbol {
            font-size: 0.875rem;
            font-weight: 400;
            color: #6b7280;
            line-height: 1;
            vertical-align: baseline;
            margin-right: 3px;
            align-self: flex-start;
            margin-top: 0.25rem;
        }

        .paywall-price-main {
            font-size: 2.25rem;
            font-weight: 700;
            color: var(--ink);
            line-height: 1;
            letter-spacing: -0.02em;
        }

        .paywall-price-period {
            font-size: 0.875rem;
            font-weight: 400;
            color: #6b7280;
            margin-left: 2px;
        }

        .paywall-pricing-savings {
            margin: 0;
            font-size: 0.6875rem;
            font-weight: 400;
        }

        .paywall-pricing-savings-badge {
            display: inline-block;
            margin-left: 8px;
            padding: 2px 8px;
            background: rgba(22, 163, 74, 0.15);
            color: #16a34a;
            font-size: 0.75rem;
            font-weight: 600;
            border-radius: 4px;
            vertical-align: middle;
            color: #9ca3af;
            line-height: 1;
            margin-left: 8px;
            letter-spacing: 0.01em;
        }

        .paywall-pricing-features {
            list-style: none;
            padding: 0;
            margin: 0;
            display: grid;
            gap: 10px;
        }

        .paywall-pricing-features li {
            font-size: 0.9375rem;
            font-weight: 500;
            color: var(--ink);
            padding-left: 0;
            line-height: 1.5;
        }

        .paywall-pricing-features li::before {
            content: "✓ ";
            margin-right: 10px;
            color: var(--french-blue);
            font-weight: 700;
            font-size: 1rem;
        }

        .paywall-countdown-container {
            margin: 16px 0;
        }

        .paywall-countdown-label {
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--ink-muted);
            margin-bottom: 8px;
        }

        .paywall-countdown-timer {
            font-size: 1.75rem;
            font-weight: 700;
            color: var(--french-blue);
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.05em;
        }

        @media (max-width: 768px) {
            .paywall-countdown-timer {
                font-size: 1.5rem;
            }
            
            .paywall-pricing-title {
                font-size: 1.375rem;
                font-weight: 600;
                letter-spacing: -0.01em;
            }
            
            .paywall-price-main {
                font-size: 2rem;
            }
        }

        /* Glass Morphism Button Styles (matching landing page) */
        .btn-glass {
            background: #ffffff;
            color: #000000 !important;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            box-shadow: 
                0 2px 8px rgba(15, 23, 42, 0.15),
                0 4px 16px rgba(15, 23, 42, 0.12),
                0 8px 32px rgba(15, 23, 42, 0.10),
                0 16px 48px rgba(15, 23, 42, 0.08);
            border: 1.5px solid rgba(15, 23, 42, 0.12);
            position: relative;
            overflow: hidden;
            isolation: isolate;
            transform: translateZ(0);
            backface-visibility: hidden;
            z-index: 1;
            transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                        box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                        border-color 0.5s ease,
                        color 0.5s ease;
        }
        
        /* Text isolation - ensures text stays black above animation */
        .btn-glass,
        .btn-glass * {
            color: #000000 !important;
            -webkit-text-fill-color: #000000 !important;
            position: relative;
            z-index: 10 !important;
            mix-blend-mode: normal !important;
            text-shadow: none !important;
            background: transparent !important;
            isolation: isolate !important;
        }
        
        /* Hover state - shared for all glass buttons */
        .btn-glass:hover,
        .btn-glass:focus-visible {
            transform: translateY(-2px) scale(1.005);
            color: #000000 !important;
            box-shadow: 
                0 4px 12px rgba(15, 23, 42, 0.18),
                0 8px 24px rgba(15, 23, 42, 0.15),
                0 16px 40px rgba(15, 23, 42, 0.12),
                0 24px 56px rgba(15, 23, 42, 0.10);
            border-color: rgba(15, 23, 42, 0.18);
        }
        
        /* No gradient - clean white button */
        .btn-glass::after {
            display: none;
        }

        .paywall-modal-button {
            border: none !important;
            border-radius: 999px;
            padding: 14px 28px;
            font-weight: 600;
            font-size: 1rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            cursor: pointer;
            text-decoration: none;
            width: auto;
            letter-spacing: -0.01em;
            position: relative;
            overflow: hidden;
            isolation: isolate;
            transform: translateZ(0);
            backface-visibility: hidden;
            z-index: 1;
            transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                        box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                        border-color 0.5s ease,
                        background 0.5s ease;
        }

        .paywall-modal-button-primary {
            background: #ffffff;
            color: #000000 !important;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            box-shadow: 
                0 2px 8px rgba(15, 23, 42, 0.15),
                0 4px 16px rgba(15, 23, 42, 0.12),
                0 8px 32px rgba(15, 23, 42, 0.10),
                0 16px 48px rgba(15, 23, 42, 0.08);
            border: 1.25px solid var(--french-blue) !important;
        }

        .paywall-modal-button-primary,
        .paywall-modal-button-primary * {
            color: #000000 !important;
            -webkit-text-fill-color: #000000 !important;
            position: relative;
            z-index: 10 !important;
            mix-blend-mode: normal !important;
            text-shadow: none !important;
            background: transparent !important;
            isolation: isolate !important;
        }

        .paywall-modal-button-primary:hover,
        .paywall-modal-button-primary:focus-visible {
            transform: translateY(-2px) scale(1.005);
            color: #000000 !important;
            box-shadow: 
                0 4px 12px rgba(15, 23, 42, 0.18),
                0 8px 24px rgba(15, 23, 42, 0.15),
                0 16px 40px rgba(15, 23, 42, 0.12),
                0 24px 56px rgba(15, 23, 42, 0.10);
            border-color: var(--french-blue) !important;
        }

        .paywall-modal-button-primary::after {
            display: none;
        }

        .paywall-modal-button-secondary {
            background: transparent;
            color: #6b7280;
            border: none;
            padding: 12px 32px;
            font-weight: 500;
            text-decoration: none;
        }

        .paywall-modal-button-secondary:hover {
            color: var(--ink);
            background: transparent;
        }

        @media (max-width: 768px) {
            .paywall-modal-content {
                padding: 32px 24px;
                max-width: 95%;
            }

            .paywall-modal-title {
                font-size: 20px;
            }

            .paywall-modal-message {
                font-size: 15px;
            }
            
            .paywall-modal-actions {
                margin-top: 24px;
            }
            
            .paywall-modal-button {
                padding: 14px 24px;
            }
            
            .paywall-modal-button-secondary {
                padding: 10px 24px;
            }
        }

        /* ============================================
           ACCESSIBILITY
           ============================================ */
        @media (prefers-reduced-motion: reduce) {
            * {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
        }
