/* Import Vazirmatn Font */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* New Color Theme */
    --dark-color: #201E1F;
    --primary-color: #FF4000;
    --primary-dark: #E63900;
    --secondary-color: #FAAA8D;
    --accent-color: #50B2C0;
    --light-bg: #FEEFDD;
    
    /* Legacy colors (for compatibility) */
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #FEEFDD;
    --card-bg: #ffffff;
    --text-primary: #201E1F;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(32, 30, 31, 0.1), 0 1px 2px 0 rgba(32, 30, 31, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(32, 30, 31, 0.1), 0 4px 6px -2px rgba(32, 30, 31, 0.05);
}

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

/* Enhanced header/navbar visuals */
.navbar {
    border-radius: 0 0 18px 18px;
    padding: 1rem 0.5rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(32,30,31,0.12);
}

.nav-menu .btn {
    border-radius: 12px;
    padding: 0.5rem 0.9rem;
    box-shadow: 0 6px 18px rgba(255,64,0,0.08);
}

.nav-menu .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

/* Mobile nav menu background panel for better UX */
.nav-menu {
    transition: all 0.25s ease;
}

.nav-menu.active {
    background: rgba(255,255,255,0.96);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(32,30,31,0.08);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-brand h2 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
}

.nav-brand h2:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    padding: 0.625rem 0.75rem;
    gap: 0.3rem;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(255, 64, 0, 0.2);
    transition: all 0.3s ease;
}

.nav-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 64, 0, 0.3);
}

.nav-toggle:active {
    transform: translateY(0);
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-close {
    display: none; /* Hidden in desktop by default */
}

.user-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(250, 170, 141, 0.1) 0%, transparent 70%);
    animation: pulse 20s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.auth-box {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(32, 30, 31, 0.3);
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: var(--dark-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(32, 30, 31, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
    background: white;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    left: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 1;
    color: var(--text-secondary);
}

.password-toggle:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.password-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.password-toggle .eye-icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
    user-select: none;
    color: var(--text-secondary);
}

.password-toggle:hover .eye-icon {
    color: var(--primary-color);
}

.password-toggle .eye-icon-hidden,
.password-toggle .eye-icon-visible {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.75rem;
    padding: 1rem;
    background: rgba(254, 239, 221, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(32, 30, 31, 0.1);
}

.strength-indicators {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.strength-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.strength-item .strength-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.strength-item.valid {
    color: var(--accent-color);
}

.strength-item.valid .strength-icon {
    color: var(--accent-color);
    font-weight: bold;
}

.strength-text {
    flex: 1;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: rgba(32, 30, 31, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.strength-progress {
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s ease;
    width: 0%;
}

.strength-progress.weak {
    background: var(--primary-color);
}

.strength-progress.medium {
    background: var(--secondary-color);
}

.strength-progress.strong {
    background: var(--accent-color);
}

/* Password Match Indicator */
.password-match {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.password-match .match-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.password-match.matched {
    color: var(--accent-color);
}

.password-match.matched .match-icon {
    color: var(--accent-color);
    font-weight: bold;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 64, 0, 0.15);
    background: var(--light-bg);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #FF6B2B 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 64, 0, 0.3);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 64, 0, 0.4);
}

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

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

.btn-outline-primary {
    background: transparent;
    color: #0d6efd;
    border: 2px solid #0d6efd;
    transition: all 0.3s;
}

.btn-outline-primary:hover {
    background: #0d6efd;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.05) 100%);
    color: #92400e;
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-right: 4px solid #f59e0b;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(185, 28, 28, 0.05) 100%);
    color: #991b1b;
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-right: 4px solid #dc2626;
}

.alert-error {
    background: rgba(255, 64, 0, 0.1);
    color: var(--primary-dark);
    border: 1px solid var(--secondary-color);
    border-right: 4px solid var(--primary-color);
}

.alert-success {
    background: rgba(80, 178, 192, 0.1);
    color: #0d7377;
    border: 1px solid var(--accent-color);
    border-right: 4px solid var(--accent-color);
}

/* Dashboard */
.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Prevent large illustrations from overflowing the dashboard or footer.
   Common causes: a large source image used without size constraints or
   an image included accidentally in page content. These rules are
   defensive and should not break intentionally full-bleed images.
*/
.dashboard-header img,
.hero-illustration img,
.section img,
.container img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Keep dashboard/hero illustrations visually balanced. Limit their
   maximum rendered width so they don't dominate the page layout. */
.dashboard-header .hero-illustration,
.hero-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-header img,
.hero-illustration img {
    max-width: 360px; /* changeable: set smaller if you prefer */
    width: 100%;
    height: auto;
    margin: 0 auto 1rem;
    object-fit: contain;
}

/* Extra defensive rule for the site brand file that was used in footer
   and (unexpectedly) elsewhere. This ensures ideas.png never appears
   oversized if inserted without a class. */
img[src$="ideas.png"] {
    max-width: 140px;
    width: auto;
    height: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(32, 30, 31, 0.1);
    display: flex;
    align-items: center;
    gap: 2rem; /* Increased from 1.5rem */
    transition: all 0.3s;
    border: 1px solid rgba(32, 30, 31, 0.05);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(32, 30, 31, 0.15);
    border-color: var(--primary-color);
}

.stat-icon {
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.section {
    margin-bottom: 3rem;
}

.section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Quiz Grid */
.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.quiz-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(32, 30, 31, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(32, 30, 31, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.quiz-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(32, 30, 31, 0.15);
    border-color: var(--primary-color);
}

.quiz-header {
    background: linear-gradient(135deg, rgba(255, 64, 0, 0.05) 0%, rgba(255, 64, 0, 0.02) 100%);
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 2px solid rgba(255, 64, 0, 0.1);
}

.quiz-header h3 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.4;
}

.quiz-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

.quiz-info {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color) 0%, #FF6B2B 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(255, 64, 0, 0.25);
    transition: all 0.2s;
}

.badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 64, 0, 0.35);
}

.badge-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 2px 10px rgba(107, 114, 128, 0.25);
    color: white;
}

.badge-secondary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.35);
}

.badge-success {
    background: linear-gradient(135deg, var(--accent-color) 0%, #6BC5D1 100%);
    box-shadow: 0 2px 8px rgba(80, 178, 192, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    color: white;
}

.btn-success::before {
    content: '▶';
    font-size: 0.9rem;
    margin-left: 0.25rem;
}

.badge-error {
    background: var(--danger-color);
}

/* Quiz Page */
.quiz-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.quiz-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.quiz-meta {
    margin-top: 1rem;
    color: var(--text-secondary);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.timer-badge {
    background: linear-gradient(135deg, #FF6B35 0%, #FF4000 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(255, 64, 0, 0.4);
    min-width: 100px;
    justify-content: center;
}

.timer-badge i {
    font-size: 1.3rem;
}

.timer-badge #timer-text {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    letter-spacing: 2px;
    direction: ltr;
    display: inline-block;
}

.deadline-info {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, rgba(80, 178, 192, 0.15) 0%, rgba(107, 197, 209, 0.15) 100%);
    border-radius: 12px;
    color: #0d7377;
    font-weight: 600;
    border: 2px solid rgba(80, 178, 192, 0.3);
    box-shadow: 0 2px 8px rgba(80, 178, 192, 0.2);
}

.deadline-info i {
    font-size: 1.2rem;
    color: var(--accent-color);
}

.quiz-deadline {
    margin: 0 1.5rem 1rem 1.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(80, 178, 192, 0.1) 0%, rgba(107, 197, 209, 0.1) 100%);
    border-radius: 12px;
    border: 2px solid rgba(80, 178, 192, 0.2);
    box-shadow: 0 2px 8px rgba(80, 178, 192, 0.15);
}

.quiz-deadline small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #0d7377;
}

.quiz-deadline i {
    color: var(--accent-color);
    font-size: 1rem;
}

.quiz-deadline .text-danger {
    color: #dc2626;
    font-weight: 600;
    margin-right: 0.25rem;
}

.quiz-container {
    margin-bottom: 2rem;
}

.question-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

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

.question-points {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.question-text {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.8;
}

/* Markdown Styles */
.question-text h1,
.question-text h2,
.question-text h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.question-text h1 {
    font-size: 1.5rem;
}

.question-text h2 {
    font-size: 1.3rem;
}

.question-text h3 {
    font-size: 1.1rem;
}

.question-text strong {
    font-weight: 700;
    color: var(--text-primary);
}

.question-text em {
    font-style: italic;
}

.question-text code {
    background: rgba(32, 30, 31, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    direction: ltr;
    text-align: left;
    display: inline-block;
}

.question-text pre {
    background: rgba(32, 30, 31, 0.05);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    direction: ltr;
    text-align: left;
}

.question-text pre code {
    background: none;
    padding: 0;
    direction: ltr;
    text-align: left;
    display: block;
}

.question-text ul,
.question-text ol {
    margin: 1rem 0;
    padding-right: 2rem;
}

.question-text li {
    margin: 0.5rem 0;
}

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

.question-text a:hover {
    text-decoration: underline;
}

.question-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.option:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.option input[type="radio"] {
    margin-left: 1rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option-label {
    flex: 1;
    font-size: 1rem;
    color: var(--text-primary);
}

.quiz-footer {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* Results */
.result-header {
    text-align: center;
    margin-bottom: 2rem;
}

.result-summary {
    margin-bottom: 3rem;
}

.result-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 2rem;
    flex-wrap: wrap;
}

.result-score h2 {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.result-score p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.progress-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-color) 0deg, var(--border-color) 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-circle::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--card-bg);
}

.progress-circle span {
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.answers-review {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.answer-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-right: 4px solid;
}

.answer-card.correct {
    border-right-color: var(--secondary-color);
}

.answer-card.incorrect {
    border-right-color: var(--danger-color);
}

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.answer-details {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.answer-item {
    padding: 0.5rem 0;
}

.text-success {
    color: var(--secondary-color);
    font-weight: 500;
}

.text-error {
    color: var(--danger-color);
    font-weight: 500;
}

.all-options {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(32, 30, 31, 0.03);
    border-radius: 8px;
}

.all-options strong {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-item {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.option-item.correct-option {
    border-color: var(--secondary-color);
    background: rgba(250, 170, 141, 0.1);
}

.option-item.user-option {
    border-color: var(--primary-color);
    background: rgba(255, 64, 0, 0.05);
}

.option-item.correct-option.user-option {
    border-color: var(--secondary-color);
    background: rgba(250, 170, 141, 0.15);
    box-shadow: 0 2px 8px rgba(250, 170, 141, 0.2);
}

.result-actions {
    text-align: center;
    margin-top: 2rem;
}

/* Table */
.results-table {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(32, 30, 31, 0.1);
    border: 1px solid rgba(32, 30, 31, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, #FF6B2B 100%);
    color: white;
}

th, td {
    padding: 1rem;
    text-align: right;
}

tbody tr {
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background: rgba(255, 64, 0, 0.05);
}

tbody tr:last-child {
    border-bottom: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(32, 30, 31, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(32, 30, 31, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .navbar {
        position: relative;
    }
    
    .navbar .container {
        flex-wrap: wrap;
        position: relative;
    }
    
    .nav-toggle {
        display: flex;
        order: 2;
    }
    
    .nav-brand {
        order: 1;
        flex: 1;
    }
    
    .nav-brand h2 {
        font-size: 1.5rem;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 3;
        gap: 0.75rem;
        padding: 1rem 0;
        border-top: 1px solid var(--border-color);
        margin-top: 1rem;
        position: relative;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-close {
        display: flex !important; /* Show in mobile */
        position: absolute;
        top: 0.5rem;
        left: 0.5rem;
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 1.25rem;
        transition: all 0.3s;
        z-index: 10;
    }
    
    .nav-close:hover {
        background: var(--primary-dark);
        transform: scale(1.1);
    }
    
    .nav-menu .user-info {
        text-align: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .nav-menu .btn {
        width: 100%;
        justify-content: center;
    }

    /* Auth Pages - Mobile */
    .auth-container {
        padding: 1rem;
        min-height: 100vh;
    }

    .auth-box {
        padding: 1.5rem;
        max-width: 100%;
        border-radius: 12px;
    }

    .auth-header h1 {
        font-size: 1.75rem;
    }

    .auth-header p {
        font-size: 0.85rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group input {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    .btn-primary {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }

    .auth-footer {
        font-size: 0.9rem;
        margin-top: 1.25rem;
        padding-top: 1.25rem;
    }

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

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

    .result-card {
        flex-direction: column;
        text-align: center;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    .auth-container {
        padding: 0.5rem;
    }

    .auth-box {
        padding: 1.25rem;
        border-radius: 10px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .auth-header p {
        font-size: 0.8rem;
    }
    
    .nav-brand h2 {
        font-size: 1.25rem;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar .container {
        padding: 0 1rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group input {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }

    .password-strength {
        padding: 0.75rem;
    }

    .strength-item {
        font-size: 0.8rem;
    }

    .password-match {
        font-size: 0.8rem;
    }

    .btn-primary {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .alert {
        padding: 0.875rem;
        font-size: 0.85rem;
    }
}

/* Footer Styles - Professional Design */

.site-footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    margin-top: 4rem;
    padding: 2.5rem 0 0;
    width: 100%;
    box-sizing: border-box;
    clear: both;
    position: relative;
    z-index: 5;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.site-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.footer-logo {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.brand-info {
    flex: 1;
}

.brand-info h3 {
    margin: 0 0 0.5rem 0;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
}

.brand-tag {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    line-height: 1.5;
}

.footer-content {
    display: flex;
    justify-content: flex-end;
}

.footer-section {
    min-width: 200px;
}

.footer-section h4 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    padding: 0.25rem 0;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(-3px);
}

.footer-links a::before {
    content: '→';
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 0.85rem;
}

.footer-links a:hover::before {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 0;
    margin-top: 2rem;
    background: rgba(0, 0, 0, 0.2);
}

.footer-bottom-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    flex-wrap: wrap;
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    text-align: center;
}

.footer-version {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom strong {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-footer {
        padding: 2rem 0 0;
        margin-top: 3rem;
    }
    
    .site-footer .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }
    
    .footer-brand {
        justify-content: flex-start;
    }
    
    .footer-logo {
        width: 44px;
        height: 44px;
        padding: 6px;
    }
    
    .brand-info h3 {
        font-size: 1.1rem;
    }
    
    .brand-tag {
        font-size: 0.85rem;
    }
    
    .footer-content {
        justify-content: flex-start;
    }
    
    .footer-section {
        width: 100%;
    }
    
    .footer-section h4 {
        font-size: 0.95rem;
    }
    
    .footer-links a {
        font-size: 0.875rem;
    }
    
    .footer-bottom {
        padding: 1rem 0;
        margin-top: 1.5rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-bottom p {
        font-size: 0.8rem;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .site-footer {
        padding: 1.5rem 0 0;
    }
    
    .site-footer .container {
        gap: 1.5rem;
        padding: 0 0.75rem;
    }
    
    .footer-brand {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .footer-logo {
        width: 40px;
        height: 40px;
        padding: 5px;
    }
    
    .brand-info h3 {
        font-size: 1rem;
        margin-bottom: 0.375rem;
    }
    
    .brand-tag {
        font-size: 0.8rem;
    }
    
    .footer-section h4 {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-links li {
        margin-bottom: 0.4rem;
    }
    
    .footer-links a {
        font-size: 0.85rem;
    }
    
    .footer-bottom {
        padding: 0.875rem 0;
        margin-top: 1.25rem;
    }
    
    .footer-bottom p {
        font-size: 0.75rem;
    }
}

