/* ==========================================================================
   Magical Quiz Platform - Futuristic Design System
   ========================================================================== */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    --bg-dark: #0f0f1e;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-solid: #1a1a2e;
    --bg-overlay: rgba(15, 15, 30, 0.85);

    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.4);

    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-dark: linear-gradient(135deg, #0f0f1e 0%, #1a1a3e 50%, #0f0f1e 100%);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', 'Cairo', 'Poppins', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body.rtl {
    direction: rtl;
    text-align: right;
}

body.ltr {
    direction: ltr;
    text-align: left;
}

/* ==========================================================================
   Animated Background
   ========================================================================== */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.25) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        var(--gradient-dark);
    z-index: -2;
    animation: bgShift 20s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

@keyframes bgShift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(30deg); }
}

/* ==========================================================================
   Floating Particles
   ========================================================================== */
.particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.3;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    50% { transform: translate(50px, -80px) scale(1.2); opacity: 0.6; }
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.main-content {
    min-height: calc(100vh - 140px);
    padding: 40px 0;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    background: rgba(15, 15, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px var(--primary));
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: var(--shadow-glow);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.5); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.8); }
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
    list-style: none;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--gradient-primary);
    box-shadow: var(--shadow-glow);
}

.lang-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lang-toggle:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border-hover);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.6);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.card-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.762L10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

body.rtl select.form-control {
    background-position: left 16px center;
    padding-right: 16px;
    padding-left: 40px;
}

select.form-control option {
    background: var(--bg-card-solid);
    color: var(--text-primary);
}

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert-error,
.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(26, 26, 46, 0.4);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: rgba(99, 102, 241, 0.1);
}

.table th {
    padding: 14px 16px;
    text-align: inherit;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 14px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.table tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-primary { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
.badge-success { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.badge-danger { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.badge-info { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.badge-secondary { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    text-align: center;
    padding: 80px 20px 60px;
    position: relative;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 50%, #f0abfc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

@keyframes fadeInUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   Features Grid
   ========================================================================== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    padding: 40px 0;
}

.feature-card {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
    color: white;
    box-shadow: var(--shadow-glow);
    animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.feature-card:nth-child(2) .feature-icon {
    background: var(--gradient-2);
    animation-delay: 0.5s;
}

.feature-card:nth-child(3) .feature-icon {
    background: var(--gradient-3);
    animation-delay: 1s;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   Stats Cards
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: var(--gradient-primary);
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(40px);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==========================================================================
   Login / Register Page
   ========================================================================== */
.auth-container {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px;
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: fadeInScale 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: var(--gradient-primary);
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(60px);
}

@keyframes fadeInScale {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 2;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 32px;
    position: relative;
    z-index: 2;
}

.auth-link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-link:hover {
    color: var(--secondary);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   Quiz Cards
   ========================================================================== */
.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.quiz-card {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.quiz-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: -1;
}

.quiz-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.3);
}

.quiz-type-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: white;
}

.quiz-type-icon.objective { background: var(--gradient-1); }
.quiz-type-icon.essay { background: var(--gradient-2); }
.quiz-type-icon.mixed { background: var(--gradient-3); }

.quiz-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.quiz-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    min-height: 42px;
}

.quiz-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.quiz-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   Timer
   ========================================================================== */
.timer-container {
    position: sticky;
    top: 80px;
    z-index: 100;
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.timer {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid var(--primary);
    border-radius: var(--radius-xl);
    padding: 16px 28px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: var(--shadow-glow);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-variant-numeric: tabular-nums;
}

.timer.warning {
    border-color: var(--warning);
    color: var(--warning);
    animation: shake 0.5s infinite;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.6);
}

.timer.danger {
    border-color: var(--danger);
    color: var(--danger);
    animation: shake 0.3s infinite;
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.8);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.timer-icon {
    font-size: 1.3rem;
}

/* ==========================================================================
   Question Box
   ========================================================================== */
.question-box {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.question-box:hover {
    border-color: var(--border-hover);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.question-number {
    background: var(--gradient-primary);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--text-primary);
    line-height: 1.7;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.option-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    transform: translateX(4px);
}

body.rtl .option-item:hover {
    transform: translateX(-4px);
}

.option-item input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.option-item.selected {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--primary-light);
    font-weight: 700;
    border: 1px solid var(--border);
}

.option-label {
    flex: 1;
    color: var(--text-primary);
}

/* ==========================================================================
   Page Header
   ========================================================================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: rgba(15, 15, 30, 0.9);
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
    color: var(--text-muted);
    margin-top: 60px;
    backdrop-filter: blur(20px);
}

.footer a {
    color: var(--primary-light);
    text-decoration: none;
}

.footer a:hover {
    color: var(--secondary);
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Dashboard Layout
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.quick-action {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    display: block;
}

.quick-action:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.quick-action-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: inline-block;
}

.quick-action-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.quick-action-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Result Page
   ========================================================================== */
.result-hero {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 32px;
}

.result-score {
    font-size: 5rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 16px;
}

.result-label {
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-bottom: 8px;
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.w-full { width: 100%; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 12px;
    }

    .nav-links {
        justify-content: center;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .hero {
        padding: 40px 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .table th,
    .table td {
        padding: 10px;
        font-size: 0.85rem;
    }

    .card {
        padding: 20px;
    }

    .timer {
        font-size: 1.2rem;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}
