/**
 * NATIVE MOBILE APP UNIFIED FRAMEWORK - FINAL
 * Purpose: 100% Native Mobile Application Experience
 * Version: 3.0.0 - Complete Native Transformation
 * 
 * This file provides:
 * - Complete footer hiding on mobile
 * - Native iOS/Android color schemes
 * - Native app-like interactions
 * - Consistent typography and spacing
 * - Touch-optimized interface
 * - Native app layouts and components
 */

/* ===================================
   CRITICAL MOBILE FOUNDATION
   =================================== */

/* Prevent horizontal scroll and ensure proper mobile viewport */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    margin: 0;
    padding: 0;
}

/* iOS-style smooth scrolling */
html {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Enhanced text rendering for mobile */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overscroll-behavior: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f2f2f7;
    color: #000;
}

/* Allow text selection in content areas */
.content-area,
.question-text,
.option-text,
input,
textarea,
p,
div,
span,
a,
h1, h2, h3, h4, h5, h6,
.card-body,
.practice-container,
.public-practice-container,
.subject-container,
.topic-container,
.question-item,
.option {
    -webkit-user-select: text;
    user-select: text;
}

/* Prevent text selection on buttons and navigation */
button, .btn, .nav-item, .navbar-brand {
    -webkit-user-select: none;
    user-select: none;
}

/* ===================================
   NATIVE APP COLOR SCHEME
   =================================== */

:root {
    /* iOS Native Colors */
    --ios-blue: #007AFF;
    --ios-green: #34C759;
    --ios-orange: #FF9500;
    --ios-red: #FF3B30;
    --ios-purple: #AF52DE;
    --ios-pink: #FF2D92;
    --ios-teal: #5AC8FA;
    --ios-indigo: #5856D6;
    --ios-gray: #8E8E93;
    --ios-gray2: #AEAEB2;
    --ios-gray3: #C7C7CC;
    --ios-gray4: #D1D1D6;
    --ios-gray5: #E5E5EA;
    --ios-gray6: #F2F2F7;
    
    /* Android Material Colors */
    --android-blue: #2196F3;
    --android-green: #4CAF50;
    --android-orange: #FF9800;
    --android-red: #F44336;
    --android-purple: #9C27B0;
    --android-pink: #E91E63;
    --android-teal: #009688;
    --android-indigo: #3F51B5;
    
    /* Native App Backgrounds */
    --native-bg-primary: #FFFFFF;
    --native-bg-secondary: #F2F2F7;
    --native-bg-tertiary: #FFFFFF;
    --native-bg-grouped: #F2F2F7;
    
    /* Native App Text Colors */
    --native-text-primary: #000000;
    --native-text-secondary: #3C3C43;
    --native-text-tertiary: #3C3C43;
    --native-text-quaternary: #3C3C43;
    
    /* Native App Separators */
    --native-separator: #C6C6C8;
    --native-separator-opaque: #38383A;
    
    /* Native App Shadows */
    --native-shadow-small: 0 1px 3px rgba(0, 0, 0, 0.1);
    --native-shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
    --native-shadow-large: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --native-bg-primary: #1C1C1E;
        --native-bg-secondary: #000000;
        --native-bg-tertiary: #2C2C2E;
        --native-bg-grouped: #000000;
        
        --native-text-primary: #FFFFFF;
        --native-text-secondary: #EBEBF5;
        --native-text-tertiary: #EBEBF5;
        --native-text-quaternary: #EBEBF5;
        
        --native-separator: #38383A;
        --native-separator-opaque: #C6C6C8;
    }
    
    body {
        background-color: #000000;
        color: #FFFFFF;
    }
}

/* ===================================
   COMPLETE FOOTER HIDING ON MOBILE
   =================================== */

/* Hide ALL footers on mobile devices */
@media (max-width: 767px) {
    footer,
    .footer,
    .site-footer,
    .main-footer,
    .page-footer,
    [class*="footer"],
    .mobile-footer-hidden {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    /* Ensure body doesn't have bottom padding for footer */
    body {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* Adjust main content to fill full height */
    main,
    .main-content,
    #main-content {
        min-height: calc(100vh - 60px); /* Account for top nav only */
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
}

/* ===================================
   NATIVE TOUCH INTERACTIONS
   =================================== */

/* Remove tap highlights and add native touch feedback */
* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-touch-callout: none;
}

/* Touch-friendly button sizing */
@media (max-width: 767px) {
    .btn, button, a.btn {
        min-height: 48px;
        min-width: 48px;
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
        border-radius: 12px;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        font-weight: 500;
    }
    
    .btn-sm {
        min-height: 44px;
        min-width: 44px;
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        min-height: 52px;
        min-width: 52px;
        padding: 0.875rem 1.5rem;
        font-size: 1.125rem;
    }
}

/* Native touch feedback */
@media (hover: none) and (pointer: coarse) {
    .btn:active,
    a:active,
    button:active,
    .card:active,
    .list-group-item:active,
    .nav-item:active,
    .subject-card:active,
    .topic-card:active,
    .question-item:active,
    .option:active {
        opacity: 0.7;
        transform: scale(0.98);
        transition: all 0.1s ease;
    }
}

/* ===================================
   NATIVE NAVIGATION SYSTEM
   =================================== */

/* Top Navigation - Enhanced Visibility */
@media (max-width: 767px) {
    .navbar {
        background: linear-gradient(135deg, #007AFF 0%, #0056b3 100%) !important;
        box-shadow: 0 2px 20px rgba(0, 122, 255, 0.15);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0.75rem 1rem;
    }
    
    .navbar-brand,
    .nav-link {
        color: #ffffff !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
        font-weight: 600;
        font-size: 0.95rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
        font-weight: 700;
    }
    
    .navbar-toggler {
        min-height: 44px;
        min-width: 44px;
        padding: 0.5rem 0.75rem;
        border: 2px solid rgba(255, 255, 255, 0.3);
        color: white;
    }
    
    .navbar-nav .nav-link {
        min-height: 44px;
        padding: 0.75rem 1rem;
        display: flex;
        align-items: center;
        border-radius: 8px;
        margin-bottom: 0.25rem;
        color: white !important;
    }
    
    .navbar-nav .nav-link:active {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Mobile Bottom Navigation - Enhanced Native Style */
@media (max-width: 767px) {
    .native-mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 85px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 1000;
        padding: 10px 0;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1);
    }
    
    .native-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 100%;
        text-decoration: none;
        color: #8b8b8b;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 11px;
        font-weight: 500;
        gap: 6px;
        position: relative;
        min-height: 65px;
        padding: 8px 4px;
        border-radius: 12px;
        margin: 0 2px;
    }
    
    .native-nav-item .nav-icon {
        font-size: 26px;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        color: inherit;
    }
    
    .native-nav-item .nav-label {
        font-size: 11px;
        font-weight: 500;
        line-height: 1.2;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    /* Active state with iOS-style indicators */
    .native-nav-item.active {
        color: #007AFF;
        background: rgba(0, 122, 255, 0.08);
        transform: scale(1.02);
    }
    
    .native-nav-item.active .nav-icon {
        transform: scale(1.1);
        color: #007AFF;
    }
    
    .native-nav-item.active::before {
        content: '';
        position: absolute;
        top: 4px;
        left: 50%;
        transform: translateX(-50%);
        width: 30px;
        height: 3px;
        background: #007AFF;
        border-radius: 0 0 6px 6px;
        box-shadow: 0 1px 3px rgba(0, 122, 255, 0.3);
    }
    
    /* Touch feedback */
    .native-nav-item:active {
        transform: scale(0.96);
        background: rgba(0, 0, 0, 0.05);
    }
    
    .native-nav-item.active:active {
        background: rgba(0, 122, 255, 0.15);
        transform: scale(0.96);
    }
    
    /* Body padding for fixed bottom nav */
    body {
        padding-bottom: 85px;
    }
    
    body.practice-question-page {
        padding-bottom: 0;
    }
}

/* Desktop: hide mobile-only elements */
@media (min-width: 768px) {
    .native-mobile-nav {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
}

/* ===================================
   MOBILE-FIRST TYPOGRAPHY
   =================================== */

@media (max-width: 767px) {
    body {
        font-size: 0.9375rem; /* 15px */
        line-height: 1.6;
    }
    
    /* Optimized headings for mobile */
    h1, .h1 {
        font-size: 1.75rem; /* 28px */
        line-height: 1.2;
        margin-bottom: 1rem;
        font-weight: 700;
        color: var(--native-text-primary);
    }
    
    h2, .h2 {
        font-size: 1.5rem; /* 24px */
        line-height: 1.3;
        margin-bottom: 0.875rem;
        font-weight: 600;
        color: var(--native-text-primary);
    }
    
    h3, .h3 {
        font-size: 1.25rem; /* 20px */
        line-height: 1.3;
        margin-bottom: 0.75rem;
        font-weight: 600;
        color: var(--native-text-primary);
    }
    
    h4, .h4 {
        font-size: 1.125rem; /* 18px */
        line-height: 1.4;
        margin-bottom: 0.75rem;
        font-weight: 600;
        color: var(--native-text-primary);
    }
    
    h5, .h5 {
        font-size: 1rem; /* 16px */
        line-height: 1.4;
        margin-bottom: 0.625rem;
        font-weight: 600;
        color: var(--native-text-primary);
    }
    
    h6, .h6 {
        font-size: 0.9375rem; /* 15px */
        line-height: 1.4;
        margin-bottom: 0.625rem;
        font-weight: 600;
        color: var(--native-text-primary);
    }
    
    /* Enhanced link styling */
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 2px;
        color: #007AFF;
        transition: all 0.2s ease;
    }
    
    a:hover {
        text-decoration-thickness: 2px;
        color: #0056b3;
    }
}

/* ===================================
   NATIVE MOBILE CARDS & CONTAINERS
   =================================== */

@media (max-width: 767px) {
    .card {
        border-radius: 16px;
        margin-bottom: 1rem;
        border: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        transition: all 0.3s ease;
        background: var(--native-bg-primary);
    }
    
    .card:hover {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
        transform: translateY(-2px);
    }
    
    .card-header {
        padding: 1.25rem 1.5rem;
        border-radius: 16px 16px 0 0;
        background: linear-gradient(135deg, #007AFF 0%, #0056b3 100%);
        border-bottom: none;
        font-weight: 600;
        color: white;
    }
    
    .card-body {
        padding: 1.5rem;
        background: var(--native-bg-primary);
    }
    
    .card-footer {
        padding: 1.25rem 1.5rem;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-radius: 0 0 16px 16px;
    }
    
    /* Container spacing */
    .container,
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ===================================
   HERO SECTION NATIVE OPTIMIZATION
   =================================== */

/* Hero section for all screen sizes */
.mobile-hero-optimized {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #007AFF 0%, #0056b3 100%);
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    margin-top: 0;
    z-index: 1;
    visibility: visible !important;
    opacity: 1 !important;
}

@media (max-width: 575px) {
    .mobile-hero-optimized {
        min-height: 40vh !important;
        height: 40vh !important;
        padding: 2rem 1rem 1.5rem 1rem;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .mobile-hero-optimized {
        min-height: 45vh !important;
        height: 45vh !important;
        padding: 3rem 1rem 2rem 1rem;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .mobile-hero-optimized {
        min-height: 50vh !important;
        height: 50vh !important;
        padding: 4rem 2rem 3rem 2rem;
    }
}

@media (min-width: 992px) {
    .mobile-hero-optimized {
        min-height: 55vh !important;
        height: 55vh !important;
        padding: 5rem 2rem 4rem 2rem;
    }
}

/* Hero content styling for all screen sizes */
.hero-slide-title {
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: white !important;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    visibility: visible !important;
    opacity: 1 !important;
}

.hero-slide-subtitle {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95) !important;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    visibility: visible !important;
    opacity: 1 !important;
}

.hero-slide-description {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9) !important;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix hero content positioning for all screen sizes */
.hero-fallback-content,
.hero-slide-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

.hero-slide-buttons {
    position: relative;
    z-index: 2;
    margin-top: 1rem;
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.hero-slide-buttons .btn {
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-flex !important;
    min-width: 200px;
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
    min-height: 44px;
    border-radius: 12px;
    margin: 0.25rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-slide-buttons .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ===================================
   PUBLIC PRACTICE PAGES NATIVE STYLING
   =================================== */

@media (max-width: 767px) {
    .public-practice-container {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .filter-section {
        background: white;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 16px;
        padding: 1.25rem;
        margin-bottom: 1rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        transition: all 0.3s ease;
    }
    
    .filter-section:hover {
        box-shadow: 0 8px 30px rgba(0, 122, 255, 0.12);
        transform: translateY(-2px);
    }
    
    .filter-title {
        font-size: 1.1rem;
        font-weight: 600;
        color: #1f2937;
        margin-bottom: 0.75rem;
        text-align: center;
    }
    
    .subject-card {
        background: white;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 16px;
        transition: all 0.3s ease;
        height: 100%;
        overflow: hidden;
        position: relative;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }
    
    .subject-card:hover {
        border-color: #007AFF;
        box-shadow: 0 8px 30px rgba(0, 122, 255, 0.15);
        transform: translateY(-4px);
    }
    
    .subject-header {
        background: linear-gradient(135deg, #007AFF 0%, #0056b3 100%);
        color: white;
        padding: 1.25rem 1.5rem;
        font-size: 1rem;
        font-weight: 600;
        text-align: center;
        position: relative;
    }
    
    .subject-header::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #34D399 0%, #10B981 100%);
    }
    
    .subject-body {
        padding: 1.5rem;
    }
    
    .subject-description {
        font-size: 0.9rem;
        color: #6b7280;
        margin-bottom: 1rem;
        line-height: 1.5;
        text-align: center;
    }
    
    .subject-stats {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
    }
    
    .stat-item {
        text-align: center;
        flex: 1;
    }
    
    .stat-number {
        display: block;
        font-size: 1.25rem;
        font-weight: 700;
        color: #007AFF;
        margin-bottom: 0.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .btn-start-practice {
        background: #007AFF;
        border: none;
        color: white;
        padding: 0.875rem 1.5rem;
        border-radius: 12px;
        font-weight: 600;
        transition: all 0.2s ease;
        width: 100%;
        margin-top: 1rem;
        font-size: 0.95rem;
    }
    
    .btn-start-practice:hover {
        background: #0056b3;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
        color: white;
    }
}

/* ===================================
   TOPIC & QUESTION PAGES NATIVE STYLING
   =================================== */

@media (max-width: 767px) {
    .topic-container,
    .subject-container {
        background: #f8f9fa;
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .page-header {
        background: white;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        padding: 1rem 0;
        margin-bottom: 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }
    
    .page-title {
        font-size: 1.4rem;
        font-weight: 700;
        color: #1f2937;
        margin: 0;
    }
    
    .page-subtitle {
        font-size: 0.9rem;
        color: #6b7280;
        margin: 0.25rem 0 0 0;
    }
    
    .questions-card {
        background: white;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 16px;
        padding: 1rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }
    
    .questions-header {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
        font-weight: 600;
        color: #1f2937;
        margin: -1rem -1rem 1rem -1rem;
        border-radius: 16px 16px 0 0;
    }
    
    .question-item {
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 12px;
        padding: 1.25rem;
        margin-bottom: 1rem;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .question-item:hover {
        background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
        border-color: #007AFF;
        box-shadow: 0 4px 15px rgba(0, 122, 255, 0.1);
        transform: translateY(-2px);
    }
    
    .question-item:last-child {
        margin-bottom: 0;
    }
    
    .question-title {
        color: #1f2937;
        font-weight: 600;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .question-meta {
        color: #6b7280;
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }
    
    .question-actions {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .btn-practice,
    .btn-view {
        background: #007AFF;
        border: none;
        color: white;
        padding: 0.5rem 1rem;
        border-radius: 8px;
        font-size: 0.85rem;
        font-weight: 500;
        transition: all 0.2s ease;
    }
    
    .btn-practice:hover,
    .btn-view:hover {
        background: #0056b3;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
        color: white;
    }
}

/* ===================================
   PRACTICE QUESTION PAGES NATIVE STYLING
   =================================== */

@media (max-width: 767px) {
    .practice-container {
        background: #f8f9fa;
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .practice-card {
        background: white;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        overflow: hidden;
    }
    
    .practice-card .card-header {
        background: linear-gradient(135deg, #007AFF 0%, #0056b3 100%);
        color: white;
        border: none;
        padding: 1.25rem 1.5rem;
        font-weight: 600;
    }
    
    .question-meta {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 1rem;
        border: 1px solid rgba(0, 0, 0, 0.08);
    }
    
    .question-meta-flex {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .question-text {
        background: white;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 12px;
        padding: 1.25rem;
        margin-bottom: 1rem;
        font-size: 1rem;
        line-height: 1.6;
        color: #1f2937;
    }
    
    .options {
        margin-bottom: 1.5rem;
    }
    
    .option {
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 0.75rem;
        transition: all 0.2s ease;
        cursor: pointer;
    }
    
    .option:hover {
        background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
        border-color: #007AFF;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0, 122, 255, 0.1);
    }
    
    .option input[type="radio"] {
        margin-right: 0.75rem;
        transform: scale(1.2);
    }
    
    .option label {
        cursor: pointer;
        font-size: 0.95rem;
        line-height: 1.5;
        color: #1f2937;
    }
    
    .actions {
        display: flex;
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .actions .btn {
        flex: 1;
        min-width: 120px;
        font-weight: 500;
    }
    
    .btn-primary {
        background: #007AFF;
        border: none;
        color: white;
    }
    
    .btn-primary:hover {
        background: #0056b3;
        color: white;
    }
    
    .btn-outline-primary {
        border: 1px solid #007AFF;
        color: #007AFF;
        background: white;
    }
    
    .btn-outline-primary:hover {
        background: #007AFF;
        color: white;
    }
}

/* ===================================
   FORM ELEMENTS NATIVE STYLING
   =================================== */

@media (max-width: 767px) {
    .form-control,
    .form-select,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="url"],
    input[type="search"],
    select,
    textarea {
        min-height: 48px;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-radius: 12px;
        border: 2px solid #e5e7eb;
        background: #ffffff;
        transition: all 0.2s ease;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .form-control:focus,
    .form-select:focus {
        border-color: #007AFF;
        box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
        outline: none;
    }
    
    .form-label,
    label {
        font-weight: 600;
        margin-bottom: 0.5rem;
        font-size: 0.875rem;
        color: #1f2937;
    }
    
    .form-check-input {
        width: 24px;
        height: 24px;
        margin-top: 0;
        cursor: pointer;
    }
    
    .form-check-label {
        padding-left: 0.5rem;
        cursor: pointer;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ===================================
   DARK MODE SUPPORT
   =================================== */

@media (prefers-color-scheme: dark) {
    .navbar {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
    }
    
    .native-mobile-nav {
        background: rgba(28, 28, 30, 0.98);
        border-top-color: rgba(255, 255, 255, 0.1);
    }
    
    .native-nav-item {
        color: #8e8e93;
    }
    
    .native-nav-item.active {
        color: #0a84ff;
        background: rgba(10, 132, 255, 0.15);
    }
    
    .native-nav-item.active .nav-icon {
        color: #0a84ff;
    }
    
    .native-nav-item.active::before {
        background: #0a84ff;
        box-shadow: 0 1px 3px rgba(10, 132, 255, 0.3);
    }
    
    .card {
        background: #1f2937;
        border-color: #374151;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .card-header {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }
    
    .card-footer {
        background: #374151;
        border-color: #4b5563;
    }
    
    .form-control,
    .form-select {
        background: #1f2937;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .form-control:focus,
    .form-select:focus {
        border-color: #0a84ff;
        box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
    }
    
    .public-practice-container,
    .topic-container,
    .subject-container,
    .practice-container {
        background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    }
    
    .filter-section,
    .subject-card,
    .questions-card,
    .practice-card {
        background: #1f2937;
        border-color: #374151;
    }
    
    .subject-header {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }
    
    .question-item {
        background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
        border-color: #4b5563;
    }
    
    .question-text {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .option {
        background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
        border-color: #4b5563;
    }
    
    .option label {
        color: #f9fafb;
    }
}

/* ===================================
   ACCESSIBILITY ENHANCEMENTS
   =================================== */

/* Focus indicators */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.nav-link:focus-visible,
.native-nav-item:focus-visible {
    outline: 3px solid #007AFF;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor !important;
    }
    
    .form-control,
    .form-select {
        border-width: 2px !important;
    }
    
    .card {
        border: 2px solid currentColor !important;
    }
    
    .native-nav-item.active::before {
        background: #000 !important;
        box-shadow: none !important;
    }
}

/* ===================================
   PERFORMANCE OPTIMIZATIONS
   =================================== */

/* Hardware acceleration for animations */
.btn,
.card,
.native-nav-item,
.hero-slide,
.subject-card,
.question-item,
.option {
    will-change: transform;
    transform: translateZ(0);
}

/* Prevent layout shifts */
img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* Lazy loading support */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    .native-mobile-nav,
    .navbar,
    .btn,
    button,
    .hero-slider-controls {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.native-hidden { display: none !important; }
.native-visible { display: block !important; }
.native-flex { display: flex !important; }
.native-inline-flex { display: inline-flex !important; }

.native-text-center { text-align: center !important; }
.native-text-left { text-align: left !important; }
.native-text-right { text-align: right !important; }

.native-justify-center { justify-content: center !important; }
.native-justify-between { justify-content: space-between !important; }
.native-justify-around { justify-content: space-around !important; }

.native-align-center { align-items: center !important; }
.native-align-start { align-items: flex-start !important; }
.native-align-end { align-items: flex-end !important; }

.native-flex-column { flex-direction: column !important; }
.native-flex-row { flex-direction: row !important; }

.native-flex-1 { flex: 1 !important; }
.native-flex-wrap { flex-wrap: wrap !important; }

.native-w-full { width: 100% !important; }
.native-h-full { height: 100% !important; }

.native-rounded { border-radius: 12px !important; }
.native-rounded-lg { border-radius: 16px !important; }
.native-rounded-full { border-radius: 50% !important; }

.native-shadow { box-shadow: var(--native-shadow-small) !important; }
.native-shadow-md { box-shadow: var(--native-shadow-medium) !important; }
.native-shadow-lg { box-shadow: var(--native-shadow-large) !important; }

.native-border { border: 1px solid var(--native-separator) !important; }
.native-border-t { border-top: 1px solid var(--native-separator) !important; }
.native-border-b { border-bottom: 1px solid var(--native-separator) !important; }
.native-border-l { border-left: 1px solid var(--native-separator) !important; }
.native-border-r { border-right: 1px solid var(--native-separator) !important; }
