/* ========================================
   BIBLE REDESIGN v4.5 - PREMIUM STUDIO
   ======================================== */

:root {
    --bible-primary: #6366f1;
    --bible-secondary: #a855f7;
    --bible-accent: #fbbf24;
    --bible-bg-dark: #0f172a;
    --bible-card-bg: rgba(30, 41, 59, 0.7);
    --bible-border: rgba(255, 255, 255, 0.1);
    --bible-text: #f8fafc;
    --bible-text-muted: #94a3b8;
}

/* --- Container & Transitions --- */
#view-bible {
    animation: fadeIn 0.6s ease-out;
}

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

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

/* --- Bible Hero Banner --- */
.bible-hero-banner {
    position: relative;
    padding: 3.5rem 2rem;
    border-radius: 28px;
    margin-bottom: 2.5rem;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border: 1px solid var(--bible-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.hero-blur-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    animation: pulseSlow 12s infinite alternate;
    pointer-events: none;
}

@keyframes pulseSlow {
    from {
        transform: translate(-5%, -5%) scale(1);
    }

    to {
        transform: translate(5%, 5%) scale(1.1);
    }
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(251, 191, 36, 0.15);
    color: var(--bible-accent);
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    letter-spacing: -1px;
}

.hero-title i {
    color: var(--bible-accent);
    filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.4));
}

.version-tag {
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 10px;
    font-weight: 600;
    color: #cbd5e1;
}

.hero-desc {
    color: #94a3b8;
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 0.9rem 1.8rem;
    border-radius: 16px;
    border: 1px solid var(--bible-border);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    backdrop-filter: blur(12px);
    font-size: 1rem;
}

.hero-btn.ai-btn {
    background: linear-gradient(135deg, var(--bible-primary), var(--bible-secondary));
    color: white;
    border: none;
}

.hero-btn.settings-btn,
.hero-btn.notes-btn {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.hero-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.hero-btn.ai-btn:hover {
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

/* --- Navigation Hub --- */
.bible-nav-hub {
    background: var(--bible-card-bg);
    border: 1px solid var(--bible-border);
    border-radius: 28px;
    padding: 1.8rem;
    backdrop-filter: blur(20px);
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.nav-hub-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.6rem;
    border-radius: 18px;
    margin-bottom: 2rem;
    gap: 0.6rem;
}

.hub-tab {
    flex: 1;
    padding: 1.1rem;
    border-radius: 14px;
    border: none;
    background: transparent;
    color: var(--bible-text-muted);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: 1rem;
}

.hub-tab.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hub-tab:hover:not(.active) {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.hub-tab.pro {
    color: var(--bible-accent);
}

.hub-tab.pro i {
    animation: glowText 2s infinite alternate;
}

@keyframes glowText {
    from {
        text-shadow: 0 0 5px var(--bible-accent);
    }

    to {
        text-shadow: 0 0 15px var(--bible-accent);
    }
}

/* --- Search Panels Unified in bible_reference_styles.css --- */
.bible-mode-panel {
    display: none;
    animation: slideUpFade 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.bible-mode-panel.active {
    display: block;
}

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

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

/* --- Search Area v4.5 --- */
.bible-text-search-v4 {
    display: flex;
    gap: 1.2rem;
}

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

.search-icon {
    position: absolute;
    left: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bible-text-muted);
    font-size: 1.2rem;
}

.search-input-group input {
    width: 100%;
    padding: 1.2rem 1.2rem 1.2rem 3.8rem;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.btn-search-trigger {
    padding: 1rem 2.5rem;
    background: var(--bible-primary);
    color: white;
    border: none;
    border-radius: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.1rem;
}

.btn-search-trigger:hover {
    background: #4f46e5;
    transform: scale(1.02);
}

/* --- Results List --- */
#search-results {
    max-height: none !important;
    /* Allow container to grow if needed */
}

.bible-results-list {
    max-height: 70vh;
    /* Ligeramente menor para asegurar que el botón cerrar sea visible */
    overflow-y: auto;
    padding: 1.5rem;
    margin-top: 1.5rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Scrollbar Visibility for Results */
.bible-results-list::-webkit-scrollbar {
    width: 10px;
}

.bible-results-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
}

.bible-results-list::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--bible-primary), var(--bible-secondary));
    border-radius: 20px;
    border: 3px solid rgba(15, 23, 42, 1);
}

.bible-results-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.bible-item-row {
    margin-bottom: 2rem;
    padding: 2.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.bible-item-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 6px;
    background: var(--bible-primary);
    transform: scaleY(0);
    transition: transform 0.4s;
}

.bible-item-row:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(12px);
    border-color: var(--bible-primary);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.bible-item-row:hover::before {
    transform: scaleY(1);
}

/* Specific color overrides for Parchment Search Results */
.bible-result-card.parchment .bible-item-row {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(180, 83, 9, 0.1);
}

.bible-result-card.parchment .bible-item-row:hover {
    background: rgba(180, 83, 9, 0.05);
}

.bible-result-card.parchment .bible-item-ref {
    color: #b45309;
    /* Darker Gold for visibility */
}

.bible-result-card.parchment .bible-item-text {
    color: #4b5563;
    /* Dark Grey for readability */
}

.bible-item-ref {
    color: var(--bible-accent);
    display: block;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-family: 'Merriweather', serif;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.bible-item-text {
    margin: 0;
    line-height: 1.9;
    color: #f1f5f9;
    font-size: 1.25rem;
    font-family: 'Merriweather', serif;
    text-align: justify;
}

.bible-item-actions {
    margin-top: 1.8rem;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

/* --- Result Card (Large) --- */
.bible-result-card {
    background: #fffcf5;
    /* Parchment Color */
    color: #1e293b;
    border-radius: 24px;
    padding: 3rem;
    margin: 2rem auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    border-left: 10px solid var(--bible-accent);
    max-width: 900px;
    animation: zoomIn 0.5s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

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

.bible-result-title {
    font-family: 'Merriweather', serif;
    font-size: 2.5rem;
    color: #7c2d12;
    margin-bottom: 0.5rem;
    font-weight: 900;
}

.results-info {
    font-size: 0.95rem;
    color: var(--bible-text-muted);
    font-weight: 600;
}

.bible-result-card.parchment .results-info {
    color: #64748b;
}

.icon-btn-bible.delete {
    background: rgba(239, 68, 68, 0.05);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    /* Circular close button */
}

.icon-btn-bible.delete:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.bible-result-text {
    font-family: 'Merriweather', serif;
    font-size: 1.8rem;
    line-height: 2.1;
    text-align: justify;
    color: #334155;
    word-spacing: 2px;
}

.bible-verse-num {
    color: #b45309;
    font-weight: 900;
    font-size: 0.75em;
    vertical-align: super;
    margin-right: 12px;
    opacity: 0.8;
    background: rgba(180, 83, 9, 0.1);
    padding: 2px 6px;
    border-radius: 6px;
}

.icon-btn-bible {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Icon Buttons in Parchment */
.bible-result-card.parchment .icon-btn-bible {
    background: #ffffff;
    border-color: #dcd3c1;
}

/* Icon Buttons in Dark Mode */
.bible-result-card.dark .icon-btn-bible {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

.icon-btn-bible:hover {
    background: var(--bible-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
    border-color: transparent;
}

.icon-btn-bible.delete:hover {
    background: #ef4444;
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.3);
}

/* --- Floating AI Assistant --- */
.bible-ai-panel {
    position: fixed;
    right: -450px;
    top: 0;
    width: 440px;
    height: 100vh;
    background: #0f172a;
    border-left: 1px solid var(--bible-primary);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.bible-ai-panel.active {
    right: 0;
}

.bible-ai-header {
    background: linear-gradient(90deg, #1e1b4b, #312e81);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bible-ai-title {
    color: white;
    font-weight: 800;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bible-ai-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

.bible-ai-content {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

/* --- Advanced Search Form & Premium Lock --- */
.advanced-locked-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--bible-border);
    min-height: 280px;
}

.premium-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(10px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.premium-lock-content {
    max-width: 420px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.lock-pulse {
    font-size: 3.5rem;
    color: var(--bible-accent);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.5));
    animation: pulseGlow 3s infinite ease-in-out;
}

@keyframes pulseGlow {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.premium-lock-content h3 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1rem;
    font-weight: 800;
}

.premium-lock-content p {
    color: var(--bible-text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.bible-advanced-form {
    padding: 2.5rem;
    display: grid;
    gap: 1.8rem;
}

.btn-advanced-trigger {
    background: linear-gradient(135deg, var(--bible-secondary), #7c3aed);
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 18px;
    font-weight: 800;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.35);
    transition: all 0.4s;
    width: 100%;
}

.btn-advanced-trigger:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.5);
    filter: brightness(1.1);
}

.multi-book-select {
    min-height: 140px;
    border-radius: 16px !important;
}

.bible-ai-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.bible-ai-preset-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 1rem;
    border-radius: 16px;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
}

.bible-ai-preset-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--bible-primary);
    color: white;
}

.bible-ai-textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    color: white;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    resize: none;
}

.bible-ai-submit {
    width: 100%;
    background: var(--bible-primary);
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.4s;
}

.bible-ai-response {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid var(--bible-border);
    color: #cbd5e1;
    line-height: 1.8;
}

/* --- Empty State --- */
.empty-study-state {
    text-align: center;
    padding: 6rem 2rem;
    background: rgba(255, 255, 255, 0.01);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    margin-top: 2rem;
}

.empty-icon-pulse {
    font-size: 5rem;
    color: var(--bible-primary);
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
    animation: pulseIcon 3s infinite ease-in-out;
}

@keyframes pulseIcon {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.2;
    }

    100% {
        transform: scale(1);
        opacity: 0.6;
    }
}

/* --- Bible Results Container --- */
.bible-results-container {
    min-height: 300px;
    margin-top: 2rem;
}

.bible-empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.05);
    border-radius: 32px;
}

.bible-empty-icon {
    font-size: 3.5rem;
    color: var(--bible-text-muted);
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

/* --- Floating Settings Panel --- */
.bible-settings-panel {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 320px;
    background: #1e293b;
    border: 1px solid var(--bible-primary);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 2500;
    /* Above navbar */
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bible-settings-panel.active {
    display: flex;
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

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

.bible-settings-header {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bible-settings-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.bible-settings-header button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bible-settings-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.bible-setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bible-setting-item label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--bible-text-muted);
}

.bible-setting-item select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.6rem;
    border-radius: 10px;
    outline: none;
}

/* --- Improved Bible Result Card (v4.6) --- */
.bible-result-card.parchment {
    background: #fdfaf1;
    background-image:
        radial-gradient(circle at 100% 100%, rgba(180, 83, 9, 0.03) 0, transparent 40%),
        radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.02) 0, transparent 30%);
    color: #374151;
    border: 1px solid #e5e7eb;
    border-left: 8px solid #b45309;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.15),
        inset 0 0 80px rgba(180, 83, 9, 0.03);
}

.bible-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(180, 83, 9, 0.1);
    padding-bottom: 1.5rem;
    gap: 1.5rem;
}

.bible-result-title {
    font-family: 'Merriweather', serif;
    font-size: 2.2rem;
    color: #7c2d12;
    margin: 0;
    line-height: 1.2;
    font-weight: 900;
}

.bible-result-version {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    background: rgba(180, 83, 9, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-weight: 800;
    color: #b45309;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Dark Mode for Results --- */
.bible-result-card.dark {
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 8px solid var(--bible-primary);
}

.bible-result-card.dark .bible-result-title {
    color: white;
}

.bible-result-card.dark .bible-result-text {
    color: #cbd5e1;
}

.bible-result-card.dark .bible-verse-num {
    color: var(--bible-primary);
}

/* --- Font Size Utilities --- */
.bible-result-card.font-small .bible-result-text,
.bible-result-card.font-small .bible-item-text {
    font-size: 1rem;
    line-height: 1.6;
}

.bible-result-card.font-medium .bible-result-text,
.bible-result-card.font-medium .bible-item-text {
    font-size: 1.25rem;
    line-height: 1.9;
}

.bible-result-card.font-large .bible-result-text,
.bible-result-card.font-large .bible-item-text {
    font-size: 1.5rem;
    line-height: 2;
}

.bible-result-card.font-xlarge .bible-result-text,
.bible-result-card.font-xlarge .bible-item-text {
    font-size: 1.8rem;
    line-height: 2.2;
}

/* --- Responsive Helpers --- */
@media (max-width: 1024px) {
    .bible-search-form {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }

    .grid-span-5,
    .grid-span-4,
    .grid-span-3,
    .grid-span-2:not(.mobile-span-2) {
        grid-column: span 4;
    }

    .mobile-span-2 {
        grid-column: span 2;
    }

    .mobile-full {
        grid-column: span 4;
    }

    .mobile-hide {
        display: none !important;
    }

    .btn-read-bible {
        padding: 1rem;
        height: auto;
    }
}

@media (max-width: 1024px) {
    .bible-advanced-form {
        padding: 1.5rem;
        gap: 1.2rem;
    }

    .premium-lock-content h3 {
        font-size: 1.5rem;
    }

    .premium-lock-overlay {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-desc {
        font-size: 1rem;
    }

    .bible-nav-hub {
        padding: 1rem;
    }

    .hub-tab span {
        display: none;
    }

    .hub-tab i {
        font-size: 1.6rem;
    }

    .bible-ai-panel {
        width: 100%;
        border-left: none;
    }

    .bible-result-card {
        padding: 1.5rem 1rem;
        border-radius: 0;
        margin-left: -1rem;
        margin-right: -1rem;
        border-left-width: 5px;
    }

    .bible-result-title {
        font-size: 1.6rem;
    }

    .bible-item-row {
        padding: 1.2rem;
        margin-bottom: 1rem;
        border-radius: 16px;
    }

    .bible-item-ref {
        font-size: 1.1rem;
    }

    .bible-item-text {
        font-size: 1.05rem;
    }

    .bible-item-actions {
        gap: 0.5rem;
    }

    .icon-btn-bible {
        width: 40px;
        height: 40px;
    }

    .bible-settings-panel {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
        bottom: 20px;
    }

    /* Stack Search: Button Top, Input Bottom AI Request */
    .bible-text-search-v4 {
        flex-direction: column-reverse !important;
        display: flex !important;
        gap: 1.2rem !important;
    }

    .search-input-group {
        width: 100% !important;
        flex: none !important;
        position: relative;
    }

    .search-input-group input {
        width: 100% !important;
        height: 58px !important;
        background: rgba(15, 23, 42, 0.8) !important;
        border: 2px solid var(--bible-primary) !important;
        border-radius: 18px !important;
        padding: 0 1.5rem 0 3.5rem !important;
        font-size: 16px !important;
        color: white !important;
        pointer-events: auto !important;
    }

    .btn-search-trigger {
        width: 100% !important;
        height: 58px !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .bible-results-list {
        max-height: 70vh;
        padding-right: 0.5rem;
    }
}

/* --- Bible Notes Modal (Premium) --- */
.bible-notes-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.bible-notes-content {
    background: #0f172a;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 28px;
    border: 1px solid var(--bible-primary);
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.bible-notes-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bible-notes-header h3 {
    margin: 0;
    color: var(--bible-accent);
}

.bible-notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bible-note-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 18px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.bible-note-passage {
    display: block;
    color: var(--bible-primary);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

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

.bible-note-text {
    margin-top: 1rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.bible-note-delete {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
}

/* --- AI Integration Buttons --- */
.bible-result-ai-btn {
    background: linear-gradient(135deg, var(--bible-primary), var(--bible-secondary));
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s;
}

.bible-result-ai-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* --- AI Advanced Search Loader (Premium) --- */
.bible-ai-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-wave {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 15px;
}

.loader-wave span {
    width: 6px;
    height: 18px;
    background: #6366f1;
    border-radius: 4px;
    animation: wave 1s ease-in-out infinite;
}

.loader-wave span:nth-child(2) {
    animation-delay: 0.1s;
}

.loader-wave span:nth-child(3) {
    animation-delay: 0.2s;
}

.loader-wave span:nth-child(4) {
    animation-delay: 0.3s;
}

.loader-wave span:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes wave {

    0%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(2);
        background: #a855f7;
    }
}

.ai-processing-state {
    background: rgba(15, 23, 42, 0.4);
    border: 1px dashed rgba(99, 102, 241, 0.4);
    border-radius: 28px;
}