/**
 * NINAUN QUIZ - Main Stylesheet
 * Premium Mobile-First Design
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Primary Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    
    /* Secondary Colors */
    --secondary: #06b6d4;
    --secondary-dark: #0891b2;
    
    /* Accent Colors */
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    
    /* Success/Error Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --error: #ef4444;
    --error-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Text Colors */
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-400);
    
    /* Background Colors */
    --bg-primary: var(--white);
    --bg-secondary: var(--gray-50);
    --bg-dark: var(--gray-900);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-primary: 0 10px 30px -10px rgba(99, 102, 241, 0.4);
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 30px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Safe Area */
    --safe-bottom: env(safe-area-inset-bottom, 0);
    --safe-top: env(safe-area-inset-top, 0);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   LAYOUT
   ============================================ */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 80px;
}

.main-content {
    flex: 1;
    padding: var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   HEADER
   ============================================ */
.app-header {
    background: var(--bg-primary);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: var(--font-size-xl);
    color: var(--primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: var(--font-size-lg);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 100;
    padding-bottom: var(--safe-bottom);
}

.bottom-nav-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: var(--space-sm) 0;
    max-width: 600px;
    margin: 0 auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-muted);
    transition: all var(--transition-fast);
    border-radius: var(--radius-md);
}

.nav-item:hover {
    color: var(--primary);
    background: var(--gray-100);
}

.nav-item.active {
    color: var(--primary);
}

.nav-item i {
    font-size: 22px;
}

.nav-item span {
    font-size: var(--font-size-xs);
    font-weight: 500;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--gray-100);
}

.card-body {
    padding: var(--space-lg);
}

.card-footer {
    padding: var(--space-md) var(--space-lg);
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.card-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* ============================================
   COURSE CARDS
   ============================================ */
.course-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-base);
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.course-image {
    width: 100%;
    height: 160px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: var(--font-size-3xl);
    position: relative;
}

.course-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.badge-free {
    background: var(--success);
    color: var(--white);
}

.badge-paid {
    background: var(--accent);
    color: var(--white);
}

.course-content {
    padding: var(--space-lg);
}

.course-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    line-height: 1.4;
}

.course-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.course-price {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary);
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--gray-100);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    font-size: var(--font-size-base);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 35px -10px rgba(99, 102, 241, 0.5);
    color: var(--white);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-200);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: 16px 32px;
    font-size: var(--font-size-lg);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.form-label span {
    color: var(--error);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: var(--font-size-base);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input-error {
    border-color: var(--error);
}

.form-input-error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-error {
    font-size: var(--font-size-sm);
    color: var(--error);
    margin-top: var(--space-xs);
}

.form-hint {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px;
    padding-right: 48px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: var(--error-light);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: var(--info-light);
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.badge-success {
    background: var(--success-light);
    color: #065f46;
}

.badge-warning {
    background: var(--warning-light);
    color: #92400e;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-md);
}

.stat-icon.primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.stat-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-icon.info {
    background: var(--info-light);
    color: var(--info);
}

.stat-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* ============================================
   QUESTION CARD
   ============================================ */
.question-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-lg);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--gray-100);
}

.question-number {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--primary);
}

.question-timer {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.question-timer.warning {
    color: var(--error);
}

.question-text {
    font-size: var(--font-size-lg);
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: var(--space-xl);
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.option-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.option-item:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.02);
}

.option-item.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.option-item.correct {
    border-color: var(--success);
    background: var(--success-light);
}

.option-item.wrong {
    border-color: var(--error);
    background: var(--error-light);
}

.option-letter {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.option-item.selected .option-letter {
    background: var(--primary);
    color: var(--white);
}

.option-item.correct .option-letter {
    background: var(--success);
    color: var(--white);
}

.option-item.wrong .option-letter {
    background: var(--error);
    color: var(--white);
}

.option-text {
    font-size: var(--font-size-base);
    color: var(--text-primary);
}

/* ============================================
   RESULTS PAGE
   ============================================ */
.results-header {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-xl);
}

.result-score {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-full);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    position: relative;
}

.result-score::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-full);
    padding: 6px;
    background: var(--primary-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.result-score.pass {
    color: var(--success);
}

.result-score.fail {
    color: var(--error);
}

.score-value {
    font-size: var(--font-size-3xl);
    font-weight: 700;
}

.score-label {
    font-size: var(--font-size-xs);
    font-weight: 500;
    text-transform: uppercase;
}

.result-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.result-message {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.result-stat {
    text-align: center;
    padding: var(--space-md);
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.result-stat-value {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.result-stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform var(--transition-base);
}

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

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--gray-100);
}

.modal-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.modal-body {
    padding: var(--space-lg);
}

.modal-footer {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    border-top: 1px solid var(--gray-100);
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    font-size: var(--font-size-2xl);
    color: var(--text-muted);
}

.empty-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.empty-text {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

/* ============================================
   SEARCH
   ============================================ */
.search-box {
    position: relative;
    margin-bottom: var(--space-lg);
}

.search-input {
    width: 100%;
    padding: 14px 18px 14px 48px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: var(--font-size-base);
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* ============================================
   TABS
   ============================================ */
.tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
}

.tab {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    white-space: nowrap;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    background: transparent;
}

.tab:hover {
    color: var(--text-primary);
    background: var(--gray-100);
}

.tab.active {
    color: var(--white);
    background: var(--primary-gradient);
}

/* ============================================
   LANDING PAGE
   ============================================ */
.landing-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.landing-header {
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.landing-hero {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
}

.hero-title {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.hero-title span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 300px;
    margin: 0 auto;
}

.features-section {
    padding: var(--space-2xl) var(--space-lg);
}

.section-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-lg);
    max-width: 800px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-primary);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    font-size: var(--font-size-2xl);
    color: var(--white);
}

.feature-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.feature-text {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
}

.auth-header {
    padding: var(--space-lg);
    text-align: center;
}

.auth-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.auth-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    padding: var(--space-2xl);
}

.auth-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-xs);
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--gray-100);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-sidebar {
    display: none;
}

.admin-content {
    padding: var(--space-md);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.admin-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.data-table {
    width: 100%;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.data-table-header {
    display: none;
}

.data-table-row {
    display: flex;
    flex-direction: column;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--gray-100);
}

.data-table-row:last-child {
    border-bottom: none;
}

.data-table-cell {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
}

.data-table-cell::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-secondary);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        max-width: none;
    }
    
    .result-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) {
    .main-content {
        padding: var(--space-xl);
    }
    
    .courses-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
    
    .data-table-header {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        background: var(--gray-50);
        padding: var(--space-md) var(--space-lg);
        font-weight: 600;
        font-size: var(--font-size-sm);
        color: var(--text-secondary);
    }
    
    .data-table-row {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        align-items: center;
    }
    
    .data-table-cell {
        display: block;
        padding: 0;
    }
    
    .data-table-cell::before {
        display: none;
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .courses-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .admin-layout {
        display: grid;
        grid-template-columns: 260px 1fr;
        min-height: 100vh;
    }
    
    .admin-sidebar {
        display: block;
        background: var(--bg-primary);
        border-right: 1px solid var(--gray-200);
        padding: var(--space-lg);
    }
    
    .admin-sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: var(--space-xs);
    }
    
    .admin-sidebar-link {
        display: flex;
        align-items: center;
        gap: var(--space-md);
        padding: var(--space-md);
        border-radius: var(--radius-md);
        color: var(--text-secondary);
        font-weight: 500;
        transition: all var(--transition-fast);
    }
    
    .admin-sidebar-link:hover,
    .admin-sidebar-link.active {
        background: var(--primary-gradient);
        color: var(--white);
    }
    
    .bottom-nav {
        display: none;
    }
    
    .app-container {
        padding-bottom: 0;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .app-header,
    .bottom-nav,
    .btn {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-200);
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.4s ease forwards;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

.hidden { display: none; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
