/* ==========================================================================
   BIBLEQUIZ 3D - VIBRANT 3D CLAYMORPHISM / GLASSMORPHISM UI STYLESHEET
   Mobile-First, High-Speed, SEO & AdSense Optimized
   ========================================================================== */
:root {
    --bg-deep: #0f1026;
    --bg-aurora: radial-gradient(circle at 15% 15%, #2a1b6e 0%, #11153a 45%, #0b0d24 100%);
    --card-bg: rgba(30, 35, 78, 0.82);
    --card-border: rgba(255, 255, 255, 0.16);
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --gold-accent: #fbbf24;
    --blue-3d: linear-gradient(145deg, #3b82f6, #1d4ed8);
    --teal-3d: linear-gradient(145deg, #14b8a6, #0f766e);
    --purple-3d: linear-gradient(145deg, #a855f7, #6b21a8);
    --orange-3d: linear-gradient(145deg, #f97316, #c2410c);
    --emerald-3d: linear-gradient(145deg, #10b981, #047857);
    --amber-3d: linear-gradient(145deg, #f59e0b, #b45309);
    --rose-3d: linear-gradient(145deg, #f43f5e, #be123c);
    --indigo-3d: linear-gradient(145deg, #6366f1, #3730a3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background: var(--bg-aurora);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.65;
    min-height: 100vh;
    padding-bottom: 80px;
}
a { color: #60a5fa; text-decoration: none; transition: all 0.2s ease; }
a:hover { color: var(--gold-accent); }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 18px;
}

/* 3D Card & Tactile Button System */
.card-3d {
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    border: 1.5px solid var(--card-border);
    border-radius: 22px;
    padding: 24px;
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.45),
        inset 0 2px 3px rgba(255, 255, 255, 0.22),
        inset 0 -4px 8px rgba(0, 0, 0, 0.35);
}

.btn-3d {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    font-weight: 700;
    font-size: 0.96rem;
    color: #fff;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    background: var(--blue-3d);
    box-shadow:
        0 6px 0 #1e3a8a,
        0 10px 20px rgba(0, 0, 0, 0.35),
        inset 0 2px 2px rgba(255, 255, 255, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    text-decoration: none;
}
.btn-3d:hover {
    transform: translateY(-2px);
    color: #fff;
}
.btn-3d:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #1e3a8a, 0 4px 10px rgba(0, 0, 0, 0.3);
}
.btn-3d-gold {
    background: linear-gradient(145deg, #fbbf24, #d97706);
    color: #1e1b4b;
    box-shadow: 0 6px 0 #92400e, 0 10px 20px rgba(0, 0, 0, 0.35), inset 0 2px 2px rgba(255, 255, 255, 0.5);
}
.btn-3d-emerald {
    background: var(--emerald-3d);
    box-shadow: 0 6px 0 #065f46, 0 10px 20px rgba(0, 0, 0, 0.35), inset 0 2px 2px rgba(255, 255, 255, 0.35);
}
.btn-3d-purple {
    background: var(--purple-3d);
    box-shadow: 0 6px 0 #4c1d95, 0 10px 20px rgba(0, 0, 0, 0.35), inset 0 2px 2px rgba(255, 255, 255, 0.35);
}

/* Top Navbar */
.navbar-3d {
    margin: 16px auto;
    padding: 14px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 3px 10px rgba(59, 130, 246, 0.6);
}
.brand-logo .logo-icon {
    font-size: 2rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
}
.brand-logo span { color: var(--gold-accent); }
.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.nav-links a {
    color: #e2e8f0;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.nav-links a:hover, .nav-links a.active {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}
.search-form {
    display: flex;
    gap: 8px;
}
.search-input {
    background: rgba(15, 23, 42, 0.75);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 9px 16px;
    border-radius: 12px;
    min-width: 210px;
}

/* 3D Hero Banner */
.hero-3d {
    background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 55%, #4c1d95 100%);
    border-radius: 26px;
    padding: 36px 32px;
    margin: 20px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 28px;
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.5),
        inset 0 3px 6px rgba(255, 255, 255, 0.35),
        inset 0 -6px 12px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.24);
}
.hero-3d h1 {
    font-size: 2.3rem;
    line-height: 1.2;
    margin-bottom: 12px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.hero-3d h1 span { color: var(--gold-accent); }
.hero-3d p {
    font-size: 1.08rem;
    color: #e0e7ff;
    margin-bottom: 20px;
}
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.hero-trophy {
    font-size: 5.5rem;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.45));
    user-select: none;
}

/* Main 2-Column Layout with Right Sidebar */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 26px;
    margin-top: 24px;
    align-items: start;
}
@media (max-width: 992px) {
    .layout-grid { grid-template-columns: 1fr; }
    .hero-3d { grid-template-columns: 1fr; text-align: center; }
    .hero-badges { justify-content: center; }
}

/* 3D Category Cards (Law, History, Poetry, Prophets, Gospels, Epistles) */
.category-grid-3d {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 16px;
    margin: 18px 0 28px;
}
.cat-card-3d {
    padding: 18px;
    border-radius: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow:
        0 8px 0 rgba(0,0,0,0.35),
        0 14px 24px rgba(0,0,0,0.35),
        inset 0 2px 3px rgba(255,255,255,0.35);
    transition: transform 0.15s ease;
    border: 1.5px solid rgba(255,255,255,0.25);
}
.cat-card-3d:hover { transform: translateY(-4px); color: #fff; }
.cat-card-3d .cat-icon { font-size: 2.3rem; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); }
.cat-card-3d h3 { font-size: 1.1rem; font-weight: 800; }
.cat-card-3d small { font-size: 0.8rem; opacity: 0.9; display: block; }

/* Color Themes for 3D Book & Category Cards */
.theme-orange { background: var(--orange-3d); }
.theme-teal   { background: var(--teal-3d); }
.theme-purple { background: var(--purple-3d); }
.theme-blue   { background: var(--blue-3d); }
.theme-amber  { background: var(--amber-3d); }
.theme-emerald{ background: var(--emerald-3d); }
.theme-rose   { background: var(--rose-3d); }
.theme-indigo { background: var(--indigo-3d); }

/* 3D Book Cards Grid */
.books-grid-3d {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
    gap: 20px;
    margin-top: 18px;
}
.book-card-3d {
    border-radius: 22px;
    padding: 20px;
    color: #fff;
    position: relative;
    box-shadow:
        0 8px 0 rgba(0, 0, 0, 0.38),
        0 16px 28px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.38);
    border: 1.5px solid rgba(255, 255, 255, 0.26);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.16s ease;
}
.book-card-3d:hover { transform: translateY(-4px); }
.book-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.book-icon-3d {
    font-size: 2.4rem;
    background: rgba(255, 255, 255, 0.18);
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 3px rgba(255,255,255,0.4), 0 4px 10px rgba(0,0,0,0.25);
}
.chapter-count-badge {
    background: rgba(15, 23, 42, 0.55);
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.25);
}
.book-card-title {
    font-size: 1.32rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: #fff;
}
.book-card-desc {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.92);
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.chapter-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.chapter-pill {
    background: rgba(15, 23, 42, 0.45);
    color: #fff;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.28);
    box-shadow: 0 3px 0 rgba(0,0,0,0.3);
    transition: all 0.12s ease;
}
.chapter-pill:hover {
    background: var(--gold-accent);
    color: #1e1b4b;
    transform: translateY(-2px);
}
.chapter-pill-all {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Breadcrumbs */
.breadcrumbs-3d {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.9rem;
    padding: 12px 18px;
    margin-bottom: 18px;
    background: rgba(15, 23, 42, 0.65);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
}
.breadcrumbs-3d span.sep { color: #64748b; }

/* Single-Page Vertically Stacked 3D Question Cards */
.question-card-3d {
    background: linear-gradient(145deg, rgba(40, 48, 105, 0.9), rgba(24, 29, 68, 0.92));
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 22px;
    padding: 24px;
    margin-bottom: 22px;
    box-shadow:
        0 12px 26px rgba(0,0,0,0.42),
        inset 0 2px 3px rgba(255,255,255,0.22);
}
.q-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.q-number-badge {
    background: var(--gold-accent);
    color: #1e1b4b;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
}
.q-verse-badge {
    background: rgba(59, 130, 246, 0.25);
    border: 1px solid rgba(96, 165, 250, 0.45);
    color: #93c5fd;
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
}
.q-title {
    font-size: 1.22rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: #fff;
}
.options-grid-3d {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
@media (max-width: 640px) {
    .options-grid-3d { grid-template-columns: 1fr; }
}
.option-btn-3d {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 13px 16px;
    border-radius: 15px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    transition: transform 0.12s ease, filter 0.12s ease;
}
.option-btn-3d:hover { transform: translateY(-2px); filter: brightness(1.08); }
.option-btn-3d.opt-a { background: var(--blue-3d); box-shadow: 0 5px 0 #1e3a8a; }
.option-btn-3d.opt-b { background: var(--emerald-3d); box-shadow: 0 5px 0 #065f46; }
.option-btn-3d.opt-c { background: var(--amber-3d); box-shadow: 0 5px 0 #78350f; }
.option-btn-3d.opt-d { background: var(--rose-3d); box-shadow: 0 5px 0 #881337; }

.option-btn-3d .opt-letter {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex-shrink: 0;
}
.option-btn-3d.selected-correct {
    outline: 3px solid #4ade80;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.6);
}
.option-btn-3d.selected-wrong {
    outline: 3px solid #f87171;
    opacity: 0.75;
}

.explanation-box-3d {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(52, 211, 153, 0.45);
    color: #ecfdf5;
    display: none;
}
.explanation-box-3d.visible { display: block; }
.toggle-exp-btn {
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 7px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}
.toggle-exp-btn:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }

/* Sidebar Quick Chapter Grid */
.sidebar-chapter-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
    margin-top: 12px;
}
.sidebar-ch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.22);
    border: 1px solid rgba(96, 165, 250, 0.35);
    color: #fff;
    font-weight: 700;
    font-size: 0.86rem;
}
.sidebar-ch-btn:hover, .sidebar-ch-btn.active {
    background: var(--gold-accent);
    color: #1e1b4b;
}

/* Ad Slot Containers */
.ad-slot-wrapper {
    margin: 20px 0;
    text-align: center;
}
.ad-demo-banner {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.95));
    border: 1.5px dashed rgba(148, 163, 184, 0.45);
    border-radius: 16px;
    padding: 16px;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.ad-demo-banner span {
    font-size: 0.68rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold-accent);
    background: rgba(251, 191, 36, 0.15);
    padding: 2px 8px;
    border-radius: 6px;
}
.ad-demo-banner.ad-300 { min-height: 250px; }
.ad-demo-banner.ad-300-tall { min-height: 420px; }
.ad-demo-banner.ad-infeed { min-height: 110px; border-color: rgba(56, 189, 248, 0.5); }
.ad-slot-footer_sticky_ad {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    margin: 0;
    padding: 6px 12px;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255,255,255,0.15);
}

/* Click-Triggered Interstitial Ad Modal */
.bq-click-ad-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.bq-click-ad-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 22, 0.85);
    backdrop-filter: blur(8px);
}
.bq-click-ad-dialog {
    position: relative;
    z-index: 2;
    max-width: 560px;
    width: 100%;
    border: 2px solid var(--gold-accent);
    animation: popIn 0.2s ease-out;
}
@keyframes popIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.bq-click-ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.bq-ad-badge {
    background: var(--gold-accent);
    color: #1e1b4b;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
}
.bq-ad-close-btn {
    background: #ef4444;
    color: #fff;
    border: none;
    padding: 7px 14px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}
.bq-ad-close-btn:disabled {
    background: #475569;
    cursor: not-allowed;
}
.ad-mock-cta {
    display: inline-block;
    margin-top: 12px;
    background: var(--gold-accent);
    color: #1e1b4b;
    font-weight: 800;
    padding: 8px 18px;
    border-radius: 10px;
}

/* Footer */
.footer-3d {
    margin-top: 50px;
    padding: 36px 24px;
    border-top: 1px solid rgba(255,255,255,0.15);
    background: rgba(10, 12, 30, 0.9);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}
.footer-grid h4 { color: var(--gold-accent); margin-bottom: 12px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
