/* ============================================
   Updevix Quiz Platform - Main Stylesheet
   Design Language: Matching updevix.com
   ============================================ */

/* CSS Variables */
:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #667eea;
    --secondary: #7c3aed;
    --accent: #06b6d4;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, #e8edf5 0%, #d4e0f7 50%, #e0ecff 100%);
    --gradient-button: linear-gradient(135deg, #4361ee 0%, #7c3aed 100%);
    --dark-bg: #1a1a2e;
    --dark-secondary: #16213e;
    --dark-tertiary: #0f3460;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --bg-body: #f0f4f8;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme="dark"] {
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --bg-body: #0f1117;
    --bg-white: #1a1d29;
    --bg-card: #1e2130;
    --border-color: #2d3748;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.4);
    --gradient-hero: linear-gradient(135deg, #0f1117 0%, #1a1d29 50%, #16192a 100%);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background-color: var(--dark-bg);
    padding: 0 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo-up {
    color: #667eea;
}

.logo-devix {
    color: #ffffff;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo-quiz {
    color: #a0aec0;
    font-weight: 400;
    font-size: 18px;
    margin-left: 6px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: #cbd5e0 !important;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 4px;
    position: relative;
}

.nav-link:hover {
    color: #ffffff !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-button);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-user {
    color: #a0aec0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.theme-toggle {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #cbd5e0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 15px;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu {
    display: none;
    background: var(--dark-secondary);
    padding: 15px 20px;
    flex-direction: column;
    gap: 10px;
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    color: #cbd5e0 !important;
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.mobile-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff !important;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-button);
    color: #fff;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(67, 97, 238, 0.45);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-outline {
    background: transparent;
    color: #cbd5e0;
    border: 1px solid rgba(255,255,255,0.25);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 17px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   HERO SECTION (Landing Page)
   ============================================ */
.hero {
    background: var(--gradient-hero);
    padding: 80px 0 60px;
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    max-width: 560px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.hero-badge i {
    color: var(--primary);
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--text-primary);
}

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

.hero-description {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-button);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Auth Forms in Hero */
.hero-form {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.form-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    background: var(--bg-body);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.form-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition);
    border: none;
    background: transparent;
    font-family: var(--font-family);
}

.form-tab.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: var(--transition);
    font-family: var(--font-family);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

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

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

select.form-input {
    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='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 6px;
}

.input-group {
    position: relative;
}

.input-group .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
}

.input-group .form-input {
    padding-left: 42px;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 15px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

[data-theme="dark"] .alert-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .alert-error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .alert-info {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

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

.card-body {
    padding: 28px;
}

.card-header {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 16px;
}

.card-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-body);
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-header {
    background: var(--gradient-primary);
    padding: 40px 0;
    color: #fff;
    margin-bottom: 30px;
}

.dashboard-welcome h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.dashboard-welcome p {
    color: rgba(255,255,255,0.8);
    font-size: 16px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
}

.stat-icon.blue { background: var(--gradient-button); }
.stat-icon.green { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.stat-icon.purple { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }
.stat-icon.orange { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }

.stat-info h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Quiz Cards Grid */
.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.quiz-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.quiz-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-light);
}

.quiz-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.quiz-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--gradient-button);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.quiz-badge {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-badge.active {
    background: #ecfdf5;
    color: #059669;
}

.quiz-badge.completed {
    background: #eff6ff;
    color: #2563eb;
}

.quiz-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.quiz-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.quiz-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.quiz-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.quiz-meta-item i {
    color: var(--primary);
    font-size: 14px;
}

/* ============================================
   QUIZ PAGE
   ============================================ */
.quiz-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.quiz-header {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.quiz-title-section h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.quiz-progress-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.quiz-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 18px;
}

.quiz-timer i {
    font-size: 16px;
}

.quiz-timer.warning {
    animation: pulse 1s infinite;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    margin-top: 16px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-button);
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* Question Card */
.question-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 32px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.question-number {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px;
    background: var(--gradient-button);
    color: #fff;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
}

.question-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
    text-transform: uppercase;
}

.question-type-badge.mcq { background: #dbeafe; color: #1d4ed8; }
.question-type-badge.aptitude { background: #fef3c7; color: #92400e; }
.question-type-badge.coding { background: #ede9fe; color: #6d28d9; }

[data-theme="dark"] .question-type-badge.mcq { background: rgba(59, 130, 246, 0.2); }
[data-theme="dark"] .question-type-badge.aptitude { background: rgba(245, 158, 11, 0.2); }
[data-theme="dark"] .question-type-badge.coding { background: rgba(139, 92, 246, 0.2); }

.question-text {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Options */
.options-grid {
    display: grid;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-white);
}

.option-item:hover {
    border-color: var(--primary-light);
    background: rgba(67, 97, 238, 0.04);
}

.option-item.selected {
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.08);
}

.option-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.option-item.selected .option-radio {
    border-color: var(--primary);
    background: var(--primary);
}

.option-item.selected .option-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

.option-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: 8px;
    min-width: 24px;
}

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

input[type="radio"] {
    display: none;
}

/* Coding Question */
.code-editor-wrapper {
    margin-top: 16px;
}

.code-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--dark-bg);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    color: #a0aec0;
    font-size: 13px;
}

.code-editor {
    width: 100%;
    min-height: 200px;
    padding: 18px;
    background: #1e1e2e;
    color: #e2e8f0;
    border: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    tab-size: 4;
}

.code-editor:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary);
}

/* Quiz Navigation */
.quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}

.question-dots {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px 0;
}

.question-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    background: var(--bg-white);
}

.question-dot.current {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(67, 97, 238, 0.1);
}

.question-dot.answered {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ============================================
   RESULT PAGE
   ============================================ */
.result-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.result-hero {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
}

.result-icon.pass {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.result-icon.fail {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}

.result-hero h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.result-hero .score {
    font-size: 48px;
    font-weight: 800;
    background: var(--gradient-button);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 30px;
}

.result-stat {
    padding: 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-body);
}

.result-stat h4 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.result-stat p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-stat.correct h4 { color: #10b981; }
.result-stat.wrong h4 { color: #ef4444; }
.result-stat.skipped h4 { color: #f59e0b; }

/* Answer Review */
.answer-review {
    margin-top: 30px;
}

.answer-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.answer-card.correct {
    border-left: 4px solid #10b981;
}

.answer-card.wrong {
    border-left: 4px solid #ef4444;
}

.answer-card.skipped {
    border-left: 4px solid #f59e0b;
}

.answer-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.answer-status.correct { background: #ecfdf5; color: #059669; }
.answer-status.wrong { background: #fef2f2; color: #dc2626; }
.answer-status.skipped { background: #fffbeb; color: #d97706; }

[data-theme="dark"] .answer-status.correct { background: rgba(16, 185, 129, 0.15); }
[data-theme="dark"] .answer-status.wrong { background: rgba(239, 68, 68, 0.15); }
[data-theme="dark"] .answer-status.skipped { background: rgba(245, 158, 11, 0.15); }

/* ============================================
   TABLE
   ============================================ */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    background: var(--bg-body);
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: rgba(67, 97, 238, 0.03);
}

/* ============================================
   SECTION STYLES
   ============================================ */
.section {
    padding: 40px 0;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* ============================================
   FORGOT PASSWORD / OTP
   ============================================ */
.auth-container {
    max-width: 460px;
    margin: 60px auto;
    padding: 0 20px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.auth-card h2 {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 30px;
}

.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 24px 0;
}

.otp-input {
    width: 50px;
    height: 56px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-primary);
    transition: var(--transition);
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--dark-bg);
    color: #a0aec0;
    padding: 40px 0 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-text {
    font-size: 14px;
    margin-top: 12px;
    line-height: 1.6;
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #a0aec0 !important;
    font-size: 14px;
}

.footer-links a:hover {
    color: #fff !important;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 13px;
}

.footer-bottom a {
    color: var(--primary-light) !important;
}

/* ============================================
   LOADING / SPINNER
   ============================================ */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.spinner-overlay.active {
    display: flex;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 30px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.page-btn.active,
.page-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.link { color: var(--primary); cursor: pointer; font-weight: 500; }
.link:hover { text-decoration: underline; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: #ecfdf5; color: #059669; }
.badge-danger { background: #fef2f2; color: #dc2626; }
.badge-warning { background: #fffbeb; color: #d97706; }
.badge-info { background: #eff6ff; color: #2563eb; }

[data-theme="dark"] .badge-success { background: rgba(16, 185, 129, 0.15); }
[data-theme="dark"] .badge-danger { background: rgba(239, 68, 68, 0.15); }
[data-theme="dark"] .badge-warning { background: rgba(245, 158, 11, 0.15); }
[data-theme="dark"] .badge-info { background: rgba(59, 130, 246, 0.15); }

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

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .hero {
        padding: 50px 0 40px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-form {
        padding: 28px;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .stat-number {
        font-size: 22px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .quiz-grid {
        grid-template-columns: 1fr;
    }

    .result-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .quiz-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }

    .otp-inputs {
        gap: 6px;
    }

    .otp-input {
        width: 42px;
        height: 48px;
        font-size: 18px;
    }

    .question-dots {
        gap: 5px;
    }

    .question-dot {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 26px;
    }

    .hero-form {
        padding: 22px;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 15px;
    }

    .result-hero {
        padding: 28px;
    }

    .result-hero .score {
        font-size: 36px;
    }

    .question-card {
        padding: 22px;
    }
}
