/**
 * Fundamentos da Fé - Design System
 * Desenvolvido por B20 Conteúdo Digital
 * https://www.b20.com.br
 */

/* ===== CSS RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    /* Forest Green Palette - DO NOT ALTER! */
    --primary-color: #2D5016;
    --secondary-color: #3E7C17;
    --accent-color: #52734D;
    --surface-color: #91C788;
    --text-color: #1a1a1a;
    
    /* Extended Palette */
    --primary-hover: #1e3a0f;
    --primary-light: #e8f5e0;
    --cream: #FEF3C7;
    --gold: #D4AF37;
    --gold-light: #f5e6b3;
    
    /* Backgrounds */
    --bg-color: #ffffff;
    --bg-secondary: #f8faf7;
    --bg-card: #ffffff;
    
    /* Text Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #a0aec0;
    --text-inverse: #ffffff;
    
    /* Semantic Colors */
    --success-color: #38a169;
    --warning-color: #d69e2e;
    --error-color: #e53e3e;
    --info-color: #3182ce;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Layout */
    --border-radius-sm: 8px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --spacing-unit: 8px;
    
    /* Typography */
    --font-ui: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-content: 'Merriweather', Georgia, serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 500;
    --z-fixed: 1000;
    --z-modal-backdrop: 1500;
    --z-modal: 2000;
    --z-toast: 3000;
    
    /* Header & Nav Heights */
    --header-height: 60px;
    --bottom-nav-height: 65px;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-color: #0f1a0a;
    --bg-secondary: #1a2614;
    --bg-card: #1e2d17;
    --text-primary: #e8f5e0;
    --text-secondary: #b8d4a8;
    --text-muted: #8fb87a;
    --text-light: #6a9a58;
    --surface-color: #2d4a22;
    --primary-light: #2d4a22;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
}
.black-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 55px;
background-color: #000000;
z-index: 1001;
}
/* ===== BASE STYLES ===== */
html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-ui);
    font-weight: 400;
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background-color: var(--bg-color);
    padding-top: var(--header-height);
    padding-bottom: calc(var(--bottom-nav-height) + 55px + 20px);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Safe Areas for iPhone X+ */
@supports (padding: env(safe-area-inset-bottom)) {
    body {
        padding-top: max(var(--header-height), env(safe-area-inset-top));
        padding-bottom: calc(var(--bottom-nav-height) + 55px + env(safe-area-inset-bottom) + 20px);
    }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-ui);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Content Typography (Merriweather) */
.content-text {
    font-family: var(--font-content);
    font-size: 1.125rem;
    line-height: 1.8;
}

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
        padding: 24px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 960px;
    }
}

/* ===== APP HEADER ===== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: var(--shadow-md);
    z-index: var(--z-fixed);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo i {
    font-size: 24px;
    color: var(--primary-color);
}


.header-logo .logo-img {
    height: 32px;
    width: 32px;
    object-fit: contain;
    border-radius: 8px; /* App style */
}

.header-logo h1 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .desktop-nav .nav-link {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 16px;
        border-radius: var(--border-radius-sm);
        color: var(--text-secondary);
        font-size: 0.875rem;
        font-weight: 500;
        text-decoration: none;
        transition: all var(--transition-fast);
    }
    
    .desktop-nav .nav-link:hover {
        background: var(--primary-light);
        color: var(--primary-color);
    }
    
    .desktop-nav .nav-link.active {
        background: var(--primary-color);
        color: var(--text-inverse);
    }
    
    .desktop-nav .nav-link i {
        font-size: 16px;
    }
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 55px; /* Acima da black-bar (55px) */
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: var(--z-fixed);
    /* padding-bottom: env(safe-area-inset-bottom, 0); */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    min-width: 64px;
    min-height: 48px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: all var(--transition-fast);
    border-radius: var(--border-radius-sm);
}

.nav-item i {
    font-size: 20px;
    transition: transform var(--transition-fast);
}

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

.nav-item.active i {
    transform: scale(1.15);
}

.nav-item:active {
    background: var(--primary-light);
}

@media (min-width: 768px) {
    .bottom-nav {
        display: none !important;
    }
    
    .black-bar {
        display: none !important;
    }
    
    body {
        padding-bottom: 20px;
    }
}

/* ===== VIEWS ===== */
.view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.view.active {
    display: block;
}

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

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-ui);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 48px;
}

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

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--surface-color);
}

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

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

.btn-danger:hover:not(:disabled) {
    background: #c53030;
}

.btn-text {
    background: transparent;
    color: var(--primary-color);
    padding: 8px 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.btn-text:hover {
    text-decoration: underline;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.btn-icon i {
    font-size: 18px;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

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

/* ===== WELCOME CARD ===== */
.welcome-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--border-radius-xl);
    padding: 24px;
    color: var(--text-inverse);
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.welcome-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.welcome-icon i {
    font-size: 28px;
    color: var(--gold);
}

.welcome-title {
    font-size: 1.5rem;
    margin-bottom: 4px;
    color: var(--text-inverse);
}

.welcome-subtitle {
    font-size: 0.9375rem;
    opacity: 0.9;
    margin-bottom: 20px;
    color: var(--text-inverse);
}

.welcome-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    padding: 16px;
}

.progress-ring {
    position: relative;
    width: 70px;
    height: 70px;
}

.progress-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--gold);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-weight: 700;
}

.progress-info {
    text-align: left;
}

.progress-label {
    display: block;
    font-size: 0.8125rem;
    opacity: 0.8;
}

.progress-level {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
}

/* ===== DAILY CHALLENGE CARD ===== */
.daily-challenge-card {
    background: var(--cream);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    border-left: 4px solid var(--gold);
}

.challenge-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--primary-color);
}

.challenge-header i {
    color: var(--gold);
    font-size: 20px;
}

.streak-badge {
    margin-left: auto;
    background: var(--gold);
    color: var(--text-inverse);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.challenge-text {
    font-family: var(--font-content);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.btn-challenge {
    width: 100%;
}

.btn-challenge.completed {
    background: var(--success-color);
    pointer-events: none;
}

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    margin-top: 8px;
}

.section-header h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
}

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

/* ===== CONTINUE CARD ===== */
.continue-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.continue-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.continue-skeleton {
    height: 80px;
    border-radius: var(--border-radius);
}

.continue-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.continue-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.continue-icon i {
    font-size: 24px;
    color: var(--primary-color);
}

.continue-info {
    flex: 1;
    min-width: 0;
}

.continue-module {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.continue-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.continue-progress {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.continue-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width var(--transition);
}

.continue-arrow {
    color: var(--text-muted);
    font-size: 20px;
}

/* ===== QUICK ACCESS ===== */
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.quick-access-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--bg-card);
    border: 1px solid var(--surface-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition);
    min-height: 100px;
}

.quick-access-item:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.quick-access-item:active {
    transform: translateY(0);
}

.quick-access-item i {
    font-size: 28px;
    color: var(--primary-color);
}

.quick-access-item span {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

/* ===== ACTIVITY LIST ===== */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon i {
    font-size: 16px;
    color: var(--primary-color);
}

.activity-info {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.activity-xp {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold);
    background: var(--gold-light);
    padding: 4px 8px;
    border-radius: 12px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.empty-state span {
    font-size: 0.8125rem;
}

/* ===== PAGE HEADER ===== */
.page-header {
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.page-header p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ===== MODULE TABS ===== */
.module-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--surface-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

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

.tab-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-inverse);
}

.tab-btn i {
    font-size: 16px;
}

/* ===== MODULES CONTAINER ===== */
.modules-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== MODULE CARD ===== */
.module-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.module-card:hover {
    box-shadow: var(--shadow-md);
}

.module-card.locked {
    opacity: 0.7;
}

.module-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    cursor: pointer;
}

.module-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.module-icon i {
    font-size: 24px;
    color: var(--primary-color);
}

.module-card.locked .module-icon {
    background: var(--bg-secondary);
}

.module-card.locked .module-icon i {
    color: var(--text-muted);
}

.module-info {
    flex: 1;
    min-width: 0;
}

.module-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.module-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.module-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.module-meta i {
    margin-right: 4px;
}

.module-progress-mini {
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.module-progress-mini-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width var(--transition);
}

.module-expand {
    color: var(--text-muted);
    font-size: 16px;
    transition: transform var(--transition);
}

.module-card.expanded .module-expand {
    transform: rotate(180deg);
}

.module-lessons {
    display: none;
    padding: 0 20px 20px;
    border-top: 1px solid var(--surface-color);
}

.module-card.expanded .module-lessons {
    display: block;
}

/* ===== LESSON ITEM ===== */
.lesson-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-top: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lesson-item:hover {
    background: var(--primary-light);
}

.lesson-item.completed {
    background: rgba(56, 161, 105, 0.1);
}

.lesson-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.lesson-number {
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border: 2px solid var(--surface-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.lesson-item.completed .lesson-number {
    background: var(--success-color);
    border-color: var(--success-color);
    color: var(--text-inverse);
}

.lesson-item.completed .lesson-number i {
    font-size: 14px;
}

.lesson-info {
    flex: 1;
    min-width: 0;
}

.lesson-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.lesson-duration {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

/* ===== LESSON VIEW ===== */
.lesson-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-color);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    box-shadow: var(--shadow-md);
    z-index: var(--z-fixed);
}

.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.lesson-title-container {
    flex: 1;
    min-width: 0;
}

.lesson-title-container h2 {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lesson-module {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-favorite {
    color: var(--text-muted);
}

.btn-favorite.active {
    color: var(--error-color);
}

.btn-favorite.active i {
    font-weight: 900;
}

.lesson-content {
    padding: 80px 16px 30px;
    max-width: 720px;
    margin: 0 auto;
}

.lesson-section {
    margin-bottom: 32px;
}

.lesson-section h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}

.lesson-text {
    font-family: var(--font-content);
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.lesson-text p {
    margin-bottom: 16px;
}

.lesson-verse {
    background: var(--cream);
    border-left: 4px solid var(--gold);
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.lesson-verse p {
    font-family: var(--font-content);
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.lesson-verse cite {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: normal;
}

.lesson-reflection {
    background: var(--primary-light);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
}

.lesson-reflection h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.lesson-reflection p {
    font-family: var(--font-content);
    color: var(--text-secondary);
    margin-bottom: 0;
}

.lesson-exercise {
    background: var(--bg-secondary);
    border: 2px dashed var(--surface-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
}

.lesson-exercise h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--accent-color);
    margin-bottom: 12px;
}

.lesson-exercise p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.lesson-exercise textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--surface-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-ui);
    font-size: 0.9375rem;
    resize: vertical;
    transition: border-color var(--transition-fast);
}

.lesson-exercise textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.lesson-footer {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 40px 16px calc(var(--bottom-nav-height) + 40px);
    background: transparent;
    box-shadow: none;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.lesson-footer .btn {
    width: 100%;
    padding: 14px 16px;
    min-width: 0;
}

#start-study-mode {
    grid-column: 1 / -1;
    order: -1;
}

/* ===== STUDY MODE ===== */
.study-mode-view {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-color);
    z-index: var(--z-modal);
    display: none;
    flex-direction: column;
    overflow-y: auto;
}

.study-mode-view.active {
    display: flex;
}

.study-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-color);
    border-bottom: 1px solid var(--surface-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.btn-close-study {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-close-study:hover {
    background: var(--primary-light);
}

.study-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.study-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width var(--transition);
}

.study-content {
    flex: none;
    overflow-y: visible;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.study-step {
    max-width: 600px;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.study-step-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.study-step-icon i {
    font-size: 36px;
    color: var(--primary-color);
}

.study-step h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.study-step-text {
    font-family: var(--font-content);
    font-size: 1.25rem;
    line-height: 1.9;
    color: var(--text-secondary);
    text-align: left;
}

.study-step-text p {
    margin-bottom: 20px;
}

.study-verse {
    background: var(--cream);
    border-radius: var(--border-radius);
    padding: 24px;
    margin: 24px 0;
    text-align: center;
}

.study-verse p {
    font-family: var(--font-content);
    font-size: 1.375rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.study-verse cite {
    font-size: 1rem;
    color: var(--gold);
    font-style: normal;
    font-weight: 600;
}

.study-reflection {
    background: var(--primary-light);
    border-radius: var(--border-radius);
    padding: 24px;
    margin: 24px 0;
    text-align: left;
}

.study-reflection h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.125rem;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.study-reflection p {
    font-family: var(--font-content);
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.study-exercise {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 24px;
    margin: 24px 0;
    text-align: left;
}

.study-exercise h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.125rem;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.study-exercise p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.study-exercise textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 2px solid var(--surface-color);
    border-radius: var(--border-radius);
    font-family: var(--font-ui);
    font-size: 1rem;
    resize: vertical;
    transition: border-color var(--transition-fast);
}

.study-exercise textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.study-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 24px 24px 80px;
    background: transparent;
    border-top: none;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.study-footer .btn {
    width: 100%;
    padding: 14px 16px;
    min-width: 0;
}

.btn-study-nav {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 0;
}

.study-step-indicator {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ===== PROGRESS PAGE ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 20px;
    color: var(--primary-color);
}

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

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Level Card */
.level-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    color: var(--text-inverse);
    margin-bottom: 24px;
}

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

.level-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

.level-badge i {
    color: var(--gold);
}

.level-xp {
    font-size: 0.875rem;
    opacity: 0.9;
}

.level-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.level-progress-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 4px;
    transition: width var(--transition);
}

.level-next {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0;
    color: var(--text-inverse);
}

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

.achievement-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.achievement-item.locked {
    opacity: 0.5;
}

.achievement-icon {
    width: 48px;
    height: 48px;
    background: var(--gold-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.achievement-icon i {
    font-size: 20px;
    color: var(--gold);
}

.achievement-item.locked .achievement-icon {
    background: var(--bg-secondary);
}

.achievement-item.locked .achievement-icon i {
    color: var(--text-muted);
}

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

/* Module Progress List */
.module-progress-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.module-progress-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.module-progress-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.module-progress-icon i {
    font-size: 18px;
    color: var(--primary-color);
}

.module-progress-info {
    flex: 1;
    min-width: 0;
}

.module-progress-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.module-progress-bar {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.module-progress-bar-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width var(--transition);
}

.module-progress-percent {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* History List */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.history-icon {
    width: 36px;
    height: 36px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-icon i {
    font-size: 14px;
    color: var(--text-inverse);
}

.history-info {
    flex: 1;
    min-width: 0;
}

.history-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== FAVORITES PAGE ===== */
.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.favorite-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.favorite-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.favorite-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.favorite-icon i {
    font-size: 20px;
    color: var(--primary-color);
}

.favorite-info {
    flex: 1;
    min-width: 0;
}

.favorite-module {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.favorite-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.favorite-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--error-color);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.favorite-remove:hover {
    background: rgba(229, 62, 62, 0.1);
}

/* ===== SETTINGS PAGE ===== */
.settings-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.settings-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

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

.settings-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--surface-color);
}

.settings-option:last-child {
    border-bottom: none;
}

.option-info {
    flex: 1;
}

.option-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.option-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--surface-color);
    border-radius: 28px;
    transition: var(--transition);
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* Font Size Controls */
.font-size-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-font {
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: 1px solid var(--surface-color);
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

#font-size-value {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 40px;
    text-align: center;
}

/* Range Input */
input[type="range"] {
    width: 120px;
    height: 6px;
    background: var(--surface-color);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

/* Profile Form */
.profile-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--surface-color);
    border-radius: var(--border-radius);
    font-family: var(--font-ui);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-color);
    transition: border-color var(--transition-fast);
}

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

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Settings Actions */
.settings-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

/* About Card */
.about-card {
    text-align: center;
    padding: 32px 20px;
}

.about-logo {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.about-logo i {
    font-size: 28px;
    color: var(--primary-color);
}

.about-card h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.about-tagline {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.about-version {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* ===== FAQ ===== */
.faq-container {
    padding: 0 20px 20px;
}

.faq-item {
    border-bottom: 1px solid var(--surface-color);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 0;
    background: transparent;
    border: none;
    font-family: var(--font-ui);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-icon {
    transition: transform var(--transition);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding-bottom: 16px;
}

.faq-answer p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: 16px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    background: var(--bg-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

.modal-large {
    max-width: 600px;
}

.modal-small {
    max-width: 360px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--surface-color);
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.125rem;
}

.modal-header h3 i {
    color: var(--primary-color);
}

.btn-close-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-close-modal:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--surface-color);
}

.modal-footer .btn {
    flex: 1;
}

/* Checklist Modal */
.checklist-intro {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checklist-item:hover {
    background: var(--primary-light);
}

.checklist-item.checked {
    background: rgba(56, 161, 105, 0.1);
}

.checklist-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--surface-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.checklist-item.checked .checklist-checkbox {
    background: var(--success-color);
    border-color: var(--success-color);
}

.checklist-checkbox i {
    font-size: 12px;
    color: var(--text-inverse);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.checklist-item.checked .checklist-checkbox i {
    opacity: 1;
}

.checklist-label {
    font-weight: 500;
    color: var(--text-primary);
}

/* Prayer Guide */
.prayer-guide-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prayer-step {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.prayer-step h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.prayer-step p {
    font-family: var(--font-content);
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Daily Reading */
.daily-reading-content {
    text-align: center;
}

.reading-date {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.reading-verse {
    background: var(--cream);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 20px;
}

.reading-verse p {
    font-family: var(--font-content);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.7;
}

.reading-verse cite {
    font-size: 1rem;
    color: var(--gold);
    font-style: normal;
    font-weight: 600;
}

.reading-reflection h4 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.reading-reflection p {
    font-family: var(--font-content);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 20px);
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

@media (min-width: 768px) {
    .toast-container {
        bottom: 40px;
    }
}

.toast {
    background: var(--text-primary);
    color: var(--bg-color);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

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

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

.toast.warning {
    background: var(--warning-color);
}

/* ===== SKELETON LOADING ===== */
.skeleton {
    background: linear-gradient(90deg, 
        var(--bg-secondary) 25%, 
        var(--surface-color) 50%, 
        var(--bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== FOOTER ===== */
.app-footer {
    text-align: center;
    padding: 24px 16px;
    margin-top: 40px;
    border-top: 1px solid var(--surface-color);
}

.app-footer p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.app-footer .b20-link {
    color: var(--primary-color);
    font-weight: 600;
    transition: all var(--transition-fast);
}

.app-footer .b20-link:hover {
    text-decoration: underline;
}

/* ===== UTILITIES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.hidden {
    display: none !important;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (min-width: 768px) {
    .welcome-card {
        padding: 32px;
    }
    
    .welcome-progress {
        justify-content: flex-start;
        padding: 20px 24px;
    }
    
    .quick-access-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .achievements-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .lesson-content {
        padding: 100px 32px 120px;
    }
    
    .study-content {
        padding: 48px 32px;
    }
    
    .study-step h2 {
        font-size: 2rem;
    }
    
    .study-step-text {
        font-size: 1.375rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .app-header,
    .bottom-nav,
    .app-footer,
    .toast-container {
        display: none !important;
    }
    
    body {
        padding: 0;
    }
    
    .view {
        display: block !important;
    }
}
