/**
 * Gerador de Nome Bíblico - Styles
 * Desenvolvido por B20 Conteúdo Digital
 * https://www.b20.com.br
 */

/* === CSS RESET E VARIÁVEIS === */
:root {
    /* Paleta Evernote Green com Antigravity Pattern */
    --primary-color: #00A82D;
    --secondary-color: #2DBE60;
    --accent-color: #FFFFFF;
    --surface-color: rgba(255, 255, 255, 0.65);
    --text-color: #1e293b;

    /* Variações automáticas */
    --primary-hover: #008f26;
    --primary-light: rgba(0, 168, 45, 0.1);
    --bg-color: #f1f5f9;
    --text-muted: #94a3b8;
    --text-secondary: #475569;
    --border-color: rgba(255, 255, 255, 0.8);
    --shadow-light: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    --shadow-heavy: 0 30px 60px -15px rgba(0, 0, 0, 0.12);
    --glass-blur: blur(12px);

    /* Layout */
    --border-radius: 16px;
    --border-radius-small: 12px;
    --border-radius-large: 24px;
    --spacing-unit: 8px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;

    /* Z-index */
    --z-header: 1000;
    --z-bottom-nav: 1000;
    --z-toast: 2000;
    --z-loading: 3000;
}

/* Dark Mode - Controlado pelo JS */
body.dark-theme {
    --bg-color: #0f172a;
    --surface-color: rgba(30, 41, 59, 0.65);
    --text-color: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
}

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

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    padding-top: 60px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 767px) {
    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0));
    }
}

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

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

.logo-img {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-small);
}

.header-logo h1 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--primary-color);
}

/* Navegação Desktop */
.desktop-nav {
    display: none;
    gap: 8px;
}

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

    .desktop-nav .nav-link {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 16px;
        border-radius: var(--border-radius-small);
        color: var(--text-color);
        text-decoration: none;
        font-weight: 500;
        transition: var(--transition-fast);
    }

    .desktop-nav .nav-link:hover,
    .desktop-nav .nav-link.active {
        background: var(--primary-color);
        color: white;
    }

    .bottom-nav {
        display: none !important;
    }
}

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

.btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--border-radius-small);
    background: var(--surface-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

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

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

.nav-item i {
    font-size: 20px;
    transition: transform 0.2s ease;
}

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

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

/* === LAYOUT PRINCIPAL === */
.main-content {
    min-height: calc(100vh - 60px);
}

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

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

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

/* === VIEWS === */
.view {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* === HOME VIEW PREMIUM === */
.premium-hero {
    position: relative;
    padding: 80px 0 60px;
    text-align: center;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 168, 45, 0.15) 0%, transparent 60%);
    z-index: -1;
    animation: slowPulse 8s ease-in-out infinite alternate;
}

@keyframes slowPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; }
}

.premium-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(0,168,45,0.1), rgba(45,190,96,0.2));
    border: 1px solid rgba(0, 168, 45, 0.3);
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0,168,45,0.1);
}

body.dark-theme .premium-badge {
    background: linear-gradient(135deg, rgba(0,168,45,0.2), rgba(45,190,96,0.3));
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.4);
}

.hero-content {
    margin-bottom: 40px;
    z-index: 1;
    position: relative;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 16px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-title span {
    background: linear-gradient(135deg, #00A82D 0%, #2DBE60 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.glass-card {
    background: var(--surface-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

body.dark-theme .glass-card {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.search-form {
    margin-bottom: 24px;
}

.premium-input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .premium-input-group {
        flex-direction: row;
        background: var(--bg-color);
        padding: 6px;
        border-radius: 100px;
        border: 1px solid var(--border-color);
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    }
}

.input-icon-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-icon-left {
    position: absolute;
    left: 20px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.name-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid var(--border-color);
    border-radius: 100px;
    font-size: 1.1rem;
    background: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
}

@media (min-width: 768px) {
    .name-input {
        border: none;
        background: transparent;
        padding-left: 48px;
    }
}

.name-input:focus {
    outline: none;
    background: transparent;
}

@media (max-width: 767px) {
    .name-input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px rgba(0,168,45,0.1);
    }
}

.premium-input-group .btn-primary {
    border-radius: 100px;
    padding: 16px 32px;
    font-size: 1.1rem;
    box-shadow: 0 8px 20px rgba(0,168,45,0.25);
}

.try-also-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: block;
    width: 100%;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.btn-outline-glow {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid rgba(0,168,45,0.3);
    padding: 12px 24px;
    border-radius: 100px;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

body.dark-theme .btn-outline-glow {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.3);
}

.btn-outline-glow:hover {
    background: rgba(0,168,45,0.05);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0,168,45,0.2);
    transform: translateY(-2px);
}

.form-error {
    color: #dc3545;
    font-size: var(--font-size-sm);
    margin-top: 8px;
    display: none;
}

.form-error.show {
    display: block;
}

/* === BOTÕES === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
    min-height: 48px;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-medium);
}

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

.btn-secondary:hover {
    background: color-mix(in srgb, var(--secondary-color) 85%, black);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

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

.btn-large {
    padding: 16px 32px;
    font-size: var(--font-size-lg);
}

.btn-small {
    padding: 8px 16px;
    font-size: var(--font-size-sm);
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: var(--transition-fast);
    margin-bottom: 24px;
}

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



/* === FEATURES SECTION === */
.features-section {
    padding: 60px 0;
    text-align: center;
}

.features-section h3 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

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

.feature-card {
    background: var(--surface-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    padding: 32px 24px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

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

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

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

.feature-card h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* === RESULT VIEW === */
.result-header {
    margin-bottom: 32px;
}

.result-header h2 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
}

.result-card {
    background: var(--surface-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-light);
}

.result-name {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 8px;
}

.result-meaning {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
    font-style: italic;
}

.result-details {
    display: grid;
    gap: 24px;
}

.result-section {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 24px;
    border-left: 4px solid var(--primary-color);
}

.result-section h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.verse-text {
    font-style: italic;
    font-size: var(--font-size-lg);
    color: var(--primary-color);
    margin-bottom: 8px;
}

.verse-reference {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
}

@media (min-width: 768px) {
    .result-actions {
        flex-direction: row;
        justify-content: center;
    }
}

/* === DISCOVERY VIEW PREMIUM === */
.discovery-hero {
    background: linear-gradient(180deg, var(--primary-light) 0%, transparent 100%);
    padding: 40px 0 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(0,168,45,0.05);
}

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

.discovery-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

.discovery-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.premium-discovery-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 48px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

body.dark-theme .premium-discovery-card {
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.premium-discovery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,168,45,0.1);
    border-color: rgba(0,168,45,0.3);
}

.bg-gradient-brand {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 8px 16px rgba(0,168,45,0.3);
}

.discovery-card-content {
    flex: 1;
    text-align: left;
}

.discovery-card-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.discovery-card-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
}

.discovery-card-arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.premium-discovery-card:hover .discovery-card-arrow {
    transform: translateX(5px);
    color: var(--primary-color);
}

.section-title-elegant {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
    padding-left: 16px;
}

.section-title-elegant::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 4px;
    background: var(--primary-color);
    border-radius: 4px;
}

.premium-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

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

.glass-btn {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

body.dark-theme .glass-btn {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.glass-btn:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 24px rgba(0,0,0,0.05);
    background: var(--bg-color);
}

.cat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.bg-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.bg-pink { background: linear-gradient(135deg, #ec4899, #db2777); }
.bg-gold { background: linear-gradient(135deg, #f59e0b, #d97706); }
.bg-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }

.favorites-header,
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

.favorites-header h2,
.history-header h2 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--primary-color);
}

.favorites-header p,
.history-header p {
    color: var(--text-secondary);
    margin-top: 4px;
}

.name-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .name-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

.name-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
body.dark-theme .name-item {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.name-item:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 24px rgba(0,168,45,0.05);
    border-color: rgba(0,168,45,0.2);
    background: var(--bg-color);
}

.name-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.name-item-name {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--primary-color);
}

.name-item-actions {
    display: flex;
    gap: 8px;
}

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

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

.name-item-meaning {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 8px;
}

.name-item-date {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* === EMPTY STATES === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

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

.empty-icon i {
    font-size: 32px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

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

/* === TOAST NOTIFICATIONS === */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-color);
    color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: var(--z-toast);
    max-width: 90%;
    min-width: 300px;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    gap: 16px;
}

.toast-message {
    flex: 1;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: var(--bg-color);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* === LOADING OVERLAY === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loading);
    backdrop-filter: blur(4px);
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    background: var(--bg-color);
    border-radius: var(--border-radius-large);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-heavy);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--surface-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* === FOOTER === */
.app-footer {
    background: var(--surface-color);
    padding: 32px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.app-footer p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: 8px;
}

.b20-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

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

/* === 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 styles */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* === RESPONSIVE ADJUSTMENTS === */
@media (max-width: 480px) {
    .hero-title {
        font-size: var(--font-size-2xl);
    }

    .search-card {
        padding: 24px;
    }

    .result-card {
        padding: 24px;
    }

    .discovery-card {
        padding: 32px 24px;
    }
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

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

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

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

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

    .app-header,
    .bottom-nav,
    .btn,
    .toast,
    .loading-overlay {
        display: none !important;
    }

    body {
        padding: 0;
    }

    .main-content {
        margin: 0;
    }
}

/* === FOOTER PREMIUM === */
.app-footer {
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 32px 16px 100px;
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.footer-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

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

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

.copyright-text {
    margin-bottom: 12px;
}

.b20-link {
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.legal-notice {
    font-size: 0.82rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* === THE NEW RESULT PAGE PREMIUM UI === */
.premium-result-card {
    background: transparent;
    border: none;
    box-shadow: none;
}
.result-hero {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: var(--surface-color);
    border-radius: 24px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}
.result-icon-top {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 16px;
}
.gradient-text {
    background: linear-gradient(135deg, #00A82D 0%, #2DBE60 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 800;
}
.premium-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media(min-width: 768px){
    .premium-details-grid {
        grid-template-columns: 1fr 1fr;
    }
    .full-width {
        grid-column: 1 / -1;
    }
}
.glass-box {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
body.dark-theme .glass-box { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.glass-box h4 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 16px;
    font-weight: 700;
}
.icon-wrap {
    width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-size: 14px;
}
.relative-quote {
    position: relative;
    padding-left: 10px;
}
.quote-bg {
    position: absolute;
    top: -10px;
    left: 0;
    font-size: 40px;
    color: var(--primary-light);
    opacity: 0.3;
    z-index: 0;
}
.verse-text {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-color);
    line-height: 1.6;
}
.verse-reference {
    display: block; text-align: right; margin-top: 10px; color: var(--primary-color); font-weight: 700; font-size: 0.9rem;
}
.char-name { color: var(--primary-color); font-size: 1.1rem; margin-bottom: 8px;}
.spiritual-text { font-size: 1.1rem; line-height: 1.6; color: var(--text-secondary); }
.alert-glow { background: rgba(220, 53, 69, 0.1); border: 1px solid rgba(220, 53, 69, 0.3); border-radius: 12px; padding: 16px; color: #dc3545; font-weight: 600; margin-bottom: 24px; }

/* === ARTICLE & FAQ SECTION === */
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-4 { margin-bottom: 2rem; }
.text-center { text-align: center; }

.premium-glass-box {
    background: var(--surface-color);
    border-radius: 24px;
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}
body.dark-theme .premium-glass-box { box-shadow: 0 4px 20px rgba(0,0,0,0.15); }

.glass-article {
    text-align: justify;
    line-height: 1.7;
    color: var(--text-secondary);
}
.glass-article h3 {
    text-align: left;
    color: var(--text-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
}
.article-icon {
    width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: white; font-size: 20px; margin-bottom: 20px;
}
.article-dropcap::first-letter {
    font-size: 3rem;
    font-weight: 800;
    float: left;
    line-height: 1;
    margin-right: 8px;
    color: var(--primary-color);
}
.article-quote {
    margin-top: 24px;
    padding: 20px;
    border-left: 4px solid var(--primary-color);
    background: rgba(0, 168, 45, 0.05);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-color);
    border-radius: 0 16px 16px 0;
}
.article-quote span {
    display: block;
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

.premium-faq-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.faq-item {
    cursor: pointer;
    transition: all 0.3s ease;
}
.faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style-type: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-icon {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}
.faq-item[open] .faq-icon {
    transform: rotate(180deg);
}
.faq-answer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    line-height: default;
    animation: fadeIn 0.4s ease;
    font-size: 1rem;
}