  /* CSS Variables for Design System */
        :root {
            /* Color Palette */
            --primary-black: #0A0A0A;
            --dark-gray: #1A1A1A;
            --medium-gray: #5A5A5A;
            --light-gray: #8A8A8E;
            --extra-light-gray: #F5F5F7;
            --white: #FFFFFF;
            --past-color: #8E8E93;
            --present-color: #32D74B;
            --future-color: #0A84FF;
            --mixed-color: #BF5AF2;
            --past-light: rgba(142, 142, 147, 0.1);
            --present-light: rgba(50, 215, 75, 0.1);
            --future-light: rgba(10, 132, 255, 0.1);
            --mixed-light: rgba(191, 90, 242, 0.1);
            
            /* Shadows */
            --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.04);
            --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.06);
            --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.08);
            --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.12);
            
            /* Border Radius */
            --radius-sm: 12px;
            --radius-md: 16px;
            --radius-lg: 20px;
            --radius-xl: 24px;
            --radius-full: 50%;
            
            /* Transitions */
            --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            --transition-medium: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            
            /* Spacing */
            --space-xs: 8px;
            --space-sm: 16px;
            --space-md: 24px;
            --space-lg: 32px;
            --space-xl: 48px;
            --space-xxl: 64px;
        }

        /* Reset & Base Styles */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: 'SF Pro Text', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: linear-gradient(135deg, #FFFFFF 0%, #FAFAFA 100%);
            color: var(--primary-black);
            line-height: 1.5;
            font-weight: 400;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            overflow-x: hidden;
            min-height: 100vh;
        }

        /* Touch-friendly scrollbar */
        ::-webkit-scrollbar {
            width: 6px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: var(--extra-light-gray);
            border-radius: 3px;
        }

        /* Mobile-first responsive design */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 var(--space-sm);
            animation: fadeIn var(--transition-slow);
        }

        /* MOBILE-SPECIFIC IMPROVEMENTS */

        /* Enhanced Back Button for Mobile */
        .nav-back {
            position: fixed;
            top: max(env(safe-area-inset-top), var(--space-sm));
            left: max(env(safe-area-inset-left), var(--space-sm));
            z-index: 100;
        }

        .back-button {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
            background: var(--white);
            border-radius: var(--radius-full);
            border: 1px solid rgba(0, 0, 0, 0.08);
            cursor: pointer;
            transition: all var(--transition-medium);
            box-shadow: var(--shadow-sm);
            position: relative;
            overflow: hidden;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        /* Safe area adjustments for iPhone X+ */
        @supports (padding: max(0px)) {
            .container {
                padding-left: max(var(--space-sm), env(safe-area-inset-left));
                padding-right: max(var(--space-sm), env(safe-area-inset-right));
            }
        }

        /* Page Load Animation */
        @keyframes fadeIn {
            from { 
                opacity: 0; 
                transform: translateY(20px);
            }
            to { 
                opacity: 1; 
                transform: translateY(0);
            }
        }

        /* MOBILE-OPTIMIZED HEADER */
        .page-header {
            padding-top: 100px;
            padding-bottom: var(--space-xl);
            text-align: center;
            max-width: 800px;
            margin: 0 auto;
            position: relative;
        }

        .header-background {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 100%;
            height: 150px;
            background: radial-gradient(circle at center, rgba(10, 132, 255, 0.03) 0%, transparent 70%);
            z-index: -1;
        }

        .page-title {
            font-family: 'SF Pro Display', sans-serif;
            font-size: 2.5rem;
            font-weight: 700;
            letter-spacing: -0.02em;
            line-height: 1.1;
            margin-bottom: var(--space-sm);
            color: var(--primary-black);
            position: relative;
            padding: 0 var(--space-sm);
        }

        .page-title::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 40px;
            height: 3px;
            background: linear-gradient(90deg, var(--future-color), var(--present-color));
            border-radius: 2px;
        }

        .page-subtitle {
            font-size: 1rem;
            font-weight: 400;
            line-height: 1.6;
            color: var(--medium-gray);
            max-width: 600px;
            margin: var(--space-lg) auto 0;
            opacity: 0.9;
            padding: 0 var(--space-sm);
        }

        /* MOBILE-FIRST CARDS GRID */
        .cards-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: var(--space-sm);
            max-width: 440px;
            margin: 0 auto var(--space-xl);
            position: relative;
        }

        /* MOBILE-OPTIMIZED TENSE CARD */
        .tense-card {
            background: var(--white);
            border-radius: var(--radius-lg);
            padding: var(--space-lg);
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            cursor: pointer;
            border: 1px solid rgba(0, 0, 0, 0.05);
            transition: all var(--transition-medium);
            position: relative;
            overflow: hidden;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .tense-card:active {
            transform: scale(0.98);
            transition: transform var(--transition-fast);
        }

        .card-icon-container {
            width: 64px;
            height: 64px;
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: var(--space-md);
            position: relative;
            z-index: 2;
            transition: all var(--transition-medium);
        }

        .card-title {
            font-family: 'SF Pro Display', sans-serif;
            font-size: 1.25rem;
            font-weight: 600;
            line-height: 1.3;
            margin-bottom: var(--space-xs);
            color: var(--primary-black);
            position: relative;
            z-index: 2;
        }

        .card-description {
            font-size: 0.875rem;
            line-height: 1.5;
            color: var(--medium-gray);
            margin-bottom: var(--space-md);
            max-width: 280px;
            position: relative;
            z-index: 2;
            opacity: 0.9;
        }

        .tense-tag {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 16px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            letter-spacing: 0.02em;
            position: relative;
            z-index: 2;
        }

        /* MOBILE-OPTIMIZED MODAL */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            display: none;
            justify-content: center;
            align-items: flex-end;
            z-index: 3000;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            opacity: 0;
            transition: opacity var(--transition-medium);
            padding: 0;
        }

        .modal-overlay.active {
            display: flex;
            opacity: 1;
        }

        .modal-content {
            background: var(--white);
            width: 100%;
            max-width: 100%;
            border-radius: var(--radius-xl) var(--radius-xl) 0 0;
            padding: 0;
            box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.12);
            transform: translateY(100%);
            transition: transform var(--transition-medium);
            max-height: 85vh;
            overflow: hidden;
            border: none;
            display: flex;
            flex-direction: column;
        }

        .modal-overlay.active .modal-content {
            transform: translateY(0);
        }

        /* Modal Header for Mobile */
        .modal-header {
            padding: var(--space-md) var(--space-sm);
            border-bottom: 1px solid rgba(0, 0, 0, 0.06);
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--white);
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .modal-title {
            font-family: 'SF Pro Display', sans-serif;
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--primary-black);
            letter-spacing: -0.01em;
        }

        .modal-close {
            background: rgba(0, 0, 0, 0.04);
            border: none;
            width: 40px;
            height: 40px;
            border-radius: var(--radius-full);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all var(--transition-medium);
            color: var(--medium-gray);
            position: relative;
            overflow: hidden;
            touch-action: manipulation;
        }

        /* MOBILE-OPTIMIZED PACKS */
        .packs-container {
            padding: var(--space-sm);
            max-height: calc(85vh - 73px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .pack-item {
            padding: var(--space-md);
            border: 1px solid rgba(0, 0, 0, 0.06);
            border-radius: var(--radius-md);
            margin-bottom: var(--space-xs);
            cursor: pointer;
            transition: all var(--transition-medium);
            background: var(--white);
            display: flex;
            align-items: flex-start;
            gap: var(--space-sm);
            position: relative;
            overflow: hidden;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .pack-item:active {
            transform: scale(0.98);
        }

        .pack-icon {
            width: 44px;
            height: 44px;
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 18px;
            transition: all var(--transition-medium);
            position: relative;
            overflow: hidden;
        }

        .pack-name {
            font-family: 'SF Pro Display', sans-serif;
            font-size: 1rem;
            font-weight: 600;
            color: var(--primary-black);
            margin-bottom: 4px;
            letter-spacing: -0.01em;
        }

        .pack-tense {
            font-size: 0.7rem;
            font-weight: 700;
            padding: 4px 10px;
            border-radius: 16px;
            flex-shrink: 0;
            letter-spacing: 0.03em;
            text-transform: uppercase;
        }

        .pack-description {
            font-size: 0.8rem;
            color: var(--medium-gray);
            line-height: 1.5;
            margin-bottom: var(--space-sm);
            opacity: 0.9;
        }

        .pack-details {
            display: flex;
            flex-direction: column;
            gap: var(--space-xs);
            font-size: 0.75rem;
            color: var(--medium-gray);
        }

        .pack-detail {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        /* Swipe indicator for modal */
        .swipe-indicator {
            width: 36px;
            height: 4px;
            background: rgba(0, 0, 0, 0.1);
            border-radius: 2px;
            margin: var(--space-xs) auto var(--space-sm);
            display: none;
        }

        /* MOBILE FOOTER */
        .page-footer {
            padding: var(--space-md) var(--space-sm);
            text-align: center;
            border-top: 1px solid rgba(0, 0, 0, 0.06);
            color: var(--light-gray);
            font-size: 0.8rem;
            line-height: 1.6;
            background: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            margin-top: var(--space-xl);
        }

        /* DESKTOP ENHANCEMENTS (Maintains original design) */
        @media (min-width: 768px) {
            .container {
                padding: 0 var(--space-md);
            }
            
            .nav-back {
                top: var(--space-lg);
                left: var(--space-lg);
            }
            
            .back-button {
                width: 48px;
                height: 48px;
            }
            
            .page-header {
                padding-top: 140px;
                padding-bottom: var(--space-xxl);
            }
            
            .page-title {
                font-size: 3.5rem;
                padding: 0;
            }
            
            .page-title::after {
                width: 60px;
                bottom: -12px;
            }
            
            .page-subtitle {
                font-size: 1.125rem;
                margin-top: var(--space-xl);
                padding: 0;
            }
            
            .cards-grid {
                grid-template-columns: repeat(2, 1fr);
                max-width: 700px;
                gap: var(--space-md);
            }
            
            .tense-card {
                padding: var(--space-xl);
                border-radius: var(--radius-xl);
            }
            
            .tense-card:hover {
                transform: translateY(-8px) scale(1.02);
                box-shadow: var(--shadow-xl);
                border-color: transparent;
            }
            
            .tense-card:active {
                transform: translateY(-4px) scale(1.01);
            }
            
            .card-icon-container {
                width: 80px;
                height: 80px;
                border-radius: var(--radius-lg);
                margin-bottom: var(--space-lg);
            }
            
            .tense-card:hover .card-icon-container {
                transform: translateY(-4px) scale(1.1);
            }
            
            .card-title {
                font-size: 1.5rem;
                margin-bottom: var(--space-sm);
            }
            
            .card-description {
                font-size: 0.95rem;
                margin-bottom: var(--space-lg);
            }
            
            .tense-tag {
                padding: 8px 20px;
                font-size: 0.8rem;
            }
            
            /* Desktop Modal */
            .modal-overlay {
                align-items: center;
                padding: var(--space-md);
                backdrop-filter: blur(20px);
            }
            
            .modal-content {
                width: 100%;
                max-width: 800px;
                border-radius: var(--radius-xl);
                transform: translateY(40px) scale(0.95);
                max-height: 80vh;
                border: 1px solid rgba(255, 255, 255, 0.2);
                backdrop-filter: blur(40px);
            }
            
            .modal-overlay.active .modal-content {
                transform: translateY(0) scale(1);
            }
            
            .modal-header {
                padding: var(--space-xl) var(--space-xl) var(--space-lg);
                background: rgba(255, 255, 255, 0.8);
                position: static;
            }
            
            .modal-title {
                font-size: 1.625rem;
            }
            
            .modal-close {
                width: 44px;
                height: 44px;
            }
            
            .packs-container {
                padding: var(--space-lg) var(--space-xl) var(--space-xl);
                max-height: 60vh;
            }
            
            .pack-item {
                padding: var(--space-lg);
                gap: var(--space-lg);
                margin-bottom: var(--space-sm);
            }
            
            .pack-item:hover {
                border-color: transparent;
                transform: translateX(8px);
                box-shadow: var(--shadow-lg);
            }
            
            .pack-item:active {
                transform: translateX(4px);
            }
            
            .pack-icon {
                width: 52px;
                height: 52px;
                font-size: 22px;
            }
            
            .pack-item:hover .pack-icon {
                transform: scale(1.15) rotate(5deg);
            }
            
            .pack-name {
                font-size: 1.125rem;
                margin-bottom: 6px;
            }
            
            .pack-tense {
                font-size: 0.75rem;
                padding: 6px 14px;
                margin-left: var(--space-sm);
            }
            
            .pack-description {
                font-size: 0.9rem;
                margin-bottom: var(--space-md);
            }
            
            .pack-details {
                flex-direction: row;
                gap: var(--space-lg);
                font-size: 0.85rem;
            }
            
            .pack-detail {
                gap: 8px;
            }
            
            .swipe-indicator {
                display: none;
            }
            
            .page-footer {
                padding: var(--space-xl) 0;
                font-size: 0.9rem;
                margin-top: var(--space-xxl);
            }
        }

        @media (min-width: 1200px) {
            .cards-grid {
                grid-template-columns: repeat(4, 1fr);
                max-width: 1140px;
                gap: var(--space-md);
            }
            
            .page-title {
                font-size: 4.25rem;
            }
        }

        /* Large Mobile Devices */
        @media (min-width: 480px) and (max-width: 767px) {
            .cards-grid {
                max-width: 440px;
            }
            
            .page-title {
                font-size: 2.75rem;
            }
            
            .modal-content {
                max-width: 440px;
                margin: 0 auto;
            }
            
            .pack-item {
                padding: var(--space-md);
            }
        }

        /* Touch-friendly improvements */
        @media (hover: none) and (pointer: coarse) {
            .tense-card:hover {
                transform: none;
            }
            
            .tense-card:active {
                transform: scale(0.98);
            }
            
            .pack-item:hover {
                transform: none;
            }
            
            .pack-item:active {
                transform: scale(0.98);
            }
            
            /* Improve touch targets */
            .tense-card,
            .pack-item,
            .back-button,
            .modal-close {
                min-height: 44px;
                min-width: 44px;
            }
        }

        /* Loading Animation */
        .loading-dots {
            display: inline-flex;
            gap: 4px;
        }

        .loading-dots span {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: currentColor;
            animation: pulse 1.4s ease-in-out infinite;
        }

        .loading-dots span:nth-child(2) { animation-delay: 0.2s; }
        .loading-dots span:nth-child(3) { animation-delay: 0.4s; }

        @keyframes pulse {
            0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
            30% { opacity: 1; transform: scale(1); }
        }

        /* Color-specific styling */
        .past .card-icon-container { color: var(--past-color); background: var(--past-light); }
        .present .card-icon-container { color: var(--present-color); background: var(--present-light); }
        .future .card-icon-container { color: var(--future-color); background: var(--future-light); }
        .mixed .card-icon-container { color: var(--mixed-color); background: var(--mixed-light); }

        .past .tense-tag { color: var(--past-color); background: var(--past-light); }
        .present .tense-tag { color: var(--present-color); background: var(--present-light); }
        .future .tense-tag { color: var(--future-color); background: var(--future-light); }
        .mixed .tense-tag { color: var(--mixed-color); background: var(--mixed-light); }

        .past .pack-icon { color: var(--past-color); background: var(--past-light); }
        .present .pack-icon { color: var(--present-color); background: var(--present-light); }
        .future .pack-icon { color: var(--future-color); background: var(--future-light); }
        .mixed .pack-icon { color: var(--mixed-color); background: var(--mixed-light); }

        .past .pack-tense { color: var(--past-color); background: var(--past-light); }
        .present .pack-tense { color: var(--present-color); background: var(--present-light); }
        .future .pack-tense { color: var(--future-color); background: var(--future-light); }
        .mixed .pack-tense { color: var(--mixed-color); background: var(--mixed-light); }
