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

:root {
    --gold: #D4A843;
    --gold-light: #F0D68A;
    --gold-dark: #B8892E;
    --gold-glow: rgba(212, 168, 67, 0.3);
    --sacred-purple: #2D1B4E;
    --sacred-deep: #1A0E30;
    --sacred-mid: #3D2668;
    --sacred-light: #5B3F8C;
    --warmth: #8B5E3C;
    --warmth-light: #C99B6D;
    --bg: #0F0A1A;
    --bg-card: rgba(45, 27, 78, 0.6);
    --bg-card-solid: #251648;
    --text: #F0E6D6;
    --text-light: #C4B8A8;
    --text-muted: #8A7E72;
    --border: rgba(212, 168, 67, 0.2);
    --border-glow: rgba(212, 168, 67, 0.4);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-gold: 0 0 30px rgba(212, 168, 67, 0.15);
    --radius: 16px;
    --radius-lg: 24px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(45, 27, 78, 0.8) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(61, 38, 104, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(61, 38, 104, 0.2) 0%, transparent 50%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Ambient Particles ===== */
.ambient-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle 8s ease-in-out infinite;
    box-shadow: 0 0 6px var(--gold-glow);
}

@keyframes floatParticle {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    20% { opacity: 0.6; }
    80% { opacity: 0.3; }
    100% { opacity: 0; transform: translateY(-20vh) scale(1); }
}

/* ===== App Container ===== */
.app-container {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* ===== Header ===== */
.header {
    text-align: center;
    padding: 56px 0 40px;
    position: relative;
}

.header-content {
    position: relative;
}

.divine-rays {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 200px;
    background: radial-gradient(ellipse at center, rgba(212, 168, 67, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 12px;
}

.logo-icon {
    font-size: 2.8rem;
    filter: drop-shadow(0 0 12px rgba(212, 168, 67, 0.4));
}

.logo h1 {
    font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    letter-spacing: 1px;
    filter: drop-shadow(0 2px 8px rgba(212, 168, 67, 0.3));
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 300;
    font-style: italic;
    font-family: 'Playfair Display', Georgia, serif;
}

/* ===== Religion Selector ===== */
.religion-selector {
    margin-bottom: 36px;
}

.religion-selector h2 {
    font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
    color: var(--gold-light);
    letter-spacing: 0.5px;
}

/* Grid layout for religion cards */
.religion-cards.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto;
}

.religion-cards.grid-layout .all-faiths-card {
    grid-column: 1 / -1;
    justify-self: center;
}

.religion-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    font-family: inherit;
    outline: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    width: auto;
}

.card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.religion-card:hover .card-glow {
    opacity: 1;
    width: 200px;
    height: 200px;
}

.religion-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-gold);
    transform: translateY(-4px);
    background: rgba(61, 38, 104, 0.7);
}

.religion-card.active {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(61, 38, 104, 0.9), rgba(45, 27, 78, 0.9));
    box-shadow: 0 0 30px rgba(212, 168, 67, 0.2), var(--shadow-lg);
}

.religion-card.active .card-glow {
    opacity: 1;
    width: 250px;
    height: 250px;
}

/* All Faiths special card */
.all-faiths-card {
    max-width: 200px;
    width: 155px;
    background: linear-gradient(135deg, rgba(61, 38, 104, 0.6), rgba(30, 55, 90, 0.5));
    border: 1px solid rgba(212, 168, 67, 0.35);
}

.all-faiths-card:hover {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(61, 38, 104, 0.8), rgba(30, 55, 90, 0.7));
    box-shadow: 0 0 25px rgba(212, 168, 67, 0.25), 0 0 50px rgba(100, 130, 200, 0.15);
}

.all-faiths-card.active {
    background: linear-gradient(135deg, rgba(61, 38, 104, 0.9), rgba(30, 55, 90, 0.8));
    box-shadow: 0 0 30px rgba(212, 168, 67, 0.3), 0 0 60px rgba(100, 130, 200, 0.2);
}

.religion-icon {
    font-size: 2.6rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(212, 168, 67, 0.3));
}

.religion-name {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gold-light);
}

.religion-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ===== Selected Religion Badge ===== */
.selected-religion {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--sacred-deep);
    padding: 10px 20px;
    border-radius: 50px;
    margin-bottom: 24px;
    width: fit-content;
    box-shadow: 0 4px 16px rgba(212, 168, 67, 0.3);
}

.selected-icon {
    font-size: 1.3rem;
}

.selected-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.95rem;
}

.change-btn {
    background: rgba(26, 14, 48, 0.3);
    border: 1px solid rgba(26, 14, 48, 0.3);
    color: var(--sacred-deep);
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 600;
    transition: var(--transition);
}

.change-btn:hover {
    background: rgba(26, 14, 48, 0.5);
}

/* ===== Question Section ===== */
.question-section {
    display: none;
}

.question-section.visible {
    display: block;
    animation: fadeIn 0.4s ease;
}

.question-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.question-box h2 {
    font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--gold-light);
}

.hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

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

textarea {
    width: 100%;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    resize: vertical;
    transition: var(--transition);
    background: rgba(15, 10, 26, 0.6);
    line-height: 1.5;
}

textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(15, 10, 26, 0.8);
    box-shadow: 0 0 0 4px rgba(212, 168, 67, 0.1), 0 0 20px rgba(212, 168, 67, 0.08);
}

textarea::placeholder {
    color: var(--text-muted);
}

.ask-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--sacred-deep);
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px rgba(212, 168, 67, 0.3);
}

.ask-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 168, 67, 0.5);
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

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

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(26, 14, 48, 0.3);
    border-top-color: var(--sacred-deep);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* ===== Example Chips ===== */
.examples {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.examples-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
    margin-bottom: 10px;
}

.example-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.example-chip {
    background: rgba(15, 10, 26, 0.4);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.example-chip:hover {
    border-color: var(--gold);
    color: var(--gold-light);
    background: rgba(212, 168, 67, 0.08);
}

/* ===== Inline Patience Message (inside question box) ===== */
.inline-patience {
    margin-top: 24px;
    padding: 28px 24px;
    background: rgba(212, 168, 67, 0.06);
    border: 1px solid rgba(212, 168, 67, 0.2);
    border-radius: var(--radius);
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.inline-patience-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    animation: pulseGlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(212, 168, 67, 0.4));
}

.inline-patience-title {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    color: var(--gold-light);
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}

.inline-patience-verse {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    color: var(--gold-light);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 460px;
    margin: 0 auto;
}

.inline-patience-verse .verse-ref {
    display: block;
    margin-top: 8px;
    font-family: 'Cinzel', serif;
    font-style: normal;
    font-size: 0.8rem;
    color: var(--gold);
    letter-spacing: 0.5px;
}

/* ===== Loading Overlay (Fullscreen) ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    text-align: center;
    animation: fadeIn 0.4s ease;
    overflow: hidden;
}

.loading-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(45, 27, 78, 0.97) 0%, rgba(15, 10, 26, 0.99) 70%);
    backdrop-filter: blur(20px);
}

.loading-content {
    position: relative;
    z-index: 1;
    top: 50%;
    transform: translateY(-50%);
    padding: 40px;
}

.loading-symbol {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: pulseGlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(212, 168, 67, 0.5));
}

.loading-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ring {
    position: absolute;
    border: 1px solid rgba(212, 168, 67, 0.15);
    border-radius: 50%;
    top: 50%;
    left: 50%;
}

.ring-1 {
    width: 120px;
    height: 120px;
    margin: -60px 0 0 -60px;
    animation: ringPulse 3s ease-in-out infinite;
}

.ring-2 {
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    animation: ringPulse 3s ease-in-out infinite 0.5s;
}

.ring-3 {
    width: 280px;
    height: 280px;
    margin: -140px 0 0 -140px;
    animation: ringPulse 3s ease-in-out infinite 1s;
}

@keyframes ringPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

.loading-title {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: var(--gold-light);
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.patience-verse {
    background: rgba(212, 168, 67, 0.08);
    border: 1px solid rgba(212, 168, 67, 0.15);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 0 auto 20px;
    max-width: 500px;
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    color: var(--gold-light);
    font-size: 1rem;
    line-height: 1.7;
}

.patience-verse .verse-ref {
    display: block;
    margin-top: 10px;
    font-family: 'Cinzel', serif;
    font-style: normal;
    font-size: 0.82rem;
    color: var(--gold);
    letter-spacing: 0.5px;
}

.loading-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    animation: fadePulse 2s ease-in-out infinite;
}

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

@keyframes fadePulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ===== Response Section ===== */
.response-section {
    margin-top: 32px;
    margin-bottom: 48px;
    background: linear-gradient(135deg, rgba(45, 27, 78, 0.7), rgba(26, 14, 48, 0.8));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg), var(--shadow-gold);
    animation: fadeIn 0.5s ease;
    backdrop-filter: blur(10px);
    position: relative;
}

.response-ornament {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    color: var(--gold);
    background: var(--bg);
    padding: 0 16px;
    letter-spacing: 4px;
}

.response-header {
    margin-bottom: 24px;
}

.response-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tts-btn {
    background: rgba(212, 168, 67, 0.08);
    border: 1px solid rgba(212, 168, 67, 0.25);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.tts-btn:hover {
    border-color: var(--gold);
    background: rgba(212, 168, 67, 0.15);
    box-shadow: 0 0 15px rgba(212, 168, 67, 0.2);
}

.tts-btn.speaking {
    border-color: var(--gold);
    background: rgba(212, 168, 67, 0.2);
    animation: pulseGlow 1.5s ease-in-out infinite;
}

.tts-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.response-header h2 {
    font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.response-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-religion, .meta-source {
    font-size: 0.82rem;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 500;
}

.meta-religion {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--sacred-deep);
    font-family: 'Cinzel', serif;
    font-weight: 700;
}

.meta-source {
    background: rgba(212, 168, 67, 0.08);
    color: var(--gold-light);
    border: 1px solid var(--border);
}

.response-question {
    background: rgba(212, 168, 67, 0.06);
    padding: 18px 24px;
    border-radius: var(--radius);
    margin-bottom: 28px;
    font-style: italic;
    color: var(--text-light);
    border-left: 4px solid var(--gold);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
}

.response-body {
    line-height: 1.8;
    color: var(--text);
}

.response-body h1, .response-body h2, .response-body h3 {
    font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
    color: var(--gold-light);
    margin-top: 28px;
    margin-bottom: 12px;
}

.response-body h1 { font-size: 1.5rem; }
.response-body h2 {
    font-size: 1.3rem;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.response-body h3 { font-size: 1.1rem; }

.response-body p {
    margin-bottom: 16px;
}

.response-body ul, .response-body ol {
    margin: 12px 0;
    padding-left: 24px;
}

.response-body li {
    margin-bottom: 10px;
}

.response-body blockquote {
    border-left: 4px solid var(--gold);
    padding: 16px 24px;
    margin: 20px 0;
    background: rgba(212, 168, 67, 0.06);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--gold-light);
    line-height: 1.7;
}

.response-body strong {
    color: var(--gold-light);
    font-weight: 600;
}

.response-body code {
    background: rgba(15, 10, 26, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.response-body hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 32px 0;
    opacity: 0.4;
}

.new-question-btn {
    margin-top: 32px;
    background: transparent;
    border: 2px solid var(--gold);
    padding: 16px 28px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    color: var(--gold);
    transition: var(--transition);
    width: 100%;
    letter-spacing: 0.5px;
}

.new-question-btn:hover {
    background: rgba(212, 168, 67, 0.1);
    box-shadow: 0 0 20px rgba(212, 168, 67, 0.2);
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 36px 0;
    margin-top: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

.footer-ornament {
    color: var(--gold);
    margin-bottom: 10px;
    letter-spacing: 8px;
    opacity: 0.6;
}

.footer-tip-btn {
    margin-top: 16px;
    background: transparent;
    border: 1px solid rgba(212, 168, 67, 0.3);
    color: var(--gold-light);
    padding: 8px 20px;
    border-radius: 20px;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.footer-tip-btn:hover {
    border-color: var(--gold);
    background: rgba(212, 168, 67, 0.08);
    box-shadow: 0 0 15px rgba(212, 168, 67, 0.15);
}

/* ===== Account Bar ===== */
.account-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.free-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'Cinzel', serif;
}

.upgrade-btn-sm {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--bg-deep);
    border: none;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.upgrade-btn-sm:hover {
    box-shadow: 0 0 20px rgba(212, 168, 67, 0.4);
    transform: translateY(-1px);
}

.pro-badge {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--bg-deep);
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(212, 168, 67, 0.3);
}

/* ===== Response Actions ===== */
.response-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.tip-btn {
    background: transparent;
    border: 1px solid rgba(212, 168, 67, 0.3);
    color: var(--gold-light);
    padding: 14px 28px;
    border-radius: var(--radius);
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
}

.tip-btn:hover {
    border-color: var(--gold);
    background: rgba(212, 168, 67, 0.08);
    box-shadow: 0 0 15px rgba(212, 168, 67, 0.15);
}

/* ===== Modal Overlay ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 5, 20, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 480px;
    width: 90%;
    background: linear-gradient(160deg, var(--bg-card), var(--bg-deep));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(212, 168, 67, 0.08);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--gold-light);
}

/* ===== Paywall Modal ===== */
.paywall-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 16px;
}

.paywall-title {
    font-family: 'Cinzel', serif;
    color: var(--gold-light);
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 10px;
}

.paywall-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 28px;
    line-height: 1.6;
}

.time-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.time-plan {
    flex: 1;
    background: rgba(212, 168, 67, 0.04);
    border: 1px solid rgba(212, 168, 67, 0.15);
    border-radius: var(--radius);
    padding: 16px 10px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    color: var(--text-light);
    position: relative;
    outline: none;
}

.time-plan:hover, .time-plan.selected {
    border-color: var(--gold);
    background: rgba(212, 168, 67, 0.1);
    box-shadow: 0 0 20px rgba(212, 168, 67, 0.15);
}

.time-plan.selected {
    border-width: 2px;
}

.time-plan.featured {
    border-color: rgba(212, 168, 67, 0.35);
}

.plan-badge {
    position: absolute;
    top: -10px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--bg-deep);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.5px;
}

.plan-duration {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gold-light);
}

.plan-holy-price {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1.4rem;
    font-weight: 700;
}

.plan-detail {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
}

.plan-hours {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.8;
}

.plan-interval {
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-muted);
}

.plan-savings {
    font-size: 0.65rem;
    color: var(--gold);
    font-weight: 600;
    margin-top: 2px;
}

.time-plan.best-value {
    border-color: rgba(212, 168, 67, 0.35);
}

/* Payment toggle */
.payment-toggle {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 8px;
    background: rgba(212, 168, 67, 0.06);
    border: 1px solid rgba(212, 168, 67, 0.15);
    border-radius: 30px;
    padding: 3px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.toggle-option {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 20px;
    border: none;
    border-radius: 25px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.toggle-option.active {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--bg-deep);
}

.toggle-note {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Desktop: single row for time plans */
@media (min-width: 900px) {
    .time-plans {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
}

/* Pass badge in header */
.pass-badge {
    background: rgba(212, 168, 67, 0.12);
    border: 1px solid rgba(212, 168, 67, 0.3);
    color: var(--gold-light);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: 'Cinzel', serif;
}

.share-btn-sm {
    background: rgba(212, 168, 67, 0.08);
    border: 1px solid rgba(212, 168, 67, 0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.share-btn-sm:hover {
    border-color: var(--gold);
    background: rgba(212, 168, 67, 0.15);
    box-shadow: 0 0 10px rgba(212, 168, 67, 0.2);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.plan-features li {
    padding: 6px 0;
    color: var(--text-light);
    font-size: 0.88rem;
    position: relative;
    padding-left: 22px;
}

.plan-features li::before {
    content: "\2726";
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: 0.7rem;
    top: 8px;
}

.paywall-email-group, .tip-email-group {
    margin-bottom: 14px;
}

.paywall-email, .tip-email {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 10, 26, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-light);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    box-sizing: border-box;
}

.paywall-email:focus, .tip-email:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(212, 168, 67, 0.15);
}

.paywall-subscribe-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--bg-deep);
    border: none;
    border-radius: var(--radius);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.paywall-subscribe-btn:hover {
    box-shadow: 0 4px 25px rgba(212, 168, 67, 0.4);
    transform: translateY(-1px);
}

.paywall-reset-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 16px;
}

/* ===== Tip / Donation Modal ===== */
.tip-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 16px;
}

.tip-title {
    font-family: 'Cinzel', serif;
    color: var(--gold-light);
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 10px;
}

.tip-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 0.88rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.tip-amounts {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tip-amount {
    padding: 10px 20px;
    background: rgba(15, 10, 26, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-light);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 60px;
}

.tip-amount:hover {
    border-color: var(--gold);
    color: var(--gold-light);
}

.tip-amount.active {
    border-color: var(--gold);
    background: rgba(212, 168, 67, 0.12);
    color: var(--gold-light);
    box-shadow: 0 0 12px rgba(212, 168, 67, 0.15);
}

.tip-donate-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--bg-deep);
    border: none;
    border-radius: var(--radius);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.tip-donate-btn:hover {
    box-shadow: 0 4px 25px rgba(212, 168, 67, 0.4);
    transform: translateY(-1px);
}

.tip-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 14px;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Error Toast ===== */
.error-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #8B1A1A, #B22222);
    color: #fff;
    padding: 16px 32px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    border: 1px solid rgba(255, 100, 100, 0.3);
}

/* ===== Share / Donate Modals ===== */
.share-icon, .donate-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 16px;
}

.share-title, .donate-title {
    font-family: 'Cinzel', serif;
    color: var(--gold-light);
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 10px;
}

.share-subtitle, .donate-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 0.88rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.share-email, .share-hours-input, .donate-hours-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 10, 26, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-light);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    box-sizing: border-box;
    margin-bottom: 12px;
}

.share-email:focus, .share-hours-input:focus, .donate-hours-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(212, 168, 67, 0.15);
}

.share-hours-group label, .donate-hours-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.share-submit-btn, .donate-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--bg-deep);
    border: none;
    border-radius: var(--radius);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.share-submit-btn:hover, .donate-submit-btn:hover {
    box-shadow: 0 4px 25px rgba(212, 168, 67, 0.4);
    transform: translateY(-1px);
}

.community-pool-info {
    text-align: center;
    background: rgba(212, 168, 67, 0.06);
    border: 1px solid rgba(212, 168, 67, 0.15);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 20px;
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
}

@media (max-width: 640px) {
    .logo h1 {
        font-size: 2rem;
    }

    .religion-card {
        padding: 20px 12px;
    }

    .question-box, .response-section {
        padding: 24px;
    }

    .loading-content {
        padding: 24px;
    }

    .header {
        padding: 36px 0 24px;
    }

    .patience-verse {
        padding: 16px 18px;
    }

    .response-title-row h2 {
        font-size: 1.3rem;
    }

    .tts-btn {
        width: 36px;
        height: 36px;
    }

    .tip-amounts {
        gap: 6px;
    }

    .tip-amount {
        padding: 8px 14px;
        font-size: 0.9rem;
        min-width: 50px;
    }



    .account-bar {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 380px) {
    .religion-cards.grid-layout {
        gap: 8px;
    }
}
