/**
 * FORMAÇÃO BÍBLICA - Styles
 * Desenvolvido por B20 Conteúdo Digital
 * https://www.b20.com.br
 */

/* ========================================
   CSS CUSTOM PROPERTIES
   ======================================== */
:root {
    /* Primary Colors */
    --primary-color: #A52A2A;
    --primary-hover: #8B2323;
    --primary-light: rgba(165, 42, 42, 0.15);

    /* Secondary Colors */
    --secondary-color: #8B4513;
    --secondary-hover: #6B3410;

    /* Accent Colors */
    --accent-color: #CD853F;
    --accent-hover: #B8732F;

    /* Surface Colors - Light Mode */
    --bg-color: #FFF9E6;
    --surface-color: #FFFFFF;
    --surface-elevated: #FFFFFF;
    --card-bg: #FFFFFF;

    /* Text Colors - Light Mode */
    --text-color: #2D1810;
    --text-secondary: #5D4037;
    --text-muted: #8D6E63;
    --text-light: #A1887F;

    /* Border Colors */
    --border-color: #D7CCC8;
    --border-light: #EFEBE9;

    /* Status Colors */
    --success-color: #2E7D32;
    --success-bg: rgba(46, 125, 50, 0.1);
    --warning-color: #F57C00;
    --warning-bg: rgba(245, 124, 0, 0.1);
    --error-color: #C62828;
    --error-bg: rgba(198, 40, 40, 0.1);
    --info-color: #1565C0;
    --info-bg: rgba(21, 101, 192, 0.1);

    /* Testament Colors */
    --ot-color: #78350F;
    --ot-bg: rgba(120, 53, 15, 0.1);
    --nt-color: #991B1B;
    --nt-bg: rgba(153, 27, 27, 0.1);

    /* 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);

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Typography */
    --font-display: 'Montserrat', sans-serif;
    --font-body: 'Merriweather', serif;

    /* Z-Index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 500;
    --z-modal-backdrop: 900;
    --z-modal: 1000;
    --z-toast: 1100;

    /* Layout */
    --header-height: 60px;
    --bottom-nav-height: 65px;
    --container-max: 1200px;
    --container-narrow: 800px;
}

.black-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background-color: #000000;
    z-index: 1001;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-color: #1A1410;
    --surface-color: #2D2420;
    --surface-elevated: #3D3430;
    --card-bg: #2D2420;

    --text-color: #F5DEB3;
    --text-secondary: #D7CCC8;
    --text-muted: #A1887F;
    --text-light: #8D6E63;

    --border-color: #4E342E;
    --border-light: #3E2723;

    --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);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);
}

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

html {
    font-size: clamp(14px, 2.5vw, 16px);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: var(--header-height);
    padding-bottom: calc(var(--bottom-nav-height) + 30px + env(safe-area-inset-bottom, 0px));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    body {
        padding-bottom: 30px;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-color);
}

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

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

button {
    font-family: var(--font-display);
    cursor: pointer;
    border: none;
    background: none;
}

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

input,
textarea,
select {
    font-family: var(--font-body);
    font-size: 16px;
}

/* Screen Reader Only */
.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 */
[hidden] {
    display: none !important;
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--spacing-md);
}

@media (min-width: 768px) {
    .container {
        padding: var(--spacing-lg);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: var(--spacing-xl);
    }
}

.section {
    min-height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
    padding-bottom: var(--spacing-2xl);
}

@media (min-width: 768px) {
    .section {
        min-height: calc(100vh - var(--header-height));
    }
}

/* ========================================
   HEADER
   ======================================== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--surface-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-md);
    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: var(--spacing-sm);
}

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

.header-logo h1 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

@media (min-width: 768px) {
    .header-logo h1 {
        font-size: 1.25rem;
    }
}

.desktop-nav {
    display: none;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
        gap: var(--spacing-xs);
    }

    .desktop-nav .nav-link {
        display: flex;
        align-items: center;
        gap: var(--spacing-xs);
        padding: var(--spacing-sm) var(--spacing-md);
        border-radius: var(--radius-md);
        color: var(--text-secondary);
        font-family: var(--font-display);
        font-size: 0.875rem;
        font-weight: 500;
        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: white;
    }

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

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* ========================================
   BOTTOM NAVIGATION
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 30px;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--surface-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); */
}

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

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-muted);
    font-size: 0.65rem;
    font-family: var(--font-display);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    min-width: 64px;
    min-height: 48px;
}

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

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

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

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 2px solid transparent;
    min-height: 44px;
    min-width: 44px;
}

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

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

.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(--secondary-color);
    color: white;
}

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

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

.btn-outline:hover:not(:disabled) {
    background: var(--primary-light);
    transform: translateY(-2px);
}

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

.btn-danger:hover:not(:disabled) {
    background: #B71C1C;
    transform: translateY(-2px);
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.75rem;
    min-height: 36px;
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1rem;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--surface-elevated);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

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

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    margin-bottom: var(--spacing-md);
}

.btn-back:hover {
    background: var(--surface-elevated);
    color: var(--primary-color);
}

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

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    display: grid;
    gap: var(--spacing-xl);
    padding: var(--spacing-xl) 0;
    margin-bottom: var(--spacing-xl);
}

@media (min-width: 768px) {
    .hero {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}

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

@media (min-width: 768px) {
    .hero-content {
        text-align: left;
    }
}

.hero-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--primary-light);
    color: var(--primary-color);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: var(--spacing-md);
}

.hero-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--secondary-color);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.hero-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    max-width: 500px;
}

@media (min-width: 768px) {
    .hero-description {
        margin-left: 0;
        margin-right: auto;
    }
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: center;
}

@media (min-width: 768px) {
    .hero-actions {
        justify-content: flex-start;
    }
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.bible-icon-large {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
}

.bible-icon-large i {
    font-size: 5rem;
    color: white;
}

@media (min-width: 768px) {
    .bible-icon-large {
        width: 280px;
        height: 280px;
    }

    .bible-icon-large i {
        font-size: 7rem;
    }
}

/* ========================================
   STATS GRID
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

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

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

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

.stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: var(--spacing-xs);
}

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

/* ========================================
   PROGRESS OVERVIEW
   ======================================== */
.progress-overview {
    margin-bottom: var(--spacing-xl);
}

.section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
}

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

.progress-cards {
    display: grid;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .progress-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.progress-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.progress-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.progress-card-title {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-color);
}

.progress-card-value {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--primary-color);
}

.progress-bar-container {
    height: 12px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.progress-bar {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress-bar-ot {
    background: linear-gradient(90deg, var(--ot-color), var(--secondary-color));
}

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

.progress-card-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   QUICK ACTIONS
   ======================================== */
.quick-actions {
    margin-bottom: var(--spacing-xl);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .actions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.action-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 2px solid transparent;
}

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

.action-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-sm);
    transition: all var(--transition-fast);
}

.action-card:hover .action-icon {
    background: var(--primary-color);
}

.action-icon i {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: color var(--transition-fast);
}

.action-card:hover .action-icon i {
    color: white;
}

.action-label {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
}

/* ========================================
   RECENT ACTIVITY
   ======================================== */
.recent-activity {
    margin-bottom: var(--spacing-xl);
}

.activity-list {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

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

.activity-item:hover {
    background: var(--surface-elevated);
}

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

.activity-icon.book {
    background: var(--primary-light);
    color: var(--primary-color);
}

.activity-icon.quiz {
    background: var(--success-bg);
    color: var(--success-color);
}

.activity-icon.plan {
    background: var(--info-bg);
    color: var(--info-color);
}

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

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

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

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.empty-state h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
}

/* ========================================
   FAQ SECTION
   ======================================== */
.faq-section {
    margin-bottom: var(--spacing-xl);
}

.faq-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

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

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: left;
    background: transparent;
    transition: all var(--transition-fast);
}

.faq-question:hover {
    background: var(--surface-elevated);
}

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

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

.faq-answer {
    padding: 0 var(--spacing-lg) var(--spacing-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.7;
    animation: fadeIn var(--transition-fast);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   BOOKS SECTION
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.page-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: var(--spacing-sm);
}

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

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.filters-bar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

@media (min-width: 768px) {
    .filters-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.filter-tabs {
    display: flex;
    gap: var(--spacing-xs);
    overflow-x: auto;
    padding-bottom: var(--spacing-xs);
    -webkit-overflow-scrolling: touch;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--surface-elevated);
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all var(--transition-fast);
}

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

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

.search-box {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.search-box i {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-sm) 40px;
    background: var(--surface-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-color);
    transition: all var(--transition-fast);
}

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

.category-filters {
    display: flex;
    gap: var(--spacing-xs);
    overflow-x: auto;
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    -webkit-overflow-scrolling: touch;
}

.category-chip {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all var(--transition-fast);
}

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

.category-chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.book-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 2px solid transparent;
}

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

.book-card-header {
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    position: relative;
}

.book-card-header.ot {
    background: linear-gradient(135deg, var(--ot-color), var(--secondary-color));
}

.book-card-header.nt {
    background: linear-gradient(135deg, var(--nt-color), var(--primary-color));
}

.book-number {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
}

.book-name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: white;
}

.book-category {
    font-size: 0.75rem;
    opacity: 0.9;
}

.book-card-body {
    padding: var(--spacing-md);
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.book-meta-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.book-themes {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.book-theme-tag {
    padding: 2px var(--spacing-sm);
    background: var(--primary-light);
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    color: var(--primary-color);
    font-weight: 500;
}

.book-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-light);
}

.book-progress {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.book-progress-bar {
    width: 60px;
    height: 6px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.book-progress-fill {
    height: 100%;
    background: var(--success-color);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.book-favorite-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.book-favorite-btn:hover {
    background: var(--error-bg);
    color: var(--error-color);
}

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

/* ========================================
   BOOK DETAIL
   ======================================== */
.book-detail-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.book-detail-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    color: white;
    margin-bottom: var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

.book-detail-header.ot {
    background: linear-gradient(135deg, var(--ot-color), var(--secondary-color));
}

.book-detail-header.nt {
    background: linear-gradient(135deg, var(--nt-color), var(--primary-color));
}

.book-detail-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.book-detail-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin-bottom: var(--spacing-sm);
    color: white;
}

.book-detail-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
}

.book-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.book-detail-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
}

.book-detail-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.book-detail-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

.book-detail-section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.book-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .book-info-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.book-info-item {
    text-align: center;
    padding: var(--spacing-md);
    background: var(--surface-elevated);
    border-radius: var(--radius-md);
}

.book-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.book-info-value {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-color);
}

.book-context-text {
    color: var(--text-secondary);
    line-height: 1.8;
}

.book-themes-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.book-theme-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--primary-light);
    border-radius: var(--radius-md);
    color: var(--primary-color);
    font-weight: 500;
}

.book-theme-item i {
    font-size: 0.875rem;
}

.key-verse-card {
    background: var(--surface-elevated);
    border-left: 4px solid var(--primary-color);
    padding: var(--spacing-md);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: var(--spacing-sm);
}

.key-verse-text {
    font-style: italic;
    color: var(--text-color);
    margin-bottom: var(--spacing-sm);
    line-height: 1.7;
}

.key-verse-reference {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
}

.chapters-tracker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: var(--spacing-xs);
}

.chapter-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.chapter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

.book-notes-area {
    width: 100%;
    min-height: 120px;
    padding: var(--spacing-md);
    background: var(--surface-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-color);
    resize: vertical;
    transition: border-color var(--transition-fast);
}

.book-notes-area:focus {
    outline: none;
    border-color: var(--primary-color);
}

.notes-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--spacing-sm);
}

/* ========================================
   READING PLANS
   ======================================== */
.active-plan-container {
    margin-bottom: var(--spacing-xl);
}

.active-plan-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    color: white;
    position: relative;
    overflow: hidden;
}

.active-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.active-plan-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.active-plan-progress {
    margin: var(--spacing-md) 0;
}

.active-plan-progress-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.active-plan-progress-fill {
    height: 100%;
    background: white;
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.active-plan-stats {
    display: flex;
    gap: var(--spacing-lg);
    font-size: 0.875rem;
    opacity: 0.9;
}

.active-plan-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.active-plan-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.active-plan-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.plan-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 2px solid transparent;
}

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

.plan-card-header {
    padding: var(--spacing-lg);
    background: var(--surface-elevated);
    border-bottom: 1px solid var(--border-light);
}

.plan-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.plan-icon i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.plan-name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

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

.plan-card-body {
    padding: var(--spacing-md);
}

.plan-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.plan-stats {
    display: flex;
    gap: var(--spacing-md);
}

.plan-stat {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.plan-stat i {
    color: var(--primary-color);
}

.plan-card-footer {
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-light);
}

/* ========================================
   PLAN DETAIL
   ======================================== */
.plan-detail-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.plan-detail-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    color: white;
    margin-bottom: var(--spacing-lg);
}

.plan-detail-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: var(--spacing-sm);
}

.plan-detail-description {
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
}

.plan-detail-progress {
    margin: var(--spacing-md) 0;
}

.plan-readings-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.plan-day-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--surface-elevated);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    transition: all var(--transition-fast);
}

.plan-day-card:hover {
    background: var(--primary-light);
}

.plan-day-card.completed {
    background: var(--success-bg);
}

.plan-day-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-display);
    font-weight: 700;
    flex-shrink: 0;
}

.plan-day-card.completed .plan-day-number {
    background: var(--success-color);
}

.plan-day-content {
    flex: 1;
}

.plan-day-reading {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 2px;
}

.plan-day-chapters {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.plan-day-check {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.plan-day-check:hover {
    border-color: var(--success-color);
}

.plan-day-card.completed .plan-day-check {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

/* ========================================
   QUIZZES
   ======================================== */
.quiz-stats-bar {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    padding: var(--spacing-md);
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.quiz-stat {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-color);
}

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

.quiz-categories {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    -webkit-overflow-scrolling: touch;
}

.quiz-category-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--surface-elevated);
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all var(--transition-fast);
}

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

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

.quizzes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.quiz-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 2px solid transparent;
}

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

.quiz-card-header {
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-card-header.ot {
    background: linear-gradient(135deg, var(--ot-color), var(--secondary-color));
}

.quiz-card-header.nt {
    background: linear-gradient(135deg, var(--nt-color), var(--primary-color));
}

.quiz-book-name {
    font-family: var(--font-display);
    font-weight: 700;
}

.quiz-status-badge {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
}

.quiz-status-badge.completed {
    background: var(--success-color);
}

.quiz-card-body {
    padding: var(--spacing-md);
}

.quiz-info {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.quiz-info-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.quiz-best-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm);
    background: var(--surface-elevated);
    border-radius: var(--radius-md);
}

.quiz-best-score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.quiz-best-score-value {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--success-color);
}

/* ========================================
   QUIZ PLAY
   ======================================== */
.quiz-play-container {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.quiz-play-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    color: white;
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.quiz-play-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.quiz-play-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.quiz-play-progress-bar {
    flex: 1;
    max-width: 200px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.quiz-play-progress-fill {
    height: 100%;
    background: white;
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

.quiz-question-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-lg);
}

.quiz-question-number {
    font-family: var(--font-display);
    font-size: 0.875rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.quiz-question-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--surface-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.quiz-option:hover:not(.selected):not(.correct):not(.incorrect) {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.quiz-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.quiz-option.correct {
    border-color: var(--success-color);
    background: var(--success-bg);
}

.quiz-option.incorrect {
    border-color: var(--error-color);
    background: var(--error-bg);
}

.quiz-option-letter {
    width: 32px;
    height: 32px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.quiz-option.selected .quiz-option-letter {
    background: var(--primary-color);
    color: white;
}

.quiz-option.correct .quiz-option-letter {
    background: var(--success-color);
    color: white;
}

.quiz-option.incorrect .quiz-option-letter {
    background: var(--error-color);
    color: white;
}

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

.quiz-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.quiz-result {
    text-align: center;
    padding: var(--spacing-2xl);
}

.quiz-result-icon {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
}

.quiz-result-icon.success {
    background: var(--success-bg);
    color: var(--success-color);
}

.quiz-result-icon.fail {
    background: var(--error-bg);
    color: var(--error-color);
}

.quiz-result-icon i {
    font-size: 3rem;
}

.quiz-result-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.quiz-result-score {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.quiz-result-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.quiz-result-stat {
    text-align: center;
}

.quiz-result-stat-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.quiz-result-stat-value.correct {
    color: var(--success-color);
}

.quiz-result-stat-value.incorrect {
    color: var(--error-color);
}

.quiz-result-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   PROFILE
   ======================================== */
.profile-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.profile-avatar {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.profile-since {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

@media (min-width: 768px) {
    .profile-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

.profile-stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

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

.profile-stat-icon i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.profile-stat-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: var(--spacing-xs);
}

.profile-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.achievements-section,
.favorites-section,
.notes-section,
.certificate-section,
.settings-section {
    margin-bottom: var(--spacing-xl);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--spacing-md);
}

.achievement-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

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

.achievement-card:not(.locked):hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.achievement-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-sm);
    font-size: 1.5rem;
}

.achievement-card.locked .achievement-icon {
    background: var(--border-light);
}

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

.favorites-list,
.notes-list {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.favorite-item,
.note-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.favorite-item:last-child,
.note-item:last-child {
    border-bottom: none;
}

.favorite-item:hover,
.note-item:hover {
    background: var(--surface-elevated);
}

.certificate-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.certificate-status {
    margin-bottom: var(--spacing-lg);
}

.certificate-status i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.certificate-status h4 {
    font-family: var(--font-display);
    margin-bottom: var(--spacing-sm);
}

.certificate-status p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.certificate-progress {
    height: 12px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.certificate-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.certificate-progress-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.settings-list {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
}

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

.setting-item.danger {
    background: var(--error-bg);
}

.setting-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    color: var(--text-color);
}

.setting-info i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.setting-item.danger .setting-info i {
    color: var(--error-color);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.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(--border-color);
    transition: var(--transition-fast);
    border-radius: var(--radius-full);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition-fast);
    border-radius: var(--radius-full);
    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);
}

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    z-index: var(--z-modal-backdrop);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn var(--transition-normal);
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn var(--transition-normal);
}

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

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--surface-elevated);
    color: var(--text-color);
}

.modal-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--border-light);
}

/* ========================================
   TOAST
   ======================================== */
.toast-container {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 30px + var(--spacing-md) + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    pointer-events: none;
}

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

.toast {
    background: var(--text-color);
    color: var(--bg-color);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    animation: toastSlideIn var(--transition-normal);
    pointer-events: auto;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

/* ========================================
   FORM ELEMENTS
   ======================================== */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: var(--spacing-xs);
}

.form-input {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--surface-elevated);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-color);
    font-size: 16px;
    transition: all var(--transition-fast);
}

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

.form-input.error {
    border-color: var(--error-color);
}

.form-error {
    font-size: 0.75rem;
    color: var(--error-color);
    margin-top: var(--spacing-xs);
}

/* ========================================
   FOOTER
   ======================================== */
.app-footer {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
    padding-bottom: calc(var(--spacing-xl) + 10px);
    background: var(--surface-color);
    border-top: 1px solid var(--border-light);
    margin-top: var(--spacing-2xl);
}

.app-footer p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

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

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

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

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

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1em;
    margin-bottom: var(--spacing-sm);
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: var(--spacing-md);
}

.skeleton-card {
    height: 200px;
}

/* ========================================
   UTILITIES
   ======================================== */
.text-center {
    text-align: center;
}

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

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

.mt-sm {
    margin-top: var(--spacing-sm);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mt-xl {
    margin-top: var(--spacing-xl);
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mb-xl {
    margin-bottom: var(--spacing-xl);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

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

.justify-between {
    justify-content: space-between;
}

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-md {
    gap: var(--spacing-md);
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {

    .app-header,
    .bottom-nav,
    .app-footer {
        display: none;
    }

    body {
        padding: 0;
    }

    .section {
        min-height: auto;
    }
}