    
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
        
        /* Critical CSS for Above-the-Fold Content */
        :root {
            --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            --success-gradient: linear-gradient(135deg, #13B497 0%, #59D4A4 100%);
            --warning-gradient: linear-gradient(135deg, #FFA500 0%, #FF6347 100%);
            --card-gradient: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
            --dark-bg: #0a0a0f;
            --dark-card: rgba(20, 20, 35, 0.7);
            --light-bg: #f8f9fa;
            --light-card: rgba(255, 255, 255, 0.9);
            --text-primary: #ffffff;
            --text-secondary: #b8bcc8;
            --text-dark: #2c3e50;
            --text-light-secondary: #6c757d;
            --accent: #667eea;
            --coin-color: #FFD700;
            --glow-color: rgba(102, 126, 234, 0.5);
            --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        /* Light Mode Variables */
        [data-theme="light"] {
            --dark-bg: #f8f9fa;
            --dark-card: rgba(255, 255, 255, 0.9);
            --text-primary: #2c3e50;
            --text-secondary: #6c757d;
            --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        /* Base Styles */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background: var(--dark-bg);
            color: var(--text-primary);
            min-height: 100vh;
            overflow-x: hidden;
            position: relative;
            transition: all 0.3s ease;
        }

        /* Animated Background */
        .bg-animation {
            position: fixed;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            z-index: -1;
            background: linear-gradient(45deg, #0a0a0f, #1a1a2e, #16213e);
            overflow: hidden;
            transition: all 0.5s ease;
        }

        [data-theme="light"] .bg-animation {
            background: linear-gradient(45deg, #f8f9fa, #e9ecef, #dee2e6);
        }

        .bg-animation::before {
            content: '';
            position: absolute;
            width: 200%;
            height: 200%;
            top: -50%;
            left: -50%;
            background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
            animation: rotate 30s linear infinite;
        }

        @keyframes rotate {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Particle System */
        .particles {
            position: fixed;
            width: 100%;
            height: 100%;
            overflow: hidden;
            z-index: -1;
        }

        .particle {
            position: absolute;
            background: radial-gradient(circle, rgba(102, 126, 234, 0.8), transparent);
            border-radius: 50%;
            pointer-events: none;
            opacity: 0;
            animation: particleFloat 15s infinite;
        }

        @keyframes particleFloat {
            0% {
                opacity: 0;
                transform: translateY(100vh) scale(0);
            }
            10% {
                opacity: 1;
            }
            90% {
                opacity: 1;
            }
            100% {
                opacity: 0;
                transform: translateY(-100vh) scale(1.5);
            }
        }

        /* Confetti Celebration System */
        .confetti-container {
            position: fixed;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            pointer-events: none;
            z-index: 9999;
        }

        .confetti {
            position: absolute;
            width: 10px;
            height: 10px;
            background: var(--accent);
            animation: confettiFall 3s linear;
        }

        @keyframes confettiFall {
            0% {
                transform: translateY(-100vh) rotate(0deg);
                opacity: 1;
            }
            100% {
                transform: translateY(100vh) rotate(720deg);
                opacity: 0;
            }
        }

        /* Header */
        header {
            background: rgba(10, 10, 15, 0.9);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            padding: 0.75rem 0;
            position: sticky;
            top: 0;
            z-index: 1000;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: var(--shadow);
            transition: all 0.3s ease;
        }

        [data-theme="light"] header {
            background: rgba(255, 255, 255, 0.9);
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        }

        .header-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.5rem;
            font-weight: 800;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            animation: logoGlow 3s ease-in-out infinite alternate;
        }

        @keyframes logoGlow {
            from { filter: drop-shadow(0 0 5px rgba(102, 126, 234, 0.5)); }
            to { filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.8)); }
        }

        /* Theme Toggle Button */
        .theme-toggle {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 25px;
            padding: 0.5rem;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--text-primary);
        }

        .theme-toggle:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.05);
        }

        /* Mobile Navigation */
        .mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            color: var(--text-primary);
            font-size: 1.5rem;
            cursor: pointer;
        }

        .nav-menu {
            display: flex;
            gap: 1.5rem;
            list-style: none;
        }

        .nav-menu a {
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.3s ease;
            position: relative;
            font-weight: 500;
            font-size: 0.95rem;
        }

        .nav-menu a:hover {
            color: var(--text-primary);
        }

        .nav-menu a::after {
            content: '';
            position: absolute;
            bottom: -3px;
            left: 0;
            width: 0;
            height: 2px;
            background: var(--primary-gradient);
            transition: width 0.3s ease;
        }

        .nav-menu a:hover::after {
            width: 100%;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .coins-display {
            background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
            padding: 0.4rem 0.8rem;
            border-radius: 20px;
            display: flex;
            align-items: center;
            gap: 0.4rem;
            border: 1px solid rgba(255, 215, 0, 0.3);
            font-size: 0.9rem;
            animation: coinPulse 2s infinite;
        }

        @keyframes coinPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        .coins-display i {
            color: var(--coin-color);
            animation: coinSpin 3s linear infinite;
        }

        @keyframes coinSpin {
            0% { transform: rotateY(0deg); }
            100% { transform: rotateY(360deg); }
        }

        .profile-btn {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            background: var(--primary-gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
            position: relative;
        }

        .profile-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.5);
        }

        .level-badge {
            position: absolute;
            bottom: -5px;
            right: -5px;
            background: var(--success-gradient);
            color: white;
            font-size: 0.7rem;
            font-weight: bold;
            padding: 0.2rem 0.4rem;
            border-radius: 10px;
        }

        /* Main Content */
        main {
            max-width: 1200px;
            margin: 0 auto;
            padding: 1rem;
        }

        /* Hero Section */
        .hero {
            text-align: center;
            padding: 2rem 0;
            margin-bottom: 2rem;
            position: relative;
        }

        .hero h1 {
            font-size: 2.5rem;
            font-weight: 800;
            margin-bottom: 0.75rem;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: fadeInUp 0.8s ease;
        }

        .hero p {
            font-size: 1.1rem;
            color: var(--text-secondary);
            animation: fadeInUp 0.8s ease 0.2s both;
            max-width: 500px;
            margin: 0 auto;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Streak Counter */
        .streak-counter {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            margin-top: 1rem;
            font-size: 1.1rem;
            color: var(--accent);
        }

        .streak-counter i {
            animation: fireFlicker 1s ease-in-out infinite alternate;
        }

        @keyframes fireFlicker {
            from { transform: scale(1); }
            to { transform: scale(1.1); }
        }

        /* Daily Challenge Banner */
        .daily-challenge {
            background: var(--warning-gradient);
            border-radius: 15px;
            padding: 1rem;
            margin-bottom: 2rem;
            text-align: center;
            position: relative;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .daily-challenge:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 25px rgba(255, 165, 0, 0.3);
        }

        .daily-challenge::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent);
            animation: rotate 20s linear infinite;
        }

        .daily-challenge h3 {
            font-size: 1.2rem;
            margin-bottom: 0.5rem;
            position: relative;
            z-index: 1;
        }

        /* Daily Question Challenge */
        .daily-question {
            background: var(--dark-card);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 1.5rem;
            margin-bottom: 2rem;
            position: relative;
            overflow: hidden;
        }

        [data-theme="light"] .daily-question {
            background: var(--light-card);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .daily-question-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }

        .daily-question-title {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--accent);
        }

        .daily-question-timer {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 600;
        }

        .daily-question-content {
            margin-bottom: 1rem;
        }

        .daily-question-options {
            display: grid;
            gap: 0.75rem;
        }

        /* Spin Wheel - Fixed */
        .spin-wheel-container {
            background: var(--dark-card);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 1.5rem;
            margin-bottom: 2rem;
            text-align: center;
        }

        [data-theme="light"] .spin-wheel-container {
            background: var(--light-card);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .spin-wheel {
            width: 250px;
            height: 250px;
            margin: 0 auto 1rem;
            position: relative;
            border-radius: 50%;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            background: conic-gradient(
                #667eea 0deg 60deg,
                #f093fb 60deg 120deg,
                #13B497 120deg 180deg,
                #f5576c 180deg 240deg,
                #4facfe 240deg 300deg,
                #fa709a 300deg 360deg
            );
            transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
        }

        .spin-wheel-segment {
            position: absolute;
            width: 50%;
            height: 50%;
            transform-origin: right bottom;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: white;
        }

        .spin-wheel-pointer {
            position: absolute;
            top: -15px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 15px solid transparent;
            border-right: 15px solid transparent;
        /*  border-top: 30px solid #f5576c; */
            border-top: 30px solid #ffffff;
            z-index: 10;
        }

        .spin-wheel-text {
            position: absolute;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }

        .spin-wheel-text span {
            position: absolute;
            left: 50%;
            transform-origin: 0 125px;
            font-weight: bold;
            font-size: 14px;
            color: white;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
        }

        .spin-btn {
            background: var(--primary-gradient);
            color: white;
            border: none;
            border-radius: 25px;
            padding: 0.8rem 2rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .spin-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
        }

        .spin-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* Mystery Box - Fixed */
        .mystery-box {
            background: var(--dark-card);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 1.5rem;
            margin-bottom: 2rem;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        [data-theme="light"] .mystery-box {
            background: var(--light-card);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .mystery-box::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255, 215, 0, 0.1), transparent);
            animation: rotate 20s linear infinite;
        }

        .mystery-box-icon {
            font-size: 3rem;
            color: var(--coin-color);
            margin-bottom: 1rem;
            animation: float 3s ease-in-out infinite;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }

        .mystery-box-title {
            font-size: 1.3rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
        }

        .mystery-box-desc {
            color: var(--text-secondary);
            margin-bottom: 1rem;
        }

        .open-box-btn {
            background: var(--warning-gradient);
            color: white;
            border: none;
            border-radius: 25px;
            padding: 0.8rem 2rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .open-box-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(255, 165, 0, 0.4);
        }

        .mystery-box-reward {
            display: none;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            padding: 1rem;
            margin-top: 1rem;
            animation: slideDown 0.5s ease;
        }

        .mystery-box-reward.show {
            display: block;
        }

        .reward-icon {
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }

        .reward-name {
            font-weight: 600;
            margin-bottom: 0.2rem;
        }

        .reward-rarity {
            font-size: 0.8rem;
            padding: 0.2rem 0.5rem;
            border-radius: 10px;
            display: inline-block;
        }

        .reward-rarity.common {
            background: rgba(108, 117, 125, 0.2);
            color: #6c757d;
        }

        .reward-rarity.uncommon {
            background: rgba(23, 162, 184, 0.2);
            color: #17a2b8;
        }

        .reward-rarity.rare {
            background: rgba(102, 16, 242, 0.2);
            color: #6610f2;
        }

        .reward-rarity.legendary {
            background: linear-gradient(135deg, #FFD700, #FFA500);
            color: white;
        }

        /* Categories Section */
        .categories-section {
            margin-bottom: 2rem;
        }

        .section-title {
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            text-align: center;
            position: relative;
        }

        .section-title::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 3px;
            background: var(--primary-gradient);
            border-radius: 2px;
        }

        .categories-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1rem;
            margin-bottom: 2rem;
        }

        /* Category Cards */
        .category-card {
            background: var(--dark-card);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 1.5rem;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            box-shadow: var(--shadow);
        }

        [data-theme="light"] .category-card {
            background: var(--light-card);
            border: 1px solid rgba(0, 0, 0, 0.1);
            box-shadow: var(--shadow-light);
        }

        .category-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: var(--primary-gradient);
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }

        .category-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
            border-color: rgba(102, 126, 234, 0.5);
        }

        .category-card:hover::before {
            transform: scaleX(1);
        }

        .difficulty-indicator {
            position: absolute;
            top: 10px;
            right: 10px;
            display: flex;
            gap: 2px;
        }

        .difficulty-star {
            color: #FFD700;
            font-size: 0.8rem;
        }

        .category-icon {
            font-size: 2rem;
            margin-bottom: 0.75rem;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            display: inline-block;
            transition: all 0.3s ease;
        }

        .category-card:hover .category-icon {
            transform: scale(1.1);
        }

        .category-name {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 0.3rem;
        }

        .category-count {
            color: var(--text-secondary);
            font-size: 0.85rem;
        }

        /* Achievements Section */
        .achievements-section {
            margin-bottom: 2rem;
        }

        .achievements-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .achievement-card {
            background: var(--dark-card);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 1rem;
            text-align: center;
            transition: all 0.3s ease;
            position: relative;
        }

        [data-theme="light"] .achievement-card {
            background: var(--light-card);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .achievement-card.locked {
            opacity: 0.5;
            filter: grayscale(1);
        }

        .achievement-card.unlocked {
            animation: achievementUnlock 0.5s ease;
        }

        @keyframes achievementUnlock {
            0% { transform: scale(0.8) rotate(0deg); }
            50% { transform: scale(1.2) rotate(180deg); }
            100% { transform: scale(1) rotate(360deg); }
        }

        .achievement-icon {
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }

        .achievement-name {
            font-size: 0.9rem;
            font-weight: 600;
            margin-bottom: 0.2rem;
        }

        .achievement-desc {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }

        /* Performance Analytics Dashboard */
        .analytics-section {
            margin-bottom: 2rem;
        }

        .analytics-container {
            background: var(--dark-card);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 1.5rem;
            box-shadow: var(--shadow);
        }

        [data-theme="light"] .analytics-container {
            background: var(--light-card);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .analytics-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }

        .analytics-title {
            font-size: 1.5rem;
            font-weight: 700;
        }

        .analytics-tabs {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
        }

        .analytics-tab {
            padding: 0.5rem 1rem;
            background: rgba(255, 255, 255, 0.1);
            border: none;
            border-radius: 20px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .analytics-tab.active {
            background: var(--primary-gradient);
            color: white;
        }

        .analytics-content {
            display: grid;
            gap: 1.5rem;
        }

        .chart-container {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            padding: 1rem;
            height: 250px;
            position: relative;
        }

        .chart-title {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 1rem;
        }

        .chart {
            width: 100%;
            height: 200px;
            display: flex;
            align-items: flex-end;
            justify-content: space-around;
        }

        .bar {
            width: 30px;
            background: var(--primary-gradient);
            border-radius: 5px 5px 0 0;
            position: relative;
            transition: all 0.3s ease;
        }

        .bar:hover {
            transform: scaleY(1.05);
        }

        .bar-label {
            position: absolute;
            bottom: -25px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .bar-value {
            position: absolute;
            top: -25px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 0.8rem;
            font-weight: 600;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 1rem;
        }

        .stat-card {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            padding: 1rem;
            text-align: center;
        }

        .stat-value {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--accent);
            margin-bottom: 0.5rem;
        }

        .stat-label {
            font-size: 0.9rem;
            color: var(--text-secondary);
        }

        .heatmap-container {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            padding: 1rem;
        }

        .heatmap-title {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 1rem;
        }

        .heatmap {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 5px;
        }

        .heatmap-cell {
            aspect-ratio: 1;
            border-radius: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            font-weight: 600;
        }

        .heatmap-cell.low {
            background: rgba(102, 126, 234, 0.2);
        }

        .heatmap-cell.medium {
            background: rgba(102, 126, 234, 0.5);
        }

        .heatmap-cell.high {
            background: rgba(102, 126, 234, 0.8);
        }

        /* Leaderboard Section */
        .leaderboard-section {
            margin-bottom: 2rem;
        }

        .leaderboard-container {
            background: var(--dark-card);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 1.5rem;
            box-shadow: var(--shadow);
        }

        [data-theme="light"] .leaderboard-container {
            background: var(--light-card);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .leaderboard-tabs {
            display: flex;
            gap: 1rem;
            margin-bottom: 1.5rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .leaderboard-tab {
            padding: 0.5rem 1rem;
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
        }

        .leaderboard-tab.active {
            color: var(--text-primary);
        }

        .leaderboard-tab::after {
            content: '';
            position: absolute;
            bottom: -1px;
            left: 0;
            width: 100%;
            height: 2px;
            background: var(--primary-gradient);
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }

        .leaderboard-tab.active::after {
            transform: scaleX(1);
        }

        .leaderboard-list {
            list-style: none;
        }

        .leaderboard-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 0.75rem;
            border-radius: 10px;
            margin-bottom: 0.5rem;
            transition: all 0.3s ease;
        }

        .leaderboard-item:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        .leaderboard-rank {
            font-size: 1.2rem;
            font-weight: bold;
            width: 30px;
            text-align: center;
        }

        .leaderboard-rank.gold { color: #FFD700; }
        .leaderboard-rank.silver { color: #C0C0C0; }
        .leaderboard-rank.bronze { color: #CD7F32; }

        .leaderboard-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--primary-gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
        }

        .leaderboard-info {
            flex: 1;
        }

        .leaderboard-name {
            font-weight: 600;
            margin-bottom: 0.2rem;
        }

        .leaderboard-level {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .leaderboard-score {
            font-weight: bold;
            color: var(--accent);
        }

        /* Quiz Container */
        .quiz-container {
            display: none;
            background: var(--dark-card);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 1.5rem;
            max-width: 700px;
            margin: 0 auto;
            box-shadow: var(--shadow);
            position: relative;
        }

        [data-theme="light"] .quiz-container {
            background: var(--light-card);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .quiz-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .quiz-progress {
            flex: 1;
            min-width: 200px;
        }

        .progress-bar {
            height: 8px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: var(--primary-gradient);
            border-radius: 4px;
            transition: width 0.5s ease;
            position: relative;
            overflow: hidden;
        }

        .progress-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            animation: progressShine 2s infinite;
        }

        @keyframes progressShine {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        .quiz-timer {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            font-size: 1rem;
            font-weight: 600;
            padding: 0.4rem 0.8rem;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 15px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .quiz-timer.warning {
            background: rgba(255, 165, 0, 0.2);
            border-color: rgba(255, 165, 0, 0.5);
            animation: timerPulse 1s infinite;
        }

        @keyframes timerPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        .question-container {
            margin-bottom: 1.5rem;
        }

        .question {
            font-size: 1.3rem;
            font-weight: 600;
            margin-bottom: 1.5rem;
            animation: fadeIn 0.5s ease;
            line-height: 1.4;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .options {
            display: grid;
            gap: 0.75rem;
        }

        .option {
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 1rem 1.2rem;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            font-size: 1rem;
            font-weight: 500;
        }

        .option::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: rgba(102, 126, 234, 0.3);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: width 0.5s ease, height 0.5s ease;
        }

        .option:hover {
            transform: translateX(3px);
            border-color: var(--accent);
            box-shadow: 0 3px 15px rgba(102, 126, 234, 0.2);
        }

        .option:hover::before {
            width: 100%;
            height: 100%;
        }

        .option.selected {
            background: rgba(102, 126, 234, 0.2);
            border-color: var(--accent);
            transform: translateX(3px);
        }

        .option.correct {
            background: rgba(19, 180, 151, 0.2);
            border-color: #13B497;
            animation: correctPulse 0.5s ease;
        }

        @keyframes correctPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.02); }
        }

        .option.incorrect {
            background: rgba(245, 87, 108, 0.2);
            border-color: #f5576c;
            animation: shake 0.5s ease;
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-5px); }
            75% { transform: translateX(5px); }
        }

        /* Enhanced Power-ups */
        .powerups {
            display: flex;
            gap: 0.75rem;
            margin-bottom: 1.5rem;
            justify-content: center;
            flex-wrap: wrap;
        }

        .powerup {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 0.6rem 1rem;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.9rem;
            position: relative;
        }

        .powerup:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
            border-color: var(--accent);
        }

        .powerup.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .powerup.disabled:hover {
            transform: none;
            box-shadow: none;
        }

        .powerup-cost {
            color: var(--coin-color);
            font-weight: bold;
        }

        /* Hint System */
        .hint-container {
            background: rgba(255, 165, 0, 0.1);
            border: 1px solid rgba(255, 165, 0, 0.3);
            border-radius: 10px;
            padding: 1rem;
            margin-bottom: 1rem;
            display: none;
            animation: slideDown 0.3s ease;
        }

        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .hint-container.show {
            display: block;
        }

        .hint-text {
            color: var(--text-secondary);
            font-size: 0.9rem;
            font-style: italic;
        }

        /* Question Explanation */
        .explanation-container {
            background: rgba(19, 180, 151, 0.1);
            border: 1px solid rgba(19, 180, 151, 0.3);
            border-radius: 10px;
            padding: 1rem;
            margin-top: 1rem;
            display: none;
            animation: slideDown 0.3s ease;
        }

        .explanation-container.show {
            display: block;
        }

        .explanation-text {
            color: var(--text-secondary);
            font-size: 0.9rem;
        }

        /* Quiz Actions */
        .quiz-actions {
            display: flex;
            justify-content: space-between;
            margin-top: 1.5rem;
            gap: 1rem;
        }

        /* Enhanced Buttons */
        .btn {
            padding: 0.7rem 1.5rem;
            border: none;
            border-radius: 20px;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            flex: 1;
        }

        .btn::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: width 0.5s ease, height 0.5s ease;
        }

        .btn:hover::before {
            width: 300px;
            height: 300px;
        }

        .btn-primary {
            background: var(--primary-gradient);
            color: white;
            box-shadow: 0 3px 15px rgba(102, 126, 234, 0.3);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
        }

        .btn-secondary {
            background: transparent;
            color: var(--text-primary);
            border: 2px solid rgba(255, 255, 255, 0.2);
        }

        .btn-secondary:hover {
            transform: translateY(-2px);
            border-color: var(--accent);
            box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
        }

        /* Results Container with Share Feature - Fixed */
        .results-container {
            display: none;
            text-align: center;
            background: var(--dark-card);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 2rem;
            max-width: 500px;
            margin: 0 auto;
            box-shadow: var(--shadow);
        }

        [data-theme="light"] .results-container {
            background: var(--light-card);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .results-score {
            font-size: 3.5rem;
            font-weight: 900;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 0.75rem;
            animation: scoreGlow 2s ease-in-out infinite alternate;
        }

        @keyframes scoreGlow {
            from { filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.5)); }
            to { filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.8)); }
        }

        .results-message {
            font-size: 1.3rem;
            font-weight: 600;
            margin-bottom: 1.5rem;
            color: var(--text-secondary);
        }

        .results-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            margin-bottom: 1.5rem;
        }

        .stat-card {
            background: rgba(255, 255, 255, 0.05);
            padding: 1rem;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
        }

        .stat-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
        }

        .stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--accent);
            margin-bottom: 0.3rem;
        }

        .stat-label {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        /* Share Results - Fixed */
        .share-results {
            display: flex;
            gap: 1rem;
            justify-content: center;
            margin-top: 1rem;
            margin-bottom: 1.5rem;
        }

        .share-btn {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            color: var(--text-primary);
            font-size: 1.2rem;
        }

        .share-btn:hover {
            transform: scale(1.1);
            background: rgba(255, 255, 255, 0.2);
        }

        .share-btn.facebook:hover { 
            background: #1877f2; 
            color: white; 
            border-color: #1877f2;
        }
        
        .share-btn.twitter:hover { 
            background: #1da1f2; 
            color: white; 
            border-color: #1da1f2;
        }
        
        .share-btn.whatsapp:hover { 
            background: #25d366; 
            color: white; 
            border-color: #25d366;
        }

        /* Profile Modal */
        .profile-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 2000;
            align-items: center;
            justify-content: center;
        }

        .profile-modal.show {
            display: flex;
        }

        .profile-content {
            background: var(--dark-card);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            padding: 2rem;
            max-width: 500px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            position: relative;
        }

        [data-theme="light"] .profile-content {
            background: var(--light-card);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .profile-header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .profile-avatar {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background: var(--primary-gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1rem;
            font-size: 3rem;
            color: white;
        }

        .profile-name {
            font-size: 1.5rem;
            font-weight: bold;
            margin-bottom: 0.5rem;
        }

        .profile-level {
            color: var(--accent);
            font-weight: 600;
        }

        .profile-stats {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .profile-stat {
            background: rgba(255, 255, 255, 0.05);
            padding: 1rem;
            border-radius: 10px;
            text-align: center;
        }

        .profile-stat-value {
            font-size: 1.5rem;
            font-weight: bold;
            color: var(--accent);
        }

        .profile-stat-label {
            font-size: 0.9rem;
            color: var(--text-secondary);
        }

        .close-modal {
            position: absolute;
            top: 1rem;
            right: 1rem;
            background: none;
            border: none;
            color: var(--text-primary);
            font-size: 1.5rem;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .close-modal:hover {
            transform: rotate(90deg);
        }

        /* Loading Animation */
        .loading-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 3000;
            align-items: center;
            justify-content: center;
        }

        .loading-overlay.show {
            display: flex;
        }

        .loader {
            width: 60px;
            height: 60px;
            border: 3px solid rgba(255, 255, 255, 0.1);
            border-top-color: var(--accent);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            position: relative;
        }

        .loader::before {
            content: '';
            position: absolute;
            top: 5px;
            left: 5px;
            right: 5px;
            bottom: 5px;
            border: 3px solid rgba(255, 255, 255, 0.1);
            border-top-color: var(--accent);
            border-radius: 50%;
            animation: spin 0.8s linear reverse infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Floating Action Button */
        .fab {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: var(--primary-gradient);
            color: white;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
            transition: all 0.3s ease;
            z-index: 1000;
        }

        .fab:hover {
            transform: scale(1.1);
            box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
        }

        /* Ad Space */
        .ad-space {
            background: rgba(255, 255, 255, 0.05);
            border: 1px dashed rgba(255, 255, 255, 0.2);
            border-radius: 10px;
            padding: 1.5rem;
            text-align: center;
            margin: 1.5rem 0;
            color: var(--text-secondary);
            font-size: 0.9rem;
        }

        /* Footer */
        footer {
            background: rgba(10, 10, 15, 0.9);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            padding: 2rem 0 1rem;
            margin-top: 3rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        [data-theme="light"] footer {
            background: rgba(255, 255, 255, 0.9);
            border-top: 1px solid rgba(0, 0, 0, 0.1);
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 1rem;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .footer-section h3 {
            margin-bottom: 1rem;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            font-weight: 600;
            font-size: 1.1rem;
        }

        .footer-section ul {
            list-style: none;
        }

        .footer-section li {
            margin-bottom: 0.5rem;
        }

        .footer-section a {
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.3s ease;
            font-size: 0.9rem;
        }

        .footer-section a:hover {
            color: var(--text-primary);
        }

        .footer-bottom {
            text-align: center;
            padding-top: 1.5rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--text-secondary);
            font-size: 0.85rem;
        }

        /* Toast Notification */
        .toast {
            position: fixed;
            bottom: 1rem;
            right: 1rem;
            background: var(--dark-card);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 10px;
            padding: 0.8rem 1.2rem;
            display: none;
            align-items: center;
            gap: 0.8rem;
            animation: slideIn 0.3s ease;
            z-index: 2000;
            box-shadow: var(--shadow);
            font-size: 0.9rem;
        }

        @keyframes slideIn {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        .toast.show {
            display: flex;
        }

        .toast.success {
            border-color: #13B497;
        }

        .toast.error {
            border-color: #f5576c;
        }

        /* Install Prompt */
        .install-prompt {
            position: fixed;
            bottom: 1rem;
            left: 1rem;
            background: var(--dark-card);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 10px;
            padding: 1rem;
            display: none;
            align-items: center;
            gap: 1rem;
            z-index: 1000;
            max-width: 300px;
        }

        [data-theme="light"] .install-prompt {
            background: var(--light-card);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .install-prompt.show {
            display: flex;
        }

        .install-prompt-text {
            flex: 1;
            font-size: 0.9rem;
        }

        .install-prompt-btn {
            background: var(--primary-gradient);
            color: white;
            border: none;
            border-radius: 20px;
            padding: 0.5rem 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .install-prompt-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
        }

        .install-prompt-close {
            background: none;
            border: none;
            color: var(--text-primary);
            cursor: pointer;
            font-size: 1.2rem;
        }

        /* Notification Permission Prompt */
        .notification-prompt {
            position: fixed;
            top: 5rem;
            right: 1rem;
            background: var(--dark-card);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 10px;
            padding: 1rem;
            display: none;
            align-items: center;
            gap: 1rem;
            z-index: 1000;
            max-width: 300px;
        }

        [data-theme="light"] .notification-prompt {
            background: var(--light-card);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .notification-prompt.show {
            display: flex;
        }

        .notification-prompt-text {
            flex: 1;
            font-size: 0.9rem;
        }

        .notification-prompt-btn {
            background: var(--primary-gradient);
            color: white;
            border: none;
            border-radius: 20px;
            padding: 0.5rem 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .notification-prompt-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
        }

        .notification-prompt-close {
            background: none;
            border: none;
            color: var(--text-primary);
            cursor: pointer;
            font-size: 1.2rem;
        }

        /* Responsive Design */
        @media (max-width: 576px) {
            html {
                font-size: 14px;
            }

            .mobile-menu-btn {
                display: block;
            }

            .nav-menu {
                display: none;
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background: rgba(10, 10, 15, 0.95);
                backdrop-filter: blur(20px);
                flex-direction: column;
                padding: 1rem;
                gap: 0.5rem;
                border-top: 1px solid rgba(255, 255, 255, 0.1);
            }

            .nav-menu.active {
                display: flex;
            }

            .hero h1 {
                font-size: 2rem;
            }

            .categories-grid {
                grid-template-columns: 1fr;
            }

            .achievements-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .results-stats {
                grid-template-columns: 1fr;
            }

            .quiz-actions {
                flex-direction: column;
            }

            .fab {
                width: 50px;
                height: 50px;
                bottom: 1rem;
                right: 1rem;
            }

            .particles {
                display: none;
            }

            .analytics-tabs {
                flex-wrap: wrap;
            }

            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .install-prompt {
                left: 0.5rem;
                right: 0.5rem;
                max-width: none;
            }

            .notification-prompt {
                left: 0.5rem;
                right: 0.5rem;
                max-width: none;
            }
        }

        @media (min-width: 577px) and (max-width: 768px) {
            .categories-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .achievements-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        /* Touch-friendly adjustments */
        @media (hover: none) {
            .option:hover {
                transform: none;
            }

            .category-card:hover {
                transform: none;
            }

            .btn:hover {
                transform: none;
            }
        }

        /* Reduce motion for accessibility */
        @media (prefers-reduced-motion: reduce) {
            * {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
        }
    