/* ============================================
   QuizKaro - Main Stylesheet
   ============================================ */

/* ============================================
   CSS VARIABLES - आप यहां सारे colors बदल सकते हो
   EDITABLE: Change colors, fonts, sizes here
   ============================================ */
:root {
    /* Main Colors */
    --primary-color: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --secondary-color: #10B981;
    --secondary-light: #6EE7B7;
    --secondary-dark: #059669;
    
    /* Status Colors */
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;
    
    /* Neutral Colors */
    --dark-color: #1F2937;
    --gray-dark: #4B5563;
    --gray: #6B7280;
    --gray-light: #9CA3AF;
    --light-color: #F3F4F6;
    --lighter-color: #F9FAFB;
    --white: #FFFFFF;
    --black: #000000;
    
    /* Background Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-gradient: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    
    /* Text Colors */
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --text-white: #FFFFFF;
    
    /* Border */
    --border-color: #E5E7EB;
    --border-focus: #4F46E5;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Font Sizes */
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.875rem;
    --font-4xl: 2.25rem;
    --font-5xl: 3rem;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Container */
    --container-max: 1200px;
    --container-padding: 1rem;
}

/* ============================================
   DARK MODE - रात में आंखों की सुरक्षा के लिए
   ============================================ */
[data-theme="dark"] {
    --primary-color: #818CF8;
    --primary-light: #A5B4FC;
    --primary-dark: #6366F1;
    --secondary-color: #34D399;
    
    --dark-color: #F9FAFB;
    --gray-dark: #E5E7EB;
    --gray: #9CA3AF;
    --gray-light: #6B7280;
    --light-color: #1F2937;
    --lighter-color: #111827;
    --white: #1F2937;
    
    --bg-primary: #111827;
    --bg-secondary: #1F2937;
    
    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
    --text-light: #9CA3AF;
    
    --border-color: #374151;
    --border-focus: #818CF8;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.7;
    transition: background var(--transition), color var(--transition);
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--container-padding);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background: var(--bg-primary);
    box-shadow: var(--shadow);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand:hover {
    color: var(--primary-dark);
    transform: scale(1.05);
}

.navbar-brand i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    background: var(--primary-color);
    color: var(--white);
}

.nav-link.active {
    background: var(--primary-color);
    color: var(--white);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: var(--font-base);
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.5;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Button Variants */
.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    border-color: var(--secondary-dark);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-warning {
    background: var(--warning-color);
    color: var(--white);
}

.btn-info {
    background: var(--info-color);
    color: var(--white);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-light {
    background: var(--light-color);
    color: var(--text-primary);
}

.btn-dark {
    background: var(--dark-color);
    color: var(--white);
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--font-sm);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: var(--font-lg);
}

.btn-xl {
    padding: 1.25rem 2.5rem;
    font-size: var(--font-xl);
}

/* Full Width Button */
.btn-block {
    display: flex;
    width: 100%;
}

/* Icon Button */
.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Loading Button */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: var(--font-lg);
    color: var(--primary-color);
    background: var(--bg-primary);
}

.card-body {
    padding: var(--spacing-md);
}

.card-footer {
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.card-title {
    font-size: var(--font-xl);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Card with Gradient */
.card-gradient {
    background: var(--bg-gradient);
    color: var(--white);
    border: none;
}

.card-gradient .card-title,
.card-gradient .card-text {
    color: var(--white);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-sm);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--font-base);
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-control:disabled {
    background: var(--bg-secondary);
    cursor: not-allowed;
}

.form-control.error {
    border-color: var(--danger-color);
}

.form-control.success {
    border-color: var(--success-color);
}

textarea.form-control {
    min-height: 120px;
    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' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Error Message */
.error-message {
    color: var(--danger-color);
    font-size: var(--font-sm);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.error-message::before {
    content: '⚠️';
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
}

thead {
    background: var(--primary-color);
    color: var(--white);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: var(--font-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

tbody tr {
    transition: var(--transition-fast);
}

tbody tr:hover {
    background: rgba(79, 70, 229, 0.05);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Striped Table */
.table-striped tbody tr:nth-child(odd) {
    background: var(--bg-secondary);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: var(--spacing-md);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border-color: #6EE7B7;
}

.alert-danger {
    background: #FEE2E2;
    color: #991B1B;
    border-color: #FCA5A5;
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border-color: #FCD34D;
}

.alert-info {
    background: #DBEAFE;
    color: #1E40AF;
    border-color: #93C5FD;
}

.alert-dismissible {
    position: relative;
    padding-right: 3rem;
}

.btn-close {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.btn-close:hover {
    opacity: 1;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: var(--font-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-primary {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

/* ============================================
   GRID SYSTEM
   ============================================ */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col {
    flex: 1;
    padding: 0 0.75rem;
}

.col-1 { flex: 0 0 8.333%; max-width: 8.333%; padding: 0 0.75rem; }
.col-2 { flex: 0 0 16.666%; max-width: 16.666%; padding: 0 0.75rem; }
.col-3 { flex: 0 0 25%; max-width: 25%; padding: 0 0.75rem; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; padding: 0 0.75rem; }
.col-5 { flex: 0 0 41.666%; max-width: 41.666%; padding: 0 0.75rem; }
.col-6 { flex: 0 0 50%; max-width: 50%; padding: 0 0.75rem; }
.col-7 { flex: 0 0 58.333%; max-width: 58.333%; padding: 0 0.75rem; }
.col-8 { flex: 0 0 66.666%; max-width: 66.666%; padding: 0 0.75rem; }
.col-9 { flex: 0 0 75%; max-width: 75%; padding: 0 0.75rem; }
.col-10 { flex: 0 0 83.333%; max-width: 83.333%; padding: 0 0.75rem; }
.col-11 { flex: 0 0 91.666%; max-width: 91.666%; padding: 0 0.75rem; }
.col-12 { flex: 0 0 100%; max-width: 100%; padding: 0 0.75rem; }

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-info { color: var(--info-color); }
.text-muted { color: var(--text-secondary); }
.text-white { color: var(--white); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-normal { font-weight: 400; }

.text-xs { font-size: var(--font-xs); }
.text-sm { font-size: var(--font-sm); }
.text-base { font-size: var(--font-base); }
.text-lg { font-size: var(--font-lg); }
.text-xl { font-size: var(--font-xl); }
.text-2xl { font-size: var(--font-2xl); }
.text-3xl { font-size: var(--font-3xl); }

/* Spacing Utilities */
.m-0 { margin: 0; }
.m-1 { margin: var(--spacing-xs); }
.m-2 { margin: var(--spacing-sm); }
.m-3 { margin: var(--spacing-md); }
.m-4 { margin: var(--spacing-lg); }
.m-5 { margin: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

/* Display Utilities */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flex Utilities */
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }

/* Width & Height */
.w-full { width: 100%; }
.w-auto { width: auto; }
.h-full { height: 100%; }

/* Position */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* ============================================
   TIMER STYLES - टेस्ट का टाइमर
   ============================================ */
.timer-container {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.timer {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}

.timer.warning {
    color: var(--warning-color);
    animation: timerPulse 1s infinite;
}

.timer.danger {
    color: var(--danger-color);
    animation: timerPulse 0.5s infinite;
}

@keyframes timerPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* ============================================
   QUESTION STYLES
   ============================================ */
.question-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius-full);
    font-weight: 700;
    margin-bottom: 1rem;
}

.question-text {
    font-size: var(--font-lg);
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: var(--font-base);
    position: relative;
    padding-left: 3.5rem;
    background: var(--bg-primary);
}

.option-item:hover {
    border-color: var(--primary-light);
    background: rgba(79, 70, 229, 0.05);
}

.option-item.selected {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.1);
}

.option-item.correct {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.option-item.wrong {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.option-radio {
    position: absolute;
    left: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.option-label {
    cursor: pointer;
    flex: 1;
}

/* ============================================
   RESULT STYLES
   ============================================ */
.result-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.result-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.result-icon.pass {
    animation: bounce 0.6s ease;
}

.result-icon.fail {
    animation: shake 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.result-score {
    font-size: 4rem;
    font-weight: 800;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.result-stat {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
}

.result-stat-value {
    font-size: var(--font-2xl);
    font-weight: 700;
    color: var(--primary-color);
}

.result-stat-label {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ============================================
   LEADERBOARD STYLES
   ============================================ */
.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
    gap: 1rem;
}

.leaderboard-item:hover {
    background: rgba(79, 70, 229, 0.05);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.rank {
    font-size: var(--font-2xl);
    font-weight: 800;
    width: 3rem;
    text-align: center;
    flex-shrink: 0;
}

.rank.top-1 { color: #FFD700; font-size: var(--font-3xl); }
.rank.top-2 { color: #C0C0C0; font-size: var(--font-3xl); }
.rank.top-3 { color: #CD7F32; font-size: var(--font-3xl); }

.leaderboard-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    flex-shrink: 0;
}

.leaderboard-info {
    flex: 1;
    min-width: 0;
}

.leaderboard-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-stats {
    font-size: var(--font-sm);
    color: var(--text-secondary);
}

/* ============================================
   WALLET STYLES
   ============================================ */
.wallet-balance {
    background: var(--bg-gradient);
    color: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.wallet-amount {
    font-size: var(--font-4xl);
    font-weight: 800;
}

.wallet-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

/* ============================================
   LOADER & SPINNER
   ============================================ */
.loader {
    width: 3rem;
    height: 3rem;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
    margin: 2rem auto;
}

.loader-sm {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 3px;
}

.loader-lg {
    width: 4rem;
    height: 4rem;
    border-width: 5px;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 2rem;
}

.page-item {
    list-style: none;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition-fast);
    background: var(--bg-primary);
    cursor: pointer;
}

.page-link:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    font-size: var(--font-lg);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: var(--font-sm);
}

/* ============================================
   AD CONTAINER
   ============================================ */
.ad-container {
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    margin: 1.5rem 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: var(--font-sm);
}

.ad-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: var(--font-xs);
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* ============================================
   CHAT WIDGET
   ============================================ */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.chat-toggle {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-full);
    background: var(--primary-color);
    color: var(--white);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-toggle:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

/* ============================================
   DARK MODE TOGGLE
   ============================================ */
.dark-mode-toggle {
    cursor: pointer;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.25rem;
}

.dark-mode-toggle:hover {
    background: var(--bg-secondary);
}

/* ============================================
   PRINT STYLES (Certificate Print)
   ============================================ */
@media print {
    .navbar, .footer, .btn, .chat-widget, .ad-container, .dark-mode-toggle {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .certificate {
        border: 5px solid #000 !important;
        padding: 50px !important;
    }
}