﻿/* ============================================
   English Learning Platform - Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --secondary-color: #10B981;
    --accent-color: #F59E0B;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --success-color: #10B981;
    
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    --white: #FFFFFF;
    --black: #000000;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --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);
    
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    --transition: all 0.2s ease-in-out;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    min-height: 100vh;
}

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

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

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

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap');

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.main-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.5rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    color: var(--gray-600);
    font-weight: 500;
    transition: var(--transition);
}

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

.nav-link i {
    font-size: 1.125rem;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.user-info:hover {
    background: var(--gray-100);
}

.user-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-full);
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-avatar.user-avatar--student {
    background: radial-gradient(circle at 30% 24%, #f8f4ee 0%, #e7d5c2 52%, #d4b695 100%);
    border: 1px solid rgba(16, 36, 60, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.student-avatar {
    width: 100%;
    height: 100%;
    display: block;
}

.student-avatar__bob {
    transform-origin: center 70%;
    animation: studentAvatarBob 4s ease-in-out infinite;
}

.student-avatar__cap {
    transform-origin: center 18%;
    animation: studentAvatarCapTilt 4s ease-in-out infinite;
}

.student-avatar__tassel {
    transform-origin: 47px 17px;
    animation: studentAvatarTassel 2.6s ease-in-out infinite;
}

.student-avatar__blink {
    transform-origin: center;
    animation: studentAvatarBlink 5.8s ease-in-out infinite;
}

@keyframes studentAvatarBob {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(1.2px);
    }
}

@keyframes studentAvatarCapTilt {
    0%,
    100% {
        transform: rotate(0deg);
    }
    35% {
        transform: rotate(-1.8deg);
    }
    65% {
        transform: rotate(1.2deg);
    }
}

@keyframes studentAvatarTassel {
    0%,
    100% {
        transform: rotate(3deg);
    }
    50% {
        transform: rotate(-8deg);
    }
}

@keyframes studentAvatarBlink {
    0%,
    45%,
    47%,
    100% {
        transform: scaleY(1);
    }
    46% {
        transform: scaleY(0.12);
    }
}

.user-name {
    font-weight: 500;
    color: var(--gray-700);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    transition: var(--transition);
}

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

.dropdown-item.logout {
    color: var(--danger-color);
}

.dropdown-item.logout:hover {
    background: #FEF2F2;
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0.5rem 0;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 4rem - 300px);
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header h1 i {
    color: var(--primary-color);
}

.page-header p {
    color: var(--gray-500);
    font-size: 1.125rem;
}

/* ============================================
   AUTHENTICATION PAGES
   ============================================ */

.auth-page {
    background:
        radial-gradient(circle at top left, rgba(183, 138, 82, 0.16), transparent 22%),
        radial-gradient(circle at top right, rgba(31, 69, 104, 0.12), transparent 20%),
        linear-gradient(180deg, #f8f3ec 0%, #f3eee6 40%, #ece7de 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
}

.auth-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 1.08fr);
    gap: clamp(2rem, 4vw, 3rem);
    max-width: 1260px;
    width: 100%;
    align-items: center;
    margin: clamp(1.5rem, 3vw, 2.75rem) auto;
    padding: 0 2rem 2.5rem;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
}

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

.auth-header .logo {
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

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

.auth-header p {
    color: var(--gray-500);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 1rem;
    color: var(--gray-400);
    font-size: 1rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
}

.toggle-password:hover {
    color: var(--gray-600);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--gray-600);
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color);
}

.forgot-link {
    color: var(--primary-color);
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

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

.auth-footer a {
    font-weight: 600;
}

.auth-features {
    color: var(--white);
    padding: 2.5rem;
    overflow: hidden;
}

.auth-features h2 {
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 700;
    line-height: 1.05;
    max-width: 12ch;
    margin: 0 0 1.5rem;
    text-wrap: balance;
}

.auth-features ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    font-size: 1.0625rem;
    line-height: 1.5;
}

.auth-features li i {
    width: 1.5rem;
    height: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

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

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

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

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

.btn-outline {
    background: transparent;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-outline:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.btn-full {
    width: 100%;
}

.btn-large {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
}

.alert-info {
    background: #DBEAFE;
    color: #1E40AF;
}

.alert-dismissible {
    position: relative;
    padding-right: 3rem;
}

.close-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
}

.close-btn:hover {
    opacity: 1;
}

/* ============================================
   DASHBOARD
   ============================================ */

.welcome-section {
    margin-bottom: 2rem;
}

.welcome-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 2rem;
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-text h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcome-text p {
    opacity: 0.9;
}

.welcome-stats {
    display: flex;
    gap: 2rem;
}

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

.stat-item i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
}

.stat-card.highlight {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--white);
}

.stat-icon.blue { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.stat-icon.green { background: linear-gradient(135deg, #10B981, #059669); }
.stat-icon.orange { background: linear-gradient(135deg, #F59E0B, #D97706); }
.stat-icon.purple { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }
.stat-icon.gold { background: linear-gradient(135deg, #FBBF24, #F59E0B); }

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-info p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.dashboard-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.dashboard-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-section h2 i {
    color: var(--primary-color);
}

/* Challenges */
.challenges-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.challenge-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
}

.challenge-item.completed {
    border-left-color: var(--success-color);
    opacity: 0.7;
}

.challenge-info h4 {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.challenge-info p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.challenge-reward {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.challenge-reward .points {
    color: var(--accent-color);
    font-weight: 600;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.completed {
    background: #D1FAE5;
    color: #065F46;
}

/* Lessons & Quizzes Lists */
.lessons-list,
.quizzes-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.lesson-card,
.quiz-card {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: var(--transition);
}

.lesson-card:hover,
.quiz-card:hover {
    box-shadow: var(--shadow-md);
}

.lesson-header,
.quiz-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.lesson-card h4,
.quiz-card h4 {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.lesson-card p,
.quiz-card p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.quiz-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.quiz-meta i {
    color: var(--primary-color);
}

/* Badges */
.difficulty-badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
}

.difficulty-badge.beginner,
.difficulty-badge.easy {
    background: #D1FAE5;
    color: #065F46;
}

.difficulty-badge.intermediate,
.difficulty-badge.medium {
    background: #FEF3C7;
    color: #92400E;
}

.difficulty-badge.advanced,
.difficulty-badge.hard {
    background: #FEE2E2;
    color: #991B1B;
}

.category-badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
}

.category-badge.vocabulary {
    background: #DBEAFE;
    color: #1E40AF;
}

.category-badge.grammar {
    background: #F3E8FF;
    color: #7C3AED;
}

.category-badge.mixed {
    background: #FCE7F3;
    color: #BE185D;
}

/* Achievements Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.achievement-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.achievement-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
}

.achievement-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.activity-icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius);
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.75rem;
}

.activity-info {
    flex: 1;
}

.activity-info p {
    font-size: 0.875rem;
    color: var(--gray-700);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.activity-points {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.quick-action-btn i {
    font-size: 1.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gray-300);
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* ============================================
   VOCABULARY PAGE
   ============================================ */

.filters-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
}

.filter-tab {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-300);
    transition: var(--transition);
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Categories */
.categories-section {
    margin-bottom: 1.5rem;
}

.categories-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.96);
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(16, 36, 60, 0.35);
}

.categories-list {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--radius);
    min-width: 100px;
    text-align: center;
    border: 2px solid transparent;
    transition: var(--transition);
}

.category-card:hover {
    border-color: var(--primary-color);
}

.category-card.active {
    border-color: var(--primary-color);
    background: #EEF2FF;
}

.category-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
}

.category-card span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-700);
}

.category-card small {
    font-size: 0.625rem;
    color: var(--gray-400);
}

/* Vocabulary Grid */
.vocabulary-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

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

.section-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.word-count {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.vocabulary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.vocabulary-card {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 2px solid transparent;
    transition: var(--transition);
}

.vocabulary-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.vocabulary-card.learned {
    border-color: var(--success-color);
    background: #F0FDF4;
}

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

.category-tag {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--white);
}

.vocabulary-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius);
    border: none;
    background: var(--white);
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.action-btn.active {
    color: var(--primary-color);
}

.action-btn.favorite-btn.active {
    color: #EF4444;
}

.action-btn.learned-btn.active {
    color: var(--success-color);
}

.vocabulary-content {
    margin-bottom: 1rem;
}

.word {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.pronunciation {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-style: italic;
}

.translation {
    font-size: 1rem;
    color: var(--gray-700);
    margin-top: 0.5rem;
}

.example {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.example-en {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-style: italic;
    margin-bottom: 0.25rem;
}

.example-lv {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.vocabulary-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.practice-count {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* ============================================
   GRAMMAR PAGE
   ============================================ */

.progress-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.progress-bar {
    height: 0.5rem;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.grammar-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
}

.grammar-sidebar {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: fit-content;
}

.grammar-sidebar h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.lesson-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.lesson-item:hover {
    background: var(--gray-100);
}

.lesson-item.active {
    background: #EEF2FF;
    border-left: 3px solid var(--primary-color);
}

.lesson-item.completed {
    opacity: 0.7;
}

.lesson-number {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--radius);
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
}

.lesson-item.active .lesson-number {
    background: var(--primary-color);
    color: var(--white);
}

.lesson-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
}

.lesson-info p {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.completed-icon {
    color: var(--success-color);
    margin-left: auto;
}

.grammar-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.lesson-card {
    padding: 2rem;
}

.lesson-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.lesson-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.lesson-order {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.lesson-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.lesson-subtitle {
    font-size: 1.125rem;
    color: var(--gray-500);
}

.lesson-body {
    margin-bottom: 2rem;
}

.lesson-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 1.5rem 0 1rem;
}

.lesson-body h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 1.25rem 0 0.75rem;
}

.lesson-body p {
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.lesson-body ul,
.lesson-body ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.lesson-body li {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.lesson-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.lesson-body th,
.lesson-body td {
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    text-align: left;
}

.lesson-body th {
    background: var(--gray-100);
    font-weight: 600;
}

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

.example-item {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
}

.example-en {
    font-size: 1rem;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.example-en i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.example-lv {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-style: italic;
}

.example-explanation {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.example-explanation i {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

.lesson-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.lesson-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.complete-form {
    text-align: center;
}

.completed-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #D1FAE5;
    border-radius: var(--radius);
    color: #065F46;
    font-weight: 600;
}

/* ============================================
   QUIZ PAGES
   ============================================ */

.quiz-header-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.quiz-info p {
    color: var(--gray-500);
    margin-bottom: 0.75rem;
}

.quiz-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.quiz-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--gray-900);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 1.25rem;
    font-weight: 700;
    font-family: monospace;
}

.quiz-timer i {
    color: var(--accent-color);
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.question-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.question-card.unanswered {
    border: 2px solid var(--accent-color);
}

.question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

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

.question-points {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.question-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.question-translation {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-style: italic;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.option-label:hover {
    background: #EEF2FF;
}

.option-label input[type="radio"] {
    display: none;
}

.option-label input[type="radio"]:checked + .option-letter {
    background: var(--primary-color);
    color: var(--white);
}

.option-letter {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius);
    background: var(--white);
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--gray-700);
    transition: var(--transition);
}

.option-text {
    flex: 1;
    color: var(--gray-700);
}

.fill-blank-input input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
}

.fill-blank-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.quiz-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

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

.quiz-card.large {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.quiz-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.attempted-badge {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Results */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border-left: 4px solid var(--gray-300);
}

.result-item.passed {
    border-left-color: var(--success-color);
}

.result-item.failed {
    border-left-color: var(--danger-color);
}

.result-info h4 {
    font-weight: 600;
    color: var(--gray-900);
}

.result-date {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.result-score {
    text-align: right;
}

.score-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.score-detail {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Result Page */
.result-header-section {
    margin-bottom: 2rem;
}

.result-summary {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.result-summary.passed {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
}

.result-summary.failed {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.result-summary.passed .result-icon {
    color: #059669;
}

.result-summary.failed .result-icon {
    color: #DC2626;
}

.result-summary h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.result-summary > p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.result-score-large {
    margin-bottom: 1rem;
}

.score-percentage {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    color: var(--gray-900);
}

.points-earned {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--white);
    border-radius: var(--radius-full);
    color: var(--accent-color);
    font-weight: 600;
}

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

.answer-review-item {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--gray-300);
}

.answer-review-item.correct {
    border-left-color: var(--success-color);
}

.answer-review-item.incorrect {
    border-left-color: var(--danger-color);
}

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

.answer-status {
    font-weight: 600;
}

.answer-review-item.correct .answer-status {
    color: var(--success-color);
}

.answer-review-item.incorrect .answer-status {
    color: var(--danger-color);
}

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

.answer-comparison .label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
}

.answer-comparison .value {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 500;
}

.answer-comparison .value.correct {
    background: #D1FAE5;
    color: #065F46;
}

.answer-comparison .value.wrong {
    background: #FEE2E2;
    color: #991B1B;
}

.answer-comparison .correct-answer .value {
    background: #D1FAE5;
    color: #065F46;
}

.answer-explanation {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* ============================================
   PROGRESS PAGE
   ============================================ */

.progress-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

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

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1rem 1.1rem;
    overflow: hidden;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
}

.progress-label span:first-child {
    min-width: 0;
}

.progress-label span:last-child {
    flex-shrink: 0;
}

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

.quiz-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.quiz-stat-item .stat-label {
    color: var(--gray-600);
}

.quiz-stat-item .stat-value {
    font-weight: 600;
    color: var(--gray-900);
}

.mini-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mini-result {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.mini-result.passed {
    background: #D1FAE5;
}

.mini-result.failed {
    background: #FEE2E2;
}

.mini-result-title {
    color: var(--gray-700);
}

.mini-result-score {
    font-weight: 600;
}

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

.achievement-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.achievement-row.earned {
    background: #FEF3C7;
}

.achievement-row.locked {
    opacity: 0.6;
}

.achievement-icon-small {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.875rem;
}

.achievement-row.locked .achievement-icon-small {
    background: var(--gray-300);
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
}

.achievement-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.earned-icon {
    color: var(--success-color);
}

.locked-icon {
    color: var(--gray-400);
}

.chart-container {
    height: 250px;
}

/* ============================================
   FOOTER
   ============================================ */

.main-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section .logo {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-section p {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius);
    background: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--white);
}

.footer-links,
.footer-contact {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-400);
}

.footer-contact i {
    color: var(--primary-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-800);
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: var(--gray-400);
}

.footer-legal a:hover {
    color: var(--white);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
    }
    
    .auth-features {
        display: none;
    }
    
    .dashboard-grid,
    .progress-grid {
        grid-template-columns: 1fr;
    }
    
    .grammar-layout {
        grid-template-columns: 1fr;
    }
    
    .grammar-sidebar {
        order: 2;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 4rem;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .user-name {
        display: none;
    }
    
    .stats-grid,
    .stats-grid.small {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lessons-list,
    .quizzes-list {
        grid-template-columns: 1fr;
    }
    
    .vocabulary-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-list {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .filters-section {
        flex-direction: column;
    }
    
    .filter-tabs {
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .welcome-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .welcome-stats {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .quiz-header-section {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .quiz-actions {
        flex-direction: column;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid,
    .stats-grid.small {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .lesson-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .lesson-navigation a {
        width: 100%;
        justify-content: center;
    }
}

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

.vocabulary-card,
.lesson-card,
.quiz-card,
.question-card {
    animation: fadeIn 0.3s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* ============================================
   PAGINATION STYLES
   ============================================ */

.pagination-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.pagination-info {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info span {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.per-page-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.per-page-selector label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.per-page-selector select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    font-size: 0.875rem;
    color: var(--gray-700);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

.per-page-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.pagination-btn:hover:not(.disabled) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--gray-100);
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
}

.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.page-number:hover:not(.active) {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.page-number.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.page-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    color: var(--gray-400);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .pagination-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pagination-nav {
        gap: 0.25rem;
    }
    
    .pagination-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .page-number {
        min-width: 2rem;
        height: 2rem;
        padding: 0 0.5rem;
        font-size: 0.75rem;
    }
}

/* ============================================
   PREMIUM THEME OVERRIDES
   ============================================ */

:root {
    --primary-color: #1f4568;
    --primary-dark: #10243c;
    --primary-light: #4e7494;
    --secondary-color: #1f7a68;
    --accent-color: #b78a52;
    --danger-color: #b94b4b;
    --warning-color: #c28b35;
    --success-color: #1f7a68;

    --gray-50: #f7f3ed;
    --gray-100: #efe7dd;
    --gray-200: #ddd1c2;
    --gray-300: #c8b9a6;
    --gray-400: #9a8b79;
    --gray-500: #756a5c;
    --gray-600: #5f564b;
    --gray-700: #433d36;
    --gray-800: #2c2925;
    --gray-900: #171614;

    --font-family: 'Manrope', 'Segoe UI', sans-serif;
    --font-display: 'Fraunces', Georgia, serif;

    --shadow-sm: 0 12px 24px rgba(16, 36, 60, 0.06);
    --shadow: 0 18px 36px rgba(16, 36, 60, 0.08);
    --shadow-md: 0 24px 48px rgba(16, 36, 60, 0.12);
    --shadow-lg: 0 30px 60px rgba(16, 36, 60, 0.14);
    --shadow-xl: 0 36px 84px rgba(16, 36, 60, 0.18);

    --radius-sm: 0.625rem;
    --radius: 1rem;
    --radius-md: 1.25rem;
    --radius-lg: 1.6rem;
    --radius-xl: 2rem;
}

html {
    background: #f6f1e9;
}

body {
    color: var(--gray-800);
    background:
        radial-gradient(circle at top left, rgba(183, 138, 82, 0.16), transparent 22%),
        radial-gradient(circle at top right, rgba(31, 69, 104, 0.12), transparent 20%),
        linear-gradient(180deg, #f8f3ec 0%, #f3eee6 40%, #ece7de 100%);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.08) 0,
            rgba(255, 255, 255, 0.08) 1px,
            transparent 1px,
            transparent 120px
        );
    opacity: 0.24;
}

.container {
    max-width: 1340px;
    padding: 0 1.75rem;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-header h1,
.section-header h2,
.welcome-text h1,
.hero-content h1,
.auth-header h1 {
    font-family: var(--font-display);
    letter-spacing: -0.03em;
}

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

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

.main-content {
    padding: 2.5rem 0 3rem;
}

.main-header {
    background: rgba(248, 243, 236, 0.84);
    border-bottom: 1px solid rgba(16, 36, 60, 0.08);
    box-shadow: 0 12px 30px rgba(16, 36, 60, 0.06);
    backdrop-filter: blur(18px);
}

.navbar {
    height: 4.7rem;
}

.logo {
    color: var(--primary-dark);
    gap: 0.7rem;
}

.logo i {
    color: var(--accent-color);
}

.nav-link {
    padding: 0.7rem 1rem;
    border-radius: 999px;
    color: #4b5968;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-dark);
    background: rgba(16, 36, 60, 0.08);
}

.user-info {
    padding: 0.45rem 0.6rem 0.45rem 0.45rem;
    border: 1px solid rgba(16, 36, 60, 0.08);
    background: rgba(255, 255, 255, 0.6);
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.86);
}

.user-avatar {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-color));
}

.dropdown-menu {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(16, 36, 60, 0.08);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
}

.dropdown-item:hover {
    background: rgba(16, 36, 60, 0.06);
    color: var(--primary-dark);
}

.page-header,
.auth-card,
.auth-features,
.stat-card,
.dashboard-section,
.progress-section,
.grammar-sidebar,
.grammar-content,
.question-card,
.quiz-header-section,
.vocabulary-card,
.vocabulary-section,
.category-card,
.result-item,
.profile-card,
.profile-sidebar,
.profile-content,
.achievement-item,
.achievement-row,
.main-footer,
.quiz-card.large {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.page-header {
    padding: 1.85rem 2rem;
    border-radius: 1.9rem;
    margin-bottom: 1.75rem;
}

.page-header h1 {
    font-size: clamp(2rem, 3.2vw, 3rem);
    color: var(--primary-dark);
    margin-bottom: 0.65rem;
}

.page-header h1 i {
    color: var(--accent-color);
}

.page-header p {
    max-width: 46rem;
    color: #5e6774;
}

.btn {
    border-radius: 999px;
    padding: 0.78rem 1.35rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 28px rgba(16, 36, 60, 0.08);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0d2036, #173a59);
}

.btn-success {
    background: linear-gradient(135deg, #166256, var(--success-color));
}

.btn-outline {
    border: 1px solid rgba(16, 36, 60, 0.14);
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.58);
}

.btn-outline:hover {
    background: rgba(16, 36, 60, 0.06);
    border-color: rgba(16, 36, 60, 0.2);
}

.btn-large {
    padding: 0.95rem 1.7rem;
    font-size: 0.98rem;
}

.btn-sm {
    padding: 0.55rem 0.95rem;
    font-size: 0.73rem;
}

.alert {
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-sm);
}

.auth-page {
    background:
        radial-gradient(circle at top left, rgba(183, 138, 82, 0.16), transparent 22%),
        radial-gradient(circle at top right, rgba(31, 69, 104, 0.12), transparent 20%),
        linear-gradient(180deg, #f8f3ec 0%, #f3eee6 40%, #ece7de 100%);
}

.auth-card,
.auth-features {
    border-radius: 2rem;
}

.auth-card {
    padding: 2.8rem;
}

.auth-header .logo {
    justify-content: center;
    color: var(--primary-dark);
}

.auth-header h1 {
    font-size: clamp(2.05rem, 4.4vw, 2.6rem);
    color: var(--primary-dark);
    line-height: 1.05;
    text-wrap: balance;
}

.auth-header p,
.auth-footer p,
.auth-features li {
    color: #5d6877;
}

.auth-features {
    background:
        radial-gradient(circle at top right, rgba(183, 138, 82, 0.18), transparent 26%),
        linear-gradient(145deg, rgba(16, 36, 60, 0.94), rgba(31, 69, 104, 0.88));
    border-color: rgba(16, 36, 60, 0.08);
    color: var(--white);
    padding: clamp(2rem, 3vw, 2.8rem);
    box-shadow: var(--shadow-lg);
}

.auth-features h2 {
    font-size: clamp(1.9rem, 2.4vw, 2.3rem);
    margin-bottom: 1.75rem;
}

.auth-features li,
.auth-features h2 {
    color: var(--white);
}

.form-group label,
.checkbox-label,
.form-options,
.forgot-link {
    color: #536173;
}

.input-group {
    border-radius: 1.2rem;
    background: rgba(247, 244, 239, 0.92);
    border: 1px solid rgba(16, 36, 60, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.input-group i {
    color: var(--accent-color);
}

input,
select,
textarea {
    border-radius: 1rem;
}

.input-group input,
.input-group select,
.input-group textarea {
    background: transparent;
    color: var(--gray-800);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus,
.fill-blank-input input:focus {
    box-shadow: 0 0 0 4px rgba(31, 69, 104, 0.1);
}

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

.welcome-card {
    border-radius: 2rem;
    padding: 2.3rem;
    background:
        radial-gradient(circle at top right, rgba(183, 138, 82, 0.2), transparent 24%),
        linear-gradient(135deg, #10243c 0%, #163551 58%, #245073 100%);
    box-shadow: var(--shadow-xl);
}

.welcome-text h1 {
    font-size: clamp(2rem, 3vw, 3rem);
}

.welcome-stats {
    gap: 1rem;
}

.stat-item {
    min-width: 7.5rem;
    padding: 1rem 1.1rem;
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.stats-grid,
.dashboard-grid,
.progress-grid {
    gap: 1.75rem;
}

.stat-card {
    border-radius: 1.65rem;
    padding: 1.45rem;
}

.stat-card.highlight {
    background: linear-gradient(135deg, rgba(183, 138, 82, 0.2), rgba(255, 255, 255, 0.8));
}

.stat-icon {
    width: 3.35rem;
    height: 3.35rem;
    border-radius: 1.15rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.stat-icon.blue,
.feature-icon.blue {
    background: linear-gradient(135deg, #254b75, #4c7997);
}

.stat-icon.green,
.feature-icon.green {
    background: linear-gradient(135deg, #1d7a68, #33a18a);
}

.stat-icon.orange,
.feature-icon.orange {
    background: linear-gradient(135deg, #b8792e, #d39b46);
}

.stat-icon.purple,
.feature-icon.purple {
    background: linear-gradient(135deg, #35506e, #607b98);
}

.stat-icon.gold,
.feature-icon.pink,
.feature-icon.teal {
    background: linear-gradient(135deg, #b78a52, #d1a46b);
}

.dashboard-section,
.progress-section,
.quiz-header-section,
.question-card,
.vocabulary-section,
.quiz-card.large {
    border-radius: 1.75rem;
}

.dashboard-section h2,
.section-header h2 {
    color: var(--primary-dark);
}

.dashboard-section h2 i,
.section-header h2 i,
.quiz-meta i {
    color: var(--accent-color);
}

.challenge-item,
.lesson-card,
.quiz-card,
.vocabulary-card,
.category-card,
.achievement-item,
.achievement-row,
.result-item,
.progress-item {
    border-radius: 1.3rem;
    border: 1px solid rgba(16, 36, 60, 0.08);
    background: rgba(255, 255, 255, 0.66);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.challenge-item {
    border-left: none;
}

.challenge-item.completed,
.lesson-item.completed,
.achievement-row.earned,
.vocabulary-card.learned {
    background: linear-gradient(135deg, rgba(31, 122, 104, 0.12), rgba(255, 255, 255, 0.78));
}

.lesson-card,
.quiz-card,
.category-card,
.vocabulary-card,
.feature-card,
.step-card {
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.lesson-card:hover,
.quiz-card:hover,
.category-card:hover,
.vocabulary-card:hover,
.feature-card:hover,
.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.difficulty-badge,
.category-badge,
.badge {
    border-radius: 999px;
    padding: 0.38rem 0.72rem;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
}

.difficulty-badge.beginner,
.difficulty-badge.easy,
.category-badge.vocabulary {
    background: rgba(31, 122, 104, 0.12);
    color: #155d4f;
}

.difficulty-badge.intermediate,
.difficulty-badge.medium,
.category-badge.grammar {
    background: rgba(183, 138, 82, 0.18);
    color: #7c5a2f;
}

.difficulty-badge.advanced,
.difficulty-badge.hard,
.category-badge.mixed {
    background: rgba(31, 69, 104, 0.12);
    color: #14324f;
}

.progress-bar {
    height: 0.7rem;
    background: rgba(16, 36, 60, 0.08);
}

.progress-fill {
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
}

.main-footer {
    margin-top: 2.5rem;
    border-radius: 2rem 2rem 0 0;
    background:
        linear-gradient(180deg, rgba(13, 28, 47, 0.96), rgba(17, 37, 60, 0.98));
    border: none;
    color: rgba(255, 255, 255, 0.88);
}

.main-footer .logo,
.main-footer h4,
.footer-bottom p,
.footer-contact i {
    color: var(--white);
}

.main-footer a,
.main-footer p,
.footer-contact li {
    color: rgba(255, 255, 255, 0.74);
}

.main-footer a:hover {
    color: #f2ddbf;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pagination-btn,
.page-number {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(16, 36, 60, 0.12);
}

.page-number.active,
.pagination-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    border-color: transparent;
}

.category-icon--all {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

table {
    background: rgba(255, 255, 255, 0.7);
}

@media (max-width: 1024px) {
    .container {
        padding: 0 1.2rem;
    }

    .welcome-card {
        gap: 1.25rem;
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .main-header {
        background: rgba(248, 243, 236, 0.94);
    }

    .nav-menu {
        background: rgba(248, 243, 236, 0.96);
        border-top: 1px solid rgba(16, 36, 60, 0.08);
        backdrop-filter: blur(20px);
    }

    .page-header,
    .auth-card,
    .auth-features,
    .dashboard-section,
    .stat-card,
    .question-card,
    .main-footer {
        border-radius: 1.4rem;
    }

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