/**
 * Provérbios Bíblicos - Styles
 * Desenvolvido por B20 Conteúdo Digital
 * https://www.b20.com.br
 */

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

[hidden] {
    display: none !important;
}

/* ===== CSS VARIABLES ===== */
:root {
    /* Paleta Warm & Cozy */
    --primary-color: #D4A373;
    --secondary-color: #FAEDCD;
    --accent-color: #E9C46A;
    --surface-color: #FFFDF8;
    --text-color: #5C4033;
    
    /* Variações */
    --primary-hover: #C4935F;
    --primary-light: rgba(212, 163, 115, 0.15);
    --bg-color: #FFFDF8;
    --text-muted: #8B7355;
    --text-light: #A89078;
    --border-color: rgba(92, 64, 51, 0.12);
    --shadow-color: rgba(92, 64, 51, 0.08);
    
    /* Category Colors */
    --cat-sabedoria: #D4A373;
    --cat-trabalho: #E76F51;
    --cat-relacionamentos: #E9C46A;
    --cat-ansiedade: #2A9D8F;
    --cat-fe: #264653;
    --cat-disciplina: #F4A261;
    --cat-humildade: #9C6644;
    --cat-familia: #BC6C25;
    
    /* Layout */
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    --spacing-unit: 8px;
    --header-height: 60px;
    --bottom-nav-height: 65px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Z-index layers */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 500;
    --z-fixed: 1000;
    --z-modal: 2000;
    --z-toast: 3000;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1A1512;
        --surface-color: #2A2320;
        --text-color: #F5EDE6;
        --text-muted: #B8A99A;
        --text-light: #8B7D70;
        --border-color: rgba(245, 237, 230, 0.12);
        --shadow-color: rgba(0, 0, 0, 0.3);
        --primary-light: rgba(212, 163, 115, 0.2);
    }
}

[data-theme="dark"] {
    --bg-color: #1A1512;
    --surface-color: #2A2320;
    --text-color: #F5EDE6;
    --text-muted: #B8A99A;
    --text-light: #8B7D70;
    --border-color: rgba(245, 237, 230, 0.12);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --primary-light: rgba(212, 163, 115, 0.2);
}

/* ===== BASE STYLES ===== */
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) + 20px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

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

p {
    color: var(--text-muted);
}

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

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

/* ===== ACCESSIBILITY ===== */
.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;
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== 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 16px;
    box-shadow: 0 2px 12px var(--shadow-color);
    z-index: var(--z-fixed);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@supports (padding: env(safe-area-inset-top)) {
    .app-header {
        padding-top: env(safe-area-inset-top);
        height: calc(var(--header-height) + env(safe-area-inset-top));
    }
}

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

.site-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
}

.header-logo h1 {
    font-size: clamp(1rem, 4vw, 1.25rem);
    font-weight: 600;
    white-space: nowrap;
}

.desktop-nav {
    display: none;
}

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

/* Desktop Navigation */
@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
        gap: 4px;
    }
    
    .desktop-nav .nav-link {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        border-radius: var(--border-radius-sm);
        color: var(--text-muted);
        font-size: 0.9rem;
        font-weight: 500;
        transition: var(--transition);
    }
    
    .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;
    }
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    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 12px var(--shadow-color);
    z-index: var(--z-fixed);
}

@supports (padding: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
        height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    color: var(--text-light);
    font-size: 0.65rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    min-width: 64px;
    min-height: 48px;
}

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

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

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

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

/* ===== CONTAINER ===== */
.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;
    }
}

/* ===== SECTIONS ===== */
.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.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-body);
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(212, 163, 115, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 163, 115, 0.4);
}

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

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

.btn-outline-danger {
    background: transparent;
    color: #E76F51;
    border: 1px solid #E76F51;
}

.btn-outline-danger:hover {
    background: #E76F51;
    color: white;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-muted);
}

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

.btn-icon-sm {
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.btn-icon-lg {
    width: 56px;
    height: 56px;
    padding: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.25rem;
}

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

.btn-icon-lg.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    padding: 32px 24px;
    background: linear-gradient(135deg, var(--primary-light) 0%, transparent 100%);
    border-radius: var(--border-radius-lg);
    margin-bottom: 24px;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 1.75rem;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 400px;
}

.hero-decoration {
    position: absolute;
    top: -50px;
    right: -50px;
    z-index: 1;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.1;
}

.decoration-circle:nth-child(1) {
    width: 200px;
    height: 200px;
    top: 0;
    right: 0;
}

.decoration-circle:nth-child(2) {
    width: 150px;
    height: 150px;
    top: 80px;
    right: 80px;
    opacity: 0.08;
}

.decoration-circle:nth-child(3) {
    width: 100px;
    height: 100px;
    top: 40px;
    right: 160px;
    opacity: 0.05;
}

@media (min-width: 768px) {
    .hero {
        padding: 48px 40px;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
}

/* ===== VERSE OF THE DAY ===== */
.verse-of-day-card {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 4px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
}

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

.verse-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
}

.verse-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--text-color);
    margin-bottom: 12px;
    border: none;
    padding: 0;
}

.verse-reference {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.verse-reflection {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 16px;
    background: var(--primary-light);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-color);
}

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

.section-header h3 {
    font-size: 1.1rem;
}

.link-see-all {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color);
}

.link-see-all i {
    font-size: 0.75rem;
    transition: transform var(--transition);
}

.link-see-all:hover i {
    transform: translateX(4px);
}

/* ===== CATEGORIES GRID ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

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

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

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-color);
}

.category-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.25rem;
    color: white;
}

.category-card span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
}

.category-card small {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ===== RECENT PROVERBS ===== */
.recent-proverbs {
    margin-bottom: 32px;
}

.recent-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    cursor: pointer;
    transition: all var(--transition);
}

.recent-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.recent-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

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

.recent-card-content p {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-card-content small {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ===== CTA CARD ===== */
.cta-card {
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: var(--border-radius-lg);
    color: white;
    margin-bottom: 24px;
}

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

.cta-card h3 {
    color: white;
    margin-bottom: 8px;
}

.cta-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.streak-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    font-weight: 600;
}

.streak-display i {
    color: #FFD700;
}

/* ===== SEARCH & FILTER ===== */
.search-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    position: relative;
    z-index: 10;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input-wrapper i.fa-search {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.1rem;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.3s ease;
    z-index: 2;
}

.search-input-wrapper:focus-within i.fa-search {
    transform: translateY(-50%) scale(1.15);
    color: var(--primary-hover);
}

.search-input-wrapper input {
    width: 100%;
    padding: 16px 50px 16px 52px;
    font-family: var(--font-body);
    font-size: 1.05rem;
    background: var(--surface-color);
    border: 2px solid transparent;
    border-radius: var(--border-radius-lg);
    color: var(--text-color);
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.search-input-wrapper input:focus {
    outline: none;
    background: var(--bg-color);
    border-color: var(--primary-light);
    box-shadow: 0 8px 25px rgba(212, 163, 115, 0.2);
    transform: translateY(-2px);
}

.search-input-wrapper input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.btn-clear-search {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border: none;
    border-radius: 50%;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0.8;
    z-index: 2;
}

.btn-clear-search:hover {
    background: var(--primary-color);
    color: white;
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Refined search-filter-bar secondary button */
.search-filter-bar .btn-secondary {
    border-radius: var(--border-radius-lg);
    border: none;
    background: var(--surface-color);
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 16px 24px;
}

.search-filter-bar .btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 163, 115, 0.3);
}

.btn-text-desktop {
    display: none;
}

@media (min-width: 768px) {
    .btn-text-desktop {
        display: inline;
    }
}

/* ===== CATEGORY FILTER ===== */
.category-filter {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 4px 16px 4px;
    margin-bottom: 24px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}

.category-filter::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .category-filter {
        flex-wrap: wrap;
        justify-content: flex-start;
        overflow-x: visible;
        padding-bottom: 12px;
        scroll-snap-type: none;
    }
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--surface-color);
    border: 2px solid transparent;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 3px 10px var(--shadow-color);
    scroll-snap-align: start;
}

.filter-chip i {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.filter-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(212, 163, 115, 0.2);
    border-color: var(--primary-light);
}

.filter-chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 6px 15px rgba(212, 163, 115, 0.4);
    transform: translateY(-2px);
}

.filter-chip.active i {
    color: white;
}

/* ===== PROVERBS LIST ===== */
.proverbs-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.proverb-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition);
}

.proverb-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-color);
}

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

.proverb-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.proverb-actions {
    display: flex;
    gap: 4px;
}

.proverb-card-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--text-color);
    margin-bottom: 8px;
}

.proverb-card-ref {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 16px;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: var(--text-color);
}

.empty-state p {
    margin-bottom: 24px;
    color: var(--text-muted);
}

.empty-state span {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
}

.hidden {
    display: none !important;
}

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

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

.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.stat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1rem;
}

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

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

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

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

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

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

.tab i {
    font-size: 0.9rem;
}

/* ===== TAB CONTENT ===== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition);
}

.history-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.history-card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

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

.history-card-content p {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.history-card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.clear-history-section {
    margin-top: 32px;
    text-align: center;
}

/* ===== ABOUT SECTION ===== */
.about-header {
    text-align: center;
    padding: 32px 0;
}

.about-logo {
    display: flex;
    justify-content: center;
    margin: 0 auto 16px;
}

.site-logo-large {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    object-fit: cover;
    display: block;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.about-header h2 {
    margin-bottom: 8px;
}

.about-tagline {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.version-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-light);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-color);
}

.about-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.about-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.about-card h3 {
    margin-bottom: 12px;
}

.about-card p {
    font-size: 0.95rem;
    line-height: 1.7;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-color);
}

.feature-list li i {
    color: var(--primary-color);
}

/* ===== FAQ ===== */
.faq-section {
    margin-bottom: 24px;
}

.faq-section > h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

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

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

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

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

.faq-answer {
    padding: 0 20px 16px;
}

.faq-answer p {
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ===== CREDITS ===== */
.credits-card {
    text-align: center;
}

.credits-divider {
    width: 60px;
    height: 2px;
    background: var(--primary-color);
    margin: 20px auto;
}

.credits-b20 {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.b20-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    transition: var(--transition);
}

.b20-link:hover {
    transform: scale(1.05);
}

.privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--primary-light);
    border-radius: var(--border-radius);
    margin-bottom: 24px;
}

.privacy-note i {
    color: var(--primary-color);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.privacy-note p {
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

@media (min-width: 768px) {
    .modal {
        align-items: center;
    }
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    background: var(--surface-color);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    padding: 24px;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@media (min-width: 768px) {
    .modal-content {
        border-radius: var(--border-radius-lg);
        margin: 24px;
    }
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-color);
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--primary-color);
    color: white;
}

.modal-body {
    text-align: center;
    padding: 24px 0;
}

.modal-category {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
}

.modal-verse {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--text-color);
    margin-bottom: 16px;
    border: none;
    padding: 0;
}

.modal-reference {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.modal-reflection {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--primary-light);
    border-radius: var(--border-radius);
    text-align: left;
}

.modal-reflection i {
    color: var(--primary-color);
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.modal-reflection p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    margin-top: 24px;
}

.swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--text-light);
}

@media (min-width: 768px) {
    .swipe-hint {
        display: none;
    }
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(100% - 32px);
    max-width: 400px;
}

@supports (padding: env(safe-area-inset-bottom)) {
    .toast-container {
        bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 16px);
    }
}

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

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--text-color);
    color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: toastIn 0.3s ease;
}

.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}

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

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

.toast i {
    font-size: 1.25rem;
}

.toast.toast-success i {
    color: #2A9D8F;
}

.toast.toast-error i {
    color: #E76F51;
}

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

.toast span {
    flex: 1;
    font-size: 0.9rem;
}

/* ===== CONFIRM DIALOG ===== */
.confirm-dialog {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.confirm-content {
    position: relative;
    width: 100%;
    max-width: 360px;
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    padding: 32px 24px;
    text-align: center;
    animation: scaleIn 0.2s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.confirm-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(231, 111, 81, 0.1);
    border-radius: 50%;
    color: #E76F51;
    font-size: 1.5rem;
    margin: 0 auto 16px;
}

.confirm-content h3 {
    margin-bottom: 8px;
}

.confirm-content p {
    margin-bottom: 24px;
}

.confirm-actions {
    display: flex;
    gap: 12px;
}

.confirm-actions .btn {
    flex: 1;
}

.btn-danger {
    background: #E76F51;
    color: white;
}

.btn-danger:hover {
    background: #D35F45;
}

/* ===== FOOTER ===== */
.app-footer {
    text-align: center;
    padding: 24px 16px;
    margin-bottom: 60px;
}

@media (min-width: 768px) {
    .app-footer {
        margin-bottom: 0;
    }
}

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

.app-footer a {
    color: var(--primary-color);
}

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

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

.skeleton-text {
    height: 1em;
    margin-bottom: 8px;
}

.skeleton-text:last-child {
    width: 60%;
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

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