/* ===== Bible Quiz AI — game theme for the home page ===== */
:root {
  --g-bg1: #040817; --g-bg2: #071233; --g-bg3: #0b1a4a;
  --g-gold: #fbbf24; --g-gold2: #f59e0b; --g-sky: #38bdf8; --g-blue: #2563eb; --g-mint: #34d399;
  --g-ink: #f8fafc; --g-muted: rgba(226, 232, 240, .72);
  --g-glass: rgba(10, 22, 60, .55); --g-line: rgba(56, 189, 248, .22);
  --glow-blue: 0 0 12px rgba(56, 189, 248, .55), 0 0 32px rgba(37, 99, 235, .35);
  --glow-gold: 0 0 12px rgba(251, 191, 36, .6), 0 0 32px rgba(245, 158, 11, .35);
}
body.game {
  margin: 0; min-height: 100vh; color: var(--g-ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(37, 99, 235, .45) 0%, transparent 60%),
    radial-gradient(700px 400px at 100% 100%, rgba(251, 191, 36, .12) 0%, transparent 60%),
    linear-gradient(180deg, var(--g-bg1) 0%, var(--g-bg2) 55%, var(--g-bg3) 100%);
  background-color: var(--g-bg2); background-repeat: no-repeat;
}
html { background: #0b1a4a; }
/* hex grid + circuit sparks, like the logo backdrop */
body.game::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; opacity: .55;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='112' height='194' viewBox='0 0 112 194'><g fill='none' stroke='%2338bdf8' stroke-opacity='.16' stroke-width='1.2'><path d='M56 2 108 32v60L56 122 4 92V32z'/><path d='M56 98 108 128v60L56 218 4 188v-60z'/><path d='M0-30 52 0v60L0 90-52 60V0z'/><path d='M112-30 164 0v60l-52 30L60 60V0z'/><path d='M0 66 52 96v60L0 186l-52-30V96z'/><path d='M112 66l52 30v60l-52 30-52-30V96z'/></g></svg>");
  background-size: 112px 194px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.35) 60%, rgba(0,0,0,.6));
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.35) 60%, rgba(0,0,0,.6));
}
body.game::after { /* drifting sparks */
  content: ''; position: fixed; inset: 0; pointer-events: none; opacity: .7;
  background-image: radial-gradient(1.5px 1.5px at 20px 30px, #7dd3fc 50%, transparent 51%), radial-gradient(1px 1px at 140px 90px, #fde68a 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 240px 40px, #7dd3fc 50%, transparent 51%), radial-gradient(1px 1px at 320px 170px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 90px 220px, #fde68a 50%, transparent 51%), radial-gradient(1.5px 1.5px at 280px 260px, #7dd3fc 50%, transparent 51%);
  background-size: 360px 300px; animation: drift 60s linear infinite;
}
@keyframes drift { from { background-position: 0 0; } to { background-position: 360px -300px; } }
.g-wrap { position: relative; max-width: 1080px; margin: 0 auto; padding: 0 1.25rem 3rem; }

/* top bar */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 0; gap: 1rem; flex-wrap: wrap; }
.brand { font-weight: 900; font-size: 1.35rem; color: #fff; text-decoration: none; letter-spacing: -.01em; }
.brand span { color: var(--g-gold); text-shadow: var(--glow-gold); }
.brand em { font-style: normal; color: var(--g-sky); text-shadow: var(--glow-blue); }
.topbar .links { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* buttons */
.btn-gold, .btn-ghost, .btn-sky {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 999px;
  padding: .8rem 1.5rem; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; line-height: 1.1;
}
.btn-gold { background: linear-gradient(180deg, #fde047, var(--g-gold2)); color: #1f1300; box-shadow: 0 0 0 2px rgba(251, 191, 36, .35), var(--glow-gold); }
.btn-gold:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 0 0 2px rgba(251, 191, 36, .6), 0 0 18px rgba(251, 191, 36, .8), 0 0 48px rgba(245, 158, 11, .5); color: #1f1300; }
.btn-sky { background: linear-gradient(180deg, #7dd3fc, #0284c7); color: #06202e; box-shadow: 0 0 0 2px rgba(56, 189, 248, .35), var(--glow-blue); }
.btn-sky:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 0 0 2px rgba(56, 189, 248, .6), 0 0 18px rgba(56, 189, 248, .8), 0 0 48px rgba(37, 99, 235, .5); color: #06202e; }
.btn-ghost { background: rgba(10, 22, 60, .5); color: #fff; border-color: rgba(56, 189, 248, .45); box-shadow: 0 0 10px rgba(56, 189, 248, .15); }
.btn-ghost:hover { background: rgba(56, 189, 248, .15); color: #fff; box-shadow: var(--glow-blue); }
.btn-sm { padding: .5rem 1rem; font-size: .9rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }

/* hero */
.hero { text-align: center; padding: 2.5rem 0 1.5rem; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 900; margin: 0 0 .5rem; letter-spacing: -.02em; }
.hero h1 .glow { color: var(--g-gold); text-shadow: var(--glow-gold); }
.hero-logo { width: min(820px, 100%); height: auto; display: block; margin: -1rem auto 0; animation: logo-in 1s cubic-bezier(.22, 1.2, .36, 1) both;
  -webkit-mask-image: radial-gradient(ellipse 62% 70% at 50% 50%, #000 45%, transparent 78%); mask-image: radial-gradient(ellipse 62% 70% at 50% 50%, #000 45%, transparent 78%); }
@keyframes logo-in { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.hero .tag { font-size: 1.2rem; color: var(--g-muted); margin: 0 auto 1.5rem; max-width: 560px; }
.hero .actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: .4rem; background: rgba(10, 22, 60, .6); border: 1px solid var(--g-line); border-radius: 999px; padding: .3rem .8rem; font-weight: 600; font-size: .9rem; }

/* scoreboard */
.scoreboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; margin: 0 0 2rem; }
.tile { background: var(--g-glass); border: 1px solid var(--g-line); border-radius: 1rem; padding: 1rem .75rem; text-align: center; backdrop-filter: blur(6px); box-shadow: 0 0 24px rgba(37, 99, 235, .15); }
.tile .n { font-size: 1.9rem; font-weight: 900; line-height: 1; color: #fff; }
.tile .n small { font-size: .9rem; color: var(--g-muted); font-weight: 600; }
.tile .l { font-size: .8rem; color: var(--g-muted); margin-top: .35rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.tile.gold .n { color: var(--g-gold); text-shadow: var(--glow-gold); } .tile.sky .n { color: var(--g-sky); text-shadow: var(--glow-blue); } .tile.mint .n { color: var(--g-mint); text-shadow: 0 0 12px rgba(52, 211, 153, .6); }

/* mode cards */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: .5rem; }
.mode-card {
  position: relative; background: var(--g-glass); border: 1px solid var(--g-line); border-radius: 1.5rem; padding: 1.5rem;
  display: grid; grid-template-columns: 1fr; gap: 1rem; backdrop-filter: blur(8px); overflow: hidden;
}
.mode-card::before { content: ''; position: absolute; inset: -40% -40% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%; filter: blur(50px); opacity: .28; pointer-events: none; }
.mode-card.trivia { border-color: rgba(56, 189, 248, .45); box-shadow: 0 0 0 1px rgba(56, 189, 248, .15), 0 0 40px rgba(37, 99, 235, .25); }
.mode-card.journey { border-color: rgba(251, 191, 36, .45); box-shadow: 0 0 0 1px rgba(251, 191, 36, .15), 0 0 40px rgba(245, 158, 11, .2); }
.mode-card:hover { transform: translateY(-3px); }
.mode-card { transition: transform .2s ease; }
.trivia .mode-title { color: var(--g-sky); text-shadow: var(--glow-blue); }
.journey .mode-title { color: var(--g-gold); text-shadow: var(--glow-gold); }
.mode-card.trivia::before { background: var(--g-sky); } .mode-card.journey::before { background: var(--g-gold); }
.mode-head { display: flex; align-items: center; gap: .75rem; }
.mode-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; }
.trivia .mode-icon { background: rgba(56, 189, 248, .15); box-shadow: inset 0 0 0 1.5px rgba(56, 189, 248, .6), var(--glow-blue); }
.journey .mode-icon { background: rgba(251, 191, 36, .15); box-shadow: inset 0 0 0 1.5px rgba(251, 191, 36, .6), var(--glow-gold); }
.mode-title { font-size: 1.5rem; font-weight: 900; margin: 0; }
.mode-sub { color: var(--g-muted); font-size: .95rem; margin: 0; }
.mode-desc { color: var(--g-muted); margin: 0; line-height: 1.5; }
.mode-cta { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.mode-card ul.perks { margin: 0; padding: 0; list-style: none; display: grid; gap: .35rem; color: var(--g-muted); font-size: .95rem; }
.mode-card ul.perks li::before { content: '✦ '; color: var(--g-gold); }
.trivia ul.perks li::before { color: var(--g-sky); }
.diff-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.diff-row a { flex: 1; text-align: center; }

/* ===== demo phone ===== */
.demo { display: grid; justify-items: center; gap: .6rem; }
.phone {
  width: 250px; height: 440px; border-radius: 36px; background: #0f172a; border: 8px solid #1f2937;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(56, 189, 248, .35), 0 0 40px rgba(37, 99, 235, .35); position: relative; overflow: hidden;
}
.phone::after { content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 90px; height: 18px; background: #1f2937; border-radius: 0 0 12px 12px; z-index: 5; }
.screen { position: absolute; inset: 0; background: linear-gradient(160deg, #eef2ff, #f8fafc); }
.frame { position: absolute; inset: 0; padding: 38px 14px 14px; opacity: 0; transition: opacity .45s ease; display: flex; flex-direction: column; gap: 8px; }
.frame.active { opacity: 1; }
.demo-dots { display: flex; gap: 6px; }
.demo-dots button { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .3); padding: 0; cursor: pointer; }
.demo-dots button.active { background: var(--g-gold); width: 20px; border-radius: 4px; box-shadow: var(--glow-gold); }
.demo-caption { color: var(--g-muted); font-size: .85rem; font-weight: 600; min-height: 1.2em; }

/* mini UI inside the phone */
.m-bar { background: #4a5568; color: #fff; font-size: 10px; font-weight: 700; padding: 7px 10px; border-radius: 10px; display: flex; justify-content: space-between; }
.m-bar.gold { background: linear-gradient(90deg, #4553b8, #7c3aed); }
.m-h { font-weight: 900; color: #1e293b; font-size: 15px; margin: 4px 0 0; }
.m-p { color: #64748b; font-size: 11px; margin: 0; }
.m-card { background: #fff; border-radius: 12px; padding: 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, .08); }
.m-input { border: 1.5px solid #cbd5e1; border-radius: 8px; padding: 7px 8px; font-size: 11px; color: #1e293b; background: #fff; height: 30px; display: flex; align-items: center; overflow: hidden; }
.m-input .typed { display: inline-block; white-space: nowrap; overflow: hidden; width: 0; border-right: 2px solid #4553b8; }
.frame.active .m-input .typed { animation: typing 1.2s steps(16) .4s forwards; }
.frame.active .m-input.pw .typed { animation-delay: 1.5s; animation-duration: .8s; }
.m-btn { background: #38a169; color: #fff; font-weight: 800; font-size: 12px; border-radius: 8px; padding: 9px; text-align: center; margin-top: 4px; }
.m-btn.blue { background: #4553b8; }
.frame.active .m-btn.press { animation: press .4s ease 2.5s both; }
.m-q { font-weight: 800; color: #1e293b; font-size: 12.5px; line-height: 1.35; margin: 2px 0 4px; }
.m-opt { border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 7px 9px; font-size: 11.5px; color: #334155; background: #fff; display: flex; gap: 6px; align-items: center; }
.m-opt .dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #94a3b8; flex-shrink: 0; }
.frame.active .m-opt.pick { animation: pickOpt 2.2s ease .9s forwards; }
.frame.active .m-opt.pick .dot { animation: pickDot 2.2s ease .9s forwards; }
.m-star { font-size: 84px; text-align: center; margin: 22px 0 0; filter: drop-shadow(0 0 18px rgba(255, 200, 0, .9)); }
.frame.active .m-star { animation: starPop 1s cubic-bezier(.22, 1.2, .36, 1) .2s both; }
.m-pts { text-align: center; font-weight: 900; color: #38a169; font-size: 22px; }
.frame.active .m-pts { animation: rise .8s ease .8s both; }
.m-combo { text-align: center; color: #d97706; font-weight: 800; font-size: 12px; }
.m-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.m-tile { background: #fff; border-radius: 10px; padding: 8px; text-align: center; box-shadow: 0 3px 10px rgba(0, 0, 0, .06); }
.m-tile b { display: block; font-size: 18px; color: #4553b8; }
.m-tile span { font-size: 9px; color: #64748b; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.m-bars { display: grid; gap: 6px; margin-top: 4px; }
.m-bars div { display: grid; grid-template-columns: 44px 1fr 28px; align-items: center; gap: 6px; font-size: 10px; color: #475569; font-weight: 700; }
.m-bars i { display: block; height: 9px; border-radius: 5px; background: #e2e8f0; overflow: hidden; }
.m-bars i::after { content: ''; display: block; height: 100%; width: 0; border-radius: 5px; background: var(--w, #38a169); }
.frame.active .m-bars i::after { animation: grow 1s ease .3s forwards; }
.m-gates { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; padding: 6px 4px; }
.m-gate { width: 58px; text-align: center; font-size: 9px; font-weight: 800; color: #334155; position: relative; }
.m-gate .art { width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 3px; background: #e0e7ff; overflow: hidden; border: 2.5px solid #e2e8f0; display: grid; place-items: center; font-size: 20px; }
.m-gate .art img { width: 100%; height: 100%; object-fit: cover; }
.m-gate.done .art { border-color: #10b981; } .m-gate.lock { opacity: .45; filter: grayscale(.6); }
.m-gate.open .art { border-color: #667eea; }
.frame.active .m-gate.open .art { animation: ring 1.6s ease-out infinite; }
.m-gate .flag { position: absolute; top: -4px; right: 2px; font-size: 11px; }
.m-big { width: 110px; height: 110px; border-radius: 50%; margin: 6px auto 4px; overflow: hidden; box-shadow: 0 10px 24px rgba(0, 0, 0, .2); }
.m-big img { width: 100%; height: 100%; object-fit: cover; }
.frame.active .m-big { animation: pop .6s cubic-bezier(.22, 1.2, .36, 1) both; }
.m-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.m-tier { border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 6px 2px; text-align: center; font-size: 10px; font-weight: 800; color: #64748b; background: #fff; }
.m-tier.easy { color: #059669; } .m-tier.med { color: #d97706; } .m-tier.hard { color: #dc2626; }
.frame.active .m-tier.sel { animation: selTier .5s ease 1s forwards; }
.m-cleared { text-align: center; font-weight: 900; color: #1e293b; font-size: 17px; }
.m-score { text-align: center; font-size: 26px; font-weight: 900; color: #4553b8; line-height: 1; }
.m-score small { font-size: 12px; color: #94a3b8; }
.m-conf { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.m-conf i { position: absolute; top: -10px; width: 6px; height: 10px; border-radius: 2px; opacity: 0; }
.frame.active .m-conf i { animation: fall 2.4s linear var(--d, 0s) infinite; }

@keyframes typing { from { width: 0; } to { width: 100%; } }
@keyframes press { 0%, 100% { transform: scale(1); } 50% { transform: scale(.95); background: #2f855a; } }
@keyframes pickOpt { 0% { } 30% { background: #e6fffa; border-color: #38a169; color: #2f855a; } 60% { background: #d1fae5; border-color: #10b981; } 100% { background: #d1fae5; border-color: #10b981; color: #065f46; font-weight: 800; } }
@keyframes pickDot { 30% { background: #38a169; border-color: #38a169; } 100% { background: #10b981; border-color: #10b981; } }
@keyframes starPop { 0% { transform: scale(.2) rotate(-40deg); opacity: 0; } 60% { transform: scale(1.25) rotate(8deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes grow { to { width: var(--w-pct, 80%); } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, .6); } 100% { box-shadow: 0 0 0 12px rgba(102, 126, 234, 0); } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes selTier { to { border-color: #667eea; background: #f0f4ff; box-shadow: 0 0 0 3px rgba(102, 126, 234, .25); } }
@keyframes fall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(460px) rotate(540deg); opacity: 0; } }

.g-foot { margin-top: 2.5rem; text-align: center; color: var(--g-muted); font-size: .9rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.g-foot a { color: var(--g-muted); }

/* modal on dark page */
body.game .modal-content { border-radius: 1.25rem; }

@media (max-width: 820px) { .modes { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .frame, .frame * { animation: none !important; transition: none !important; } }
