/*
 * QuizHive Main Stylesheet
 * Premium modern design system inspired by glassmorphism, responsive grids, and subtle micro-animations.
 */

/* 1. Global System Configuration & Theme Tokens */
:root {
    --primary: #6C3BFF;
    --primary-light: #EDE8FF;
    --primary-gradient: linear-gradient(135deg, #6C3BFF 0%, #8A61FF 100%);
    --success: #22C55E;
    --success-light: #DCFCE7;
    --error: #EF4444;
    --error-light: #FEE2E2;
    --text: #1A1A2E;
    --text-muted: #6B7280;
    --bg: #F9FAFB;
    --white: #FFFFFF;
    --border: #E5E7EB;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(108, 59, 255, 0.1), 0 4px 6px -2px rgba(108, 59, 255, 0.05);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.2s ease-in-out;
}

/* 2. Base Styling Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

/* 3. Navigation Bar Layout */
.nav-bar {
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 8px;
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
    color: var(--primary);
}

.admin-badge {
    background-color: var(--primary-light);
    color: var(--primary) !important;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.user-menu-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 1px solid var(--border);
    padding-left: 20px;
}

.nav-welcome {
    font-size: 14px;
    color: var(--text-muted);
}

/* Mobile navigation toggler */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text);
    transition: var(--transition);
}

/* 4. Hero & Intro Banners */
.hero-section {
    background: var(--primary-gradient);
    color: var(--white);
    padding: 72px 24px;
    text-align: center;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--white);
}

.hero-title span {
    background: linear-gradient(135deg, #FFDF40 0%, #FFA800 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 400;
}

/* 5. General Layout Grids & Cards */
.main-content {
    flex: 1;
    padding: 40px 24px;
}

.section-container {
    max-width: 1200px;
    margin: 48px auto;
}

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

.section-title {
    font-size: 24px;
    font-weight: 700;
    position: relative;
    padding-bottom: 8px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* Category Grid list */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    background-color: var(--white);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.category-card-icon {
    font-size: 28px;
}

.category-card-name {
    font-weight: 600;
    font-size: 15px;
}

/* Quiz Card Grid list */
.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.quiz-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

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

.quiz-card-banner {
    position: relative;
    height: 160px;
    background-color: var(--primary-light);
}

.quiz-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quiz-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ECE9F2 0%, #D4CEE7 100%);
}

.placeholder-icon {
    font-size: 48px;
}

.quiz-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
}

.difficulty-easy { background-color: var(--success); }
.difficulty-medium { background-color: #F59E0B; }
.difficulty-hard { background-color: var(--error); }

.quiz-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.quiz-card-category {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.quiz-card-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.quiz-card-description {
    font-size: 14px;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 16px;
}

.quiz-card-meta {
    display: flex;
    gap: 16px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.meta-item {
    font-size: 13px;
    color: var(--text-muted);
}

.quiz-card-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    background-color: #FAFAFA;
}

/* 6. Buttons & Interactive Controls */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

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

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(108, 59, 255, 0.25);
    transform: translateY(-1px);
}

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

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

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

.btn-danger:hover {
    background-color: #DC2626;
}

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

.btn-success:hover {
    background-color: #16A34A;
}

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

/* 7. Form Controls & Styling */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.col-6 {
    flex: 1;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--white);
    color: var(--text);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control-file {
    display: block;
    width: 100%;
    padding: 8px 0;
}

.form-help-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.form-checkbox {
    display: flex;
    align-items: center;
}

.form-label-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* 8. Quiz Play Interface & Overlays */
.play-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}

.play-container {
    width: 100%;
    max-width: 680px;
    background-color: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.progress-container {
    height: 6px;
    background-color: var(--border);
    width: 100%;
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-status-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #FAFAFA;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.round-badge {
    background: var(--primary-gradient);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.question-counter {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.score-display {
    font-size: 14px;
}

.quiz-card-container {
    padding: 32px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.quiz-play-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.quiz-play-question {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.4;
}

.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.option-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    background-color: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

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

.option-btn.option-correct {
    background-color: var(--success) !important;
    border-color: var(--success) !important;
    color: var(--white) !important;
}

.option-btn.option-wrong {
    background-color: var(--error) !important;
    border-color: var(--error) !important;
    color: var(--white) !important;
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.85;
}

/* Explanation Panel */
.explanation-box {
    background-color: #F3F4F6;
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 24px;
    animation: fadeIn 0.3s ease-in-out;
}

.explanation-title {
    font-size: 14px;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 4px;
}

.explanation-text {
    font-size: 14px;
    color: var(--text);
}

.quiz-action-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

/* Play Overlays */
.quiz-overlay {
    position: relative;
    width: 100%;
    background-color: rgba(26, 26, 46, 0.95);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    min-height: 400px;
    flex: 1;
}

#confirm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.overlay-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

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

.overlay-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 16px;
}

.overlay-title {
    font-size: 28px;
    margin-bottom: 12px;
}

.overlay-desc {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.overlay-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.overlay-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Final Result overlay page details */
.result-card {
    max-width: 540px;
}

.result-score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 8px solid var(--primary-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 24px auto;
}

.result-score-number {
    font-size: 32px;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    color: var(--primary);
}

.result-score-pct {
    font-size: 14px;
    color: var(--text-muted);
}

.result-status-badge {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    background-color: var(--success);
    margin-bottom: 24px;
}

.result-status-badge.fail {
    background-color: var(--error);
}

.result-recommendations {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    margin-top: 24px;
    text-align: left;
}

.result-recommendations h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text);
}

.rec-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.rec-mini-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}

.rec-mini-card:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.rec-mini-icon {
    font-size: 24px;
}

.rec-mini-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* 9. Landing and Details view grids */
.landing-container {
    max-width: 1000px;
    margin: 0 auto;
}

.landing-grid {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 32px;
    margin-bottom: 48px;
}

.landing-main-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.landing-banner {
    height: 240px;
    background-color: var(--primary-light);
}

.landing-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.landing-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ECE9F2 0%, #D4CEE7 100%);
}

.landing-title-row {
    padding: 24px 32px 0 32px;
}

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

.landing-body {
    padding: 24px 32px 32px 32px;
}

.landing-desc {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.landing-about {
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.landing-about h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.landing-action-panel {
    display: flex;
    flex-direction: column;
}

.action-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}

.action-badges {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.badge-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.badge-icon {
    font-size: 24px;
    background-color: var(--bg);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.badge-value {
    font-size: 15px;
    font-weight: 700;
}

/* 10. User Dashboard & Lists Layouts */
.dashboard-hero {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.user-profile-meta {
    display: flex;
    align-items: center;
    gap: 24px;
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.avatar-char {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

.dashboard-welcome-title {
    font-size: 24px;
    margin-bottom: 4px;
}

.dashboard-welcome-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

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

.stat-icon {
    font-size: 32px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

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

.dashboard-section {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

/* User profiles configurations card */
.profile-section-card {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.max-w-md {
    max-width: 600px;
    margin: 0 auto;
}

.form-avatar-section {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.profile-avatar-large {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder-large {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: 40px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tables details */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th, .table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.table th {
    background-color: #FAFAFA;
    font-weight: 600;
    color: var(--text-muted);
}

.badge-score {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.badge-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pass {
    background-color: var(--success-light);
    color: var(--success);
}

.status-fail {
    background-color: var(--error-light);
    color: var(--error);
}

/* Empty states card */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-text {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* 11. Alerts & Toast Banners */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    background-color: var(--white);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary);
    animation: slideIn 0.3s ease-in-out;
    transition: opacity 0.4s ease;
    max-width: 360px;
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--error);
}

.toast-icon {
    font-size: 18px;
    font-weight: 700;
}

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

.toast-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
}

.static-alert {
    position: static !important;
    max-width: 100% !important;
    margin-bottom: 20px;
    box-shadow: none !important;
    animation: none !important;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background-color: var(--error-light);
    color: var(--error);
    border: 1px solid #FCA5A5;
}

.alert-success {
    background-color: var(--success-light);
    color: var(--success);
    border: 1px solid #86EFAC;
}

.error-list {
    list-style-position: inside;
}

/* 12. Authentication Specifics */
.auth-body {
    background-color: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    padding: 24px;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo {
    justify-content: center;
}

.auth-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.auth-title {
    font-size: 24px;
    margin-bottom: 8px;
    text-align: center;
}

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

.auth-footer-text {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
}

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

.auth-footer-text a:hover {
    text-decoration: underline;
}

.app-footer {
    background-color: var(--white);
    border-top: 1px solid var(--border);
    padding: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

@keyframes slideIn {
    from {
        transform: translateX(100%) translateY(0);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-out {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* 14. Responsive Layout System overrides */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        border-bottom: 1px solid var(--border);
        padding: 24px;
        box-shadow: var(--shadow-md);
        gap: 16px;
    }

    .nav-links.open {
        display: flex;
    }

    .user-menu-wrapper {
        border-left: none;
        padding-left: 0;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        border-top: 1px solid var(--border);
        padding-top: 16px;
        margin-top: 8px;
    }

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

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

    .rec-mini-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .quiz-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
