/* =============================== GLOBAL VARIABLES ================================ */ :root { --green-main: #166534; --green-cta: #16a34a; --bg-main: #f7f9fb; --text-main: #111827; --text-muted: #475569; --border-soft: #e5e7eb; --shadow-soft: 0 10px 25px rgba(0,0,0,.08); }

.challenge-text {
  margin-top: 14px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #dc2626;
  text-align: center;
}
.cta-main {
  display: inline-block;
  margin: 14px 0 6px;
  padding: 14px 26px;
  background: #166534;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(22,101,52,.35);
}

.cta-main:active {
  transform: scale(0.97);
}
/* =============================== BASE STYLES ================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}


body { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg-main); color: var(--text-main); margin: 0; padding: 0; }

h1 { text-align: center; color: var(--green-main); font-size: 28px; font-weight: 800; margin-bottom: 8px; }

h3 { color: var(--green-main); }

p { margin: 0; }

/* =============================== AD OVERLAY ================================ */
.ad-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
}

.ad-box{
  background: #fff;
  padding: 22px 28px;
  border-radius: 12px;
  text-align: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.score-box {
  background: #f0fdf4;
  padding: 10px 16px;
  border-radius: 999px;
  display: inline-block;
}
.card {
  text-align: center;
}

.score-box span {
  color: #16a34a;
  font-weight: 800;
}
.share-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  margin-left: auto;
  margin-right: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}
.share-page {
  background: linear-gradient(180deg, #f0fdf4, #ffffff);
  min-height: 100vh;
}
.small-muted {
  margin-top: 8px;
  font-size: 0.95rem;
  color: #475569;
}
/* =============================== HEADER ================================ */ .site-header { position: sticky; top: 0; z-index: 1000; padding: 12px 18px; background: rgba(255,255,255,.85); border-bottom: 1px solid var(--border-soft); backdrop-filter: blur(8px); transition: background .25s ease, box-shadow .25s ease; }

.site-header.scrolled { background: rgba(255,255,255,.95); box-shadow: 0 6px 18px rgba(0,0,0,.08); }

.header-inner { max-width: 900px; margin: auto; display: flex; align-items: center; justify-content: space-between; }

.header-text h2 { margin: 0; font-size: 22px; font-weight: 700; color: var(--green-main); }

.header-text span { font-size: 14px; color: var(--text-muted); }

.header-logo img {
  max-height: 48px;    width: auto;  height: auto; border-radius: 10px; object-fit: contain;
}
@media (max-width: 480px) { .header-text h2 { font-size: 20px; } .header-text span { font-size: 13px; } }

/* =============================== LAYOUT ================================ */ .container { max-width: 720px; margin: 16px auto; background: #fff; padding: 16px; border-radius: 14px; box-shadow: var(--shadow-soft); }

@media (max-width: 480px) { .container { margin: 14px auto; padding: 16px; } }

.center-text { text-align: center; } .small-muted { font-size: 14px; color: var(--text-muted); }

/* =============================== INTRO / DESCRIPTIONS ================================ */ .intro-section { text-align: center; padding: 10px 0; }

.intro-title { font-size: 20px; font-weight: 700; color: var(--green-main); margin-bottom: 6px; }

.intro-desc, .page-desc { font-size: 15px; line-height: 1.55; color: var(--text-muted); max-width: 620px; margin: 4px auto 10px; text-align:center;}

/* =============================== COUNTER ================================ */ #counter { background: #f0fdf4; color: var(--green-main); padding: 6px 14px; border-radius: 999px; display: block; width: max-content; margin: 6px auto; text-align: center; font-weight: 700;
}
#scoreText {
  display: block;width: max-content; margin: 8px auto 10px; background: #f1f5f9; color: #334155; padding: 6px 14px;border-radius: 999px;font-weight: 600; font-size: 14px; text-align: center; opacity: 0.85;
}
/* ===============================
   PROVERB / QUESTION CARD
================================ */
#proverbText {
  /* Layout & visibility */
  text-align: center; margin: 16px auto 14px;
  max-width: 100%;letter-spacing: 0.2px;
   font-size: 20px; font-weight: 700;line-height: 1.5;color: var(--text-main);background: #f8fafc; padding: 16px 14px; border-radius: 14px; border: 1px solid var(--border-soft); box-shadow: var(--shadow-soft);
 animation: questionFade .35s ease both;
border-left: 4px solid var(--green-main);
  
}


/* ===============================
   QUESTION ANIMATION
================================ */
@keyframes questionFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===============================
   ACCESSIBILITY
================================ */
@media (prefers-reduced-motion: reduce) {
  #proverbText {
    animation: none;
  }
}
/* =============================== BUTTONS ================================ */ button { width: 100%; padding: 11px; margin-top: 6px; font-size: 16px; border-radius: 8px; border: none; cursor: pointer; touch-action: manipulation; }

button:focus-visible, a:focus-visible { outline: 3px solid rgba(22,101,52,.4); outline-offset: 2px; }

#optionsBox button {
  background: #f1f5f9;
  border: 1px solid var(--border-soft);
  transition: background .2s ease, transform .15s ease, box-shadow .15s ease; will-change: transform;
}

#optionsBox button:hover { background: #dcfce7; transform: scale(1.01); }

#optionsBox button:active {
  transform: scale(0.98);
}

.next-btn { background: var(--green-cta); color: #fff; } .retry-btn { background: #0ea5e9; color: #fff; }

.next-btn:disabled { opacity: .5; cursor: not-allowed; }

/* =============================== SHARE BUTTONS ================================ */ .share-btn { display: block; padding: 12px; margin: 6px 0; border-radius: 8px; color: #fff; text-decoration: none; font-weight: 700; text-align: center; position: relative; overflow: hidden; transition: transform .2s ease, box-shadow .3s ease; }

.share-btn:hover { transform: translateY(-1px); }

.wa { background: #25D366; } .fb { background: #1877F2; } .tw { background: #111; }

/* GLOW PRESETS */ .share-btn.wa { box-shadow: 0 0 10px rgba(37,211,102,.6), 0 0 20px rgba(37,211,102,.4); }

.share-btn.fb { box-shadow: 0 0 8px rgba(24,119,242,.6), 0 0 18px rgba(24,119,242,.3); }

.share-btn.tw { box-shadow: 0 0 8px rgba(255,255,255,.25), 0 0 16px rgba(255,255,255,.15); }

/* =============================== RETRY BUTTON (SOFT) ================================ */ .retry-soft { background: #f1f5f9; color: #334155; border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all .2s ease; }

.retry-soft:hover { background: #e2e8f0; } .retry-soft:active { transform: scale(.98); }

.retry-desc { font-size: 13px; color: var(--text-muted); margin: 6px 0 4px; text-align: center; }

/* =============================== MODAL ================================ */
 .result-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,.6);
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
}

.result-modal.modal-show {
  opacity: 1;
  pointer-events: auto;
}

.result-box {
  background: #fff;
  width: 92%;
  max-width: 420px;

  max-height: 85vh;     /* KEY FIX */
  overflow-y: auto;     /* KEY FIX */
  -webkit-overflow-scrolling: touch;

  padding: 20px;
  border-radius: 16px;
  text-align: center;
}
.result-score { font-size: 18px; font-weight: 700; color: var(--green-main); }

.share-hint { font-size: 13px; color: var(--text-muted); }

body.modal-open {
  overflow: hidden;
  touch-action: none;
}
/* =============================== TOAST ================================ */ .toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--green-main); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 10000; }

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

/* =============================== UTILITIES ================================ */ .hidden { display: none; } .flex-center { display: flex; align-items: center; justify-content: center; } .mt-sm { margin-top: 8px; } .mt-md { margin-top: 16px; } .mt-lg { margin-top: 24px; }

ul { text-align: left; padding-left: 18px; }
/* ===============================
   FOOTER
================================ */
footer {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin: 28px 0 16px;
}

footer a {
  color: var(--green-main);
  text-decoration: none;
  margin: 0 6px;
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
}
/* ===============================
   YOUTUBE SECTION
================================ */

#stickyVideo {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #000;
}

.yt-container {
  max-width: 1000px;
  margin: auto;
  padding: 15px;
  background: #fff;
}

.subscribe-box {
  text-align: center;
  margin: 30px 0;
  padding: 20px;
  border-radius: 12px;
  background: #fff;
  animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
  0% {
    box-shadow:
      0 0 5px rgba(255, 0, 0, 0.4),
      0 0 10px rgba(255, 0, 0, 0.3);
  }
  50% {
    box-shadow:
      0 0 15px rgba(255, 0, 0, 0.8),
      0 0 30px rgba(255, 0, 0, 0.6);
  }
  100% {
    box-shadow:
      0 0 5px rgba(255, 0, 0, 0.4),
      0 0 10px rgba(255, 0, 0, 0.3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .subscribe-box {
    animation: none;
  }
}