/* ============================================================
   $5 P&C License School - Main Stylesheet
   Warm Color Palette: Coral, Amber, Green, Cream
   NO dark mode, NO purple, NO blue
   ============================================================ */

:root {
    --primary: #E8622C;
    --primary-dark: #C94E1C;
    --primary-light: #F5935E;
    --secondary: #2BA84A;
    --secondary-dark: #1D8C38;
    --secondary-light: #5FC878;
    --accent: #F5A623;
    --accent-dark: #D4891A;
    --accent-light: #FFCA6B;
    --danger: #DC3545;
    --success: #28A745;
    --warning: #FFC107;
    --info: #20C997;
    --dark: #2D2A26;
    --gray-900: #3D3A36;
    --gray-700: #6B6560;
    --gray-500: #9B9490;
    --gray-300: #D4CEC9;
    --gray-100: #F5F0EB;
    --cream: #FFFDF7;
    --white: #FFFFFF;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Poppins', sans-serif;
    --shadow-sm: 0 1px 3px rgba(45,42,38,0.08);
    --shadow-md: 0 4px 12px rgba(45,42,38,0.1);
    --shadow-lg: 0 8px 30px rgba(45,42,38,0.12);
    --shadow-xl: 0 16px 48px rgba(45,42,38,0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-primary);
    background: var(--cream);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; color: var(--dark); }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--gray-500) !important; }
.text-center { text-align: center; }
.text-white { color: var(--white) !important; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 20px; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } h1 { font-size: 1.8rem; } }

.py-1 { padding-top: 8px; padding-bottom: 8px; }
.py-2 { padding-top: 16px; padding-bottom: 16px; }
.py-3 { padding-top: 24px; padding-bottom: 24px; }
.py-4 { padding-top: 48px; padding-bottom: 48px; }
.py-5 { padding-top: 64px; padding-bottom: 64px; }
.px-3 { padding-left: 24px; padding-right: 24px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 48px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 48px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    background: var(--white);
    border-bottom: 2px solid var(--gray-100);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--dark);
}
.navbar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 1.1rem;
}
.navbar-brand .brand-price {
    color: var(--primary);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}
.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
    background: var(--gray-100);
    color: var(--primary);
}
.nav-links .nav-cta {
    background: var(--primary);
    color: white !important;
    padding: 8px 20px;
}
.nav-links .nav-cta:hover {
    background: var(--primary-dark);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-user .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
}
.nav-user .user-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}
.tier-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tier-free { background: var(--gray-100); color: var(--gray-700); }
.tier-basic { background: #FFF3E0; color: #E8622C; }
.tier-premium { background: #FFF8E1; color: #D4891A; }

.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--dark); }

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: white; padding: 20px; box-shadow: var(--shadow-md); }
    .nav-links.open { display: flex; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
    font-family: var(--font-primary);
}
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); box-shadow: var(--shadow-md); }

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

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

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

.btn-ghost { background: transparent; color: var(--gray-700); }
.btn-ghost:hover { background: var(--gray-100); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #C82333; color: white; }

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

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    transition: all 0.3s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header { margin-bottom: 16px; }
.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.card-subtitle { font-size: 0.85rem; color: var(--gray-500); }
.card-body { flex: 1; }
.card-footer { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--gray-100); }

.card-highlight {
    border: 2px solid var(--primary);
    position: relative;
}
.card-highlight::before {
    content: 'MOST POPULAR';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--gray-700);
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: border-color 0.2s;
    background: var(--white);
    color: var(--dark);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 98, 44, 0.15);
}
select.form-control { appearance: auto; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-success { background: #E8F5E9; color: #2E7D32; border-left: 4px solid #28A745; }
.alert-error { background: #FFEBEE; color: #C62828; border-left: 4px solid #DC3545; }
.alert-warning { background: #FFF8E1; color: #F57F17; border-left: 4px solid #FFC107; }
.alert-info { background: #E0F2F1; color: #00695C; border-left: 4px solid #20C997; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    background: linear-gradient(135deg, #FFF5EE 0%, #FFE8D6 50%, #FFEAA7 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232,98,44,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-content { max-width: 640px; position: relative; z-index: 1; }
.hero h1 { font-size: 3rem; margin-bottom: 16px; line-height: 1.15; }
.hero h1 .highlight { color: var(--primary); }
.hero p { font-size: 1.2rem; color: var(--gray-700); margin-bottom: 28px; line-height: 1.7; }
.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 2px solid rgba(45,42,38,0.08);
}
.hero-stat .stat-number { font-size: 1.8rem; font-weight: 800; color: var(--primary); font-family: var(--font-display); }
.hero-stat .stat-label { font-size: 0.85rem; color: var(--gray-500); }

@media (max-width: 768px) {
    .hero { padding: 40px 0; }
    .hero h1 { font-size: 2rem; }
    .hero-stats { gap: 20px; }
    .hero-stat .stat-number { font-size: 1.4rem; }
}

/* ============================================================
   FEATURES SECTION
   ============================================================ */
.feature-card {
    text-align: center;
    padding: 32px 20px;
}
.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
}
.feature-icon.orange { background: #FFF3E0; color: var(--primary); }
.feature-icon.green { background: #E8F5E9; color: var(--secondary); }
.feature-icon.amber { background: #FFF8E1; color: var(--accent-dark); }
.feature-icon.teal { background: #E0F2F1; color: #00897B; }

/* ============================================================
   PRICING
   ============================================================ */
.pricing-card {
    text-align: center;
    padding: 36px 28px;
}
.pricing-card .price {
    font-size: 3rem;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--dark);
    margin: 16px 0 4px;
}
.pricing-card .price span { font-size: 1rem; color: var(--gray-500); font-weight: 400; }
.pricing-card .price-period { color: var(--gray-500); font-size: 0.9rem; }
.pricing-features {
    list-style: none;
    margin: 24px 0;
    text-align: left;
}
.pricing-features li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--gray-700);
}
.pricing-features .check { color: var(--secondary); font-weight: 700; }
.pricing-features .cross { color: var(--gray-300); }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    min-height: calc(100vh - 68px);
}
.sidebar {
    background: var(--white);
    border-right: 1px solid var(--gray-100);
    padding: 24px 0;
}
.sidebar-nav { list-style: none; }
.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--gray-700);
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.sidebar-nav li a:hover, .sidebar-nav li a.active {
    background: var(--gray-100);
    color: var(--primary);
    border-left-color: var(--primary);
}
.sidebar-nav li a .nav-icon { font-size: 1.2rem; width: 24px; text-align: center; }

.main-content { padding: 32px; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-display);
}
.stat-card .stat-label { font-size: 0.85rem; color: var(--gray-500); margin-top: 4px; }
.stat-card.orange .stat-value { color: var(--primary); }
.stat-card.green .stat-value { color: var(--secondary); }
.stat-card.amber .stat-value { color: var(--accent-dark); }
.stat-card.teal .stat-value { color: #00897B; }

@media (max-width: 992px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   QUIZ / PRACTICE
   ============================================================ */
.quiz-container { max-width: 800px; margin: 0 auto; }
.quiz-question {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-100);
}
.quiz-number {
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-display);
}
.quiz-category {
    font-size: 0.85rem;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 4px 12px;
    border-radius: 20px;
}
.quiz-text { font-size: 1.1rem; line-height: 1.7; margin-bottom: 24px; font-weight: 500; }

.quiz-options { display: flex; flex-direction: column; gap: 12px; }
.quiz-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--white);
}
.quiz-option:hover { border-color: var(--primary-light); background: #FFF5EE; }
.quiz-option.selected { border-color: var(--primary); background: #FFF5EE; }
.quiz-option.correct { border-color: var(--secondary); background: #E8F5E9; }
.quiz-option.incorrect { border-color: var(--danger); background: #FFEBEE; }

.quiz-option .option-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    color: var(--gray-700);
    transition: all 0.2s;
}
.quiz-option.selected .option-letter { background: var(--primary); color: white; }
.quiz-option.correct .option-letter { background: var(--secondary); color: white; }
.quiz-option.incorrect .option-letter { background: var(--danger); color: white; }

.quiz-option .option-text { font-size: 0.95rem; line-height: 1.5; padding-top: 4px; }

.explanation-box {
    background: #FFF8E1;
    border: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-top: 20px;
    display: none;
}
.explanation-box.show { display: block; }
.explanation-box .explanation-title { font-weight: 700; color: var(--accent-dark); margin-bottom: 8px; }

/* Progress Bar */
.progress-bar-track {
    height: 8px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* Timer */
.exam-timer {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--dark);
    text-align: center;
    padding: 12px 24px;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}
.exam-timer.warning { color: var(--accent-dark); }
.exam-timer.danger { color: var(--danger); animation: pulse 1s infinite; }

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

/* ============================================================
   FLASHCARDS
   ============================================================ */
.flashcard-container { perspective: 1000px; max-width: 600px; margin: 0 auto; }
.flashcard {
    width: 100%;
    min-height: 300px;
    position: relative;
    cursor: pointer;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}
.flashcard.flipped { transform: rotateY(180deg); }
.flashcard-front, .flashcard-back {
    position: absolute;
    width: 100%;
    min-height: 300px;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.flashcard-front {
    background: linear-gradient(135deg, var(--white) 0%, #FFF5EE 100%);
    border: 2px solid var(--primary-light);
}
.flashcard-back {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border: 2px solid var(--secondary);
    transform: rotateY(180deg);
}
.flashcard-label { font-size: 0.8rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.flashcard-text { font-size: 1.2rem; line-height: 1.7; font-weight: 500; }

.flashcard-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}
.confidence-btn {
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid;
    transition: all 0.2s;
    font-family: var(--font-primary);
}
.confidence-btn.low { border-color: var(--danger); color: var(--danger); background: white; }
.confidence-btn.low:hover { background: var(--danger); color: white; }
.confidence-btn.medium { border-color: var(--accent); color: var(--accent-dark); background: white; }
.confidence-btn.medium:hover { background: var(--accent); color: white; }
.confidence-btn.high { border-color: var(--secondary); color: var(--secondary); background: white; }
.confidence-btn.high:hover { background: var(--secondary); color: white; }

/* ============================================================
   AI CHAT
   ============================================================ */
.chat-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}
.chat-message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.chat-message.user { flex-direction: row-reverse; }
.chat-message .chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.chat-message.assistant .chat-avatar { background: var(--primary); color: white; }
.chat-message.user .chat-avatar { background: var(--secondary); color: white; }
.chat-bubble {
    max-width: 70%;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    line-height: 1.6;
    font-size: 0.95rem;
}
.chat-message.assistant .chat-bubble { background: var(--white); border: 1px solid var(--gray-100); box-shadow: var(--shadow-sm); }
.chat-message.user .chat-bubble { background: var(--primary); color: white; }

.chat-input-area {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-top: 2px solid var(--gray-100);
}
.chat-input-area input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--gray-300);
    border-radius: 30px;
    font-size: 1rem;
    font-family: var(--font-primary);
}
.chat-input-area input:focus {
    outline: none;
    border-color: var(--primary);
}
.chat-send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.chat-send-btn:hover { background: var(--primary-dark); }

/* ============================================================
   RESULTS
   ============================================================ */
.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    border: 8px solid;
}
.score-circle.pass { border-color: var(--secondary); background: #E8F5E9; }
.score-circle.fail { border-color: var(--danger); background: #FFEBEE; }
.score-circle .score-value { font-size: 3rem; font-weight: 800; font-family: var(--font-display); }
.score-circle .score-label { font-size: 0.9rem; font-weight: 600; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--dark);
    color: var(--gray-300);
    padding: 48px 0 24px;
    margin-top: 64px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
.footer-brand { font-size: 1.2rem; font-weight: 700; color: white; margin-bottom: 12px; font-family: var(--font-display); }
.footer-desc { font-size: 0.9rem; line-height: 1.6; }
.footer-title { color: white; font-weight: 600; margin-bottom: 12px; font-size: 0.95rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--gray-300); font-size: 0.9rem; }
.footer-links a:hover { color: var(--primary-light); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-easy { background: #E8F5E9; color: #2E7D32; }
.badge-medium { background: #FFF8E1; color: #F57F17; }
.badge-hard { background: #FFEBEE; color: #C62828; }

.divider { height: 1px; background: var(--gray-100); margin: 24px 0; }

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--gray-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.tooltip { position: relative; }

.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: white;
    border-radius: var(--radius-lg);
    padding: 36px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-xl);
}

.table-wrapper { overflow-x: auto; }
table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
table.data-table th {
    background: var(--gray-100);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}
table.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
}
table.data-table tr:hover td { background: #FFFDF7; }

/* Category tags */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.category-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-100);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: var(--dark);
}
.category-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); color: var(--dark); }
.category-card .cat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: #FFF3E0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.category-card .cat-info { flex: 1; }
.category-card .cat-name { font-weight: 600; font-size: 0.95rem; }
.category-card .cat-weight { font-size: 0.8rem; color: var(--gray-500); }

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: var(--gray-500);
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .separator { color: var(--gray-300); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }

/* Animations */
.fade-in { animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.slide-up { animation: slideUp 0.4s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
