@import url("./theme.css");
*{ box-sizing:border-box; }

/* ? Fix: Android/Chrome "big first visit, small after Back" autosizing */
html{
  height:100%;
  font-size:16px;              /* you said you like the smaller look */
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

body{
  min-height:100%;
  margin:0;
  font-size:1rem;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:#fff;
  background:
    radial-gradient(1200px 640px at 50% -10%, rgba(255,255,255,.12), transparent 60%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  position:relative;
  overflow-x:hidden;
  isolation:isolate;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  pointer-events:none;
  background:
    linear-gradient(180deg, rgba(3,13,38,.36), rgba(3,10,24,.56)),
    url("../assets/bg_ocean.png") center/cover no-repeat;
  filter:saturate(1.15) contrast(1.05);
}

body.alefbet-bg::before{
  background:
    linear-gradient(180deg, rgba(16,28,52,.18), rgba(8,18,34,.40)),
    url("../assets/alefbackgrounnd.png") center/cover no-repeat;
  filter:saturate(1.12) contrast(1.03);
}

body.shabbos-bg::before{
  background:
    linear-gradient(180deg, rgba(10,24,42,.36), rgba(8,18,36,.54)),
    url("../assets/shabbosbackground.png") center/cover no-repeat;
  filter:saturate(1.08) contrast(1.04);
}

body.brachos-bg::before{
  background:
    linear-gradient(180deg, rgba(14,26,40,.34), rgba(10,22,34,.52)),
    url("../assets/brachos.png") center/cover no-repeat;
  filter:saturate(1.10) contrast(1.04);
}

body.parasha-bg::before{
  background:
    linear-gradient(180deg, rgba(26,18,8,.22), rgba(12,14,28,.44)),
    url("../assets/parashbackground.png") center/cover no-repeat;
  filter:saturate(1.08) contrast(1.03);
}

body.holidays-bg::before{
  background:
    linear-gradient(180deg, rgba(24,22,44,.30), rgba(16,14,34,.46)),
    url("../assets/chagimbackground.png") center/cover no-repeat;
  filter:saturate(1.12) contrast(1.04);
}


body.friendship-bg::before{
  background:
    linear-gradient(180deg, rgba(18,28,42,.28), rgba(12,20,34,.44)),
    url("../assets/friendshipbackground.png") center/cover no-repeat;
  filter:saturate(1.08) contrast(1.04);
}

body.trivia-bg::before{
  background:
    linear-gradient(180deg, rgba(18,22,52,.34), rgba(12,14,34,.50)),
    url("../assets/triviatimebackground.png") center/cover no-repeat;
  filter:saturate(1.10) contrast(1.05);
}

body.mitzvot-bg::before{
  background:
    linear-gradient(180deg, rgba(30,20,14,.34), rgba(18,12,8,.52)),
    url("../assets/Mitzvosbackground.png") center/cover no-repeat;
  filter:saturate(1.08) contrast(1.04);
}

body.arcade-bg::before{
  background:
    linear-gradient(180deg, rgba(20,36,66,.20), rgba(10,18,34,.42)),
    url("../assets/arcadebackground.png") center/cover no-repeat;
  filter:saturate(1.08) contrast(1.04);
}
body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(650px 380px at 12% 82%, rgba(66,187,255,.18), transparent 70%),
    radial-gradient(640px 360px at 88% 18%, rgba(101,255,179,.12), transparent 72%),
    repeating-linear-gradient(
      122deg,
      rgba(255,255,255,.04) 0px,
      rgba(255,255,255,.04) 12px,
      rgba(255,255,255,0) 52px,
      rgba(255,255,255,0) 96px
    );
  mix-blend-mode:screen;
  opacity:.65;
}

/* ================================
   GLOBAL TEXT SYSTEM (ONE PLACE)
   ================================ */
:root{
  --q-font: 30px;     /* question text size */
  --a-font: 24px;     /* answer text size */
}

/* Question text (used everywhere) */
.question{
  font-size: var(--q-font) !important;
  font-weight: 1000;
  line-height: 1.25;
}

/* Answer buttons/cards across games */
.choiceBtn,
.hebBtn,
.wordCard,
.itemBtn,
.stepBtn,
.cardBtn,
.miniBtn,
.name{
  font-size: var(--a-font) !important;
  font-family: inherit !important;
}



a{ color:inherit; }
.hidden{ display:none !important; }
.rtl{ direction: rtl; }
.page{ min-height:100vh; padding:18px; }

.card{
  width:min(980px, 94vw);
  margin: 0 auto;
  padding: 18px;
  border-radius: 26px;
  background: linear-gradient(180deg, var(--glass), var(--glass2));
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 70px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  position:relative;
  overflow:hidden;
}
.cardIsland::before{
  content:"";
  position:absolute;
  inset:-40%;
  background:
    radial-gradient(closest-side at 20% 15%, rgba(255,255,255,.14), transparent 70%),
    radial-gradient(closest-side at 75% 25%, rgba(120,220,255,.16), transparent 70%),
    radial-gradient(closest-side at 35% 75%, rgba(70,240,127,.10), transparent 72%),
    repeating-linear-gradient(
      120deg,
      rgba(255,255,255,.06) 0px,
      rgba(255,255,255,.06) 10px,
      rgba(255,255,255,0) 44px,
      rgba(255,255,255,0) 92px
    );
  filter: blur(2px);
  opacity:.55;
  pointer-events:none;
}
.cardIsland > *{ position:relative; z-index:1; }

.cardTitle{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin:0 0 6px 0; font-weight:1000; font-size:26px;
  text-shadow: 0 10px 24px rgba(0,0,0,.25);
}
.cardSub{ margin:0 0 14px 0; opacity:.90; font-weight:800; }

.hud{
  display:flex; justify-content:space-between; align-items:center;
  gap:10px; flex-wrap:wrap; margin-bottom:14px;
}
.pill{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px; border-radius:999px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
  font-weight:1000;
}

.btn{
  border:none; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:12px 14px; border-radius:999px;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--btn-text);
  font-weight:1000;
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
  transition: transform .08s ease, filter .2s ease, opacity .2s ease;
  user-select:none;
  text-decoration:none;
}
.btn:hover{ filter: brightness(1.06); }
.btn:active{ transform: translateY(1px) scale(.99); }
.btn:disabled{ opacity:.55; cursor:not-allowed; filter:none; }

.btn.primary{ background: linear-gradient(180deg, var(--primary-1), var(--primary-2)); border: 1px solid rgba(255,255,255,.18); }
.btn.good{ background: linear-gradient(180deg, var(--good-1), var(--good-2)); color: var(--sel-text); }
.btn.bad{ background: linear-gradient(180deg, var(--bad-1), var(--bad-2)); }
.btn.hint{ background: linear-gradient(180deg, var(--hint-1), var(--hint-2)); color: var(--hint-text); }
.btn.arcadeLocked{
  background: linear-gradient(180deg, rgba(154,168,184,.72), rgba(110,124,144,.84));
  border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.96);
}
.answerTone-1{
  background: linear-gradient(180deg, rgba(86,170,255,.82), rgba(58,111,221,.90)) !important;
  border-color: rgba(180,226,255,.42) !important;
}
.answerTone-2{
  background: linear-gradient(180deg, rgba(255,167,104,.84), rgba(219,104,85,.92)) !important;
  border-color: rgba(255,214,171,.42) !important;
}
.answerTone-3{
  background: linear-gradient(180deg, rgba(88,219,177,.82), rgba(42,156,133,.92)) !important;
  border-color: rgba(196,255,229,.40) !important;
}
.answerTone-4{
  background: linear-gradient(180deg, rgba(189,153,255,.84), rgba(120,102,224,.92)) !important;
  border-color: rgba(229,214,255,.40) !important;
}
.matchTone-1{
  background: linear-gradient(180deg, rgba(86,170,255,.82), rgba(58,111,221,.90)) !important;
  border-color: rgba(180,226,255,.42) !important;
}
.matchTone-2{
  background: linear-gradient(180deg, rgba(255,167,104,.84), rgba(219,104,85,.92)) !important;
  border-color: rgba(255,214,171,.42) !important;
}
.matchTone-3{
  background: linear-gradient(180deg, rgba(88,219,177,.82), rgba(42,156,133,.92)) !important;
  border-color: rgba(196,255,229,.40) !important;
}
.matchTone-4{
  background: linear-gradient(180deg, rgba(189,153,255,.84), rgba(120,102,224,.92)) !important;
  border-color: rgba(229,214,255,.40) !important;
}
.matchTone-5{
  background: linear-gradient(180deg, rgba(255,215,120,.84), rgba(217,155,51,.92)) !important;
  border-color: rgba(255,237,189,.40) !important;
}
.matchTone-6{
  background: linear-gradient(180deg, rgba(110,226,240,.82), rgba(43,155,186,.92)) !important;
  border-color: rgba(194,249,255,.40) !important;
}
.btn.full{ width:100%; }

.segRow{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.segBtn{
  border:none; cursor:pointer;
  padding:10px 14px; border-radius:999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  color:#fff; font-weight:1000;
  box-shadow: 0 14px 34px rgba(0,0,0,.14);
}
.segBtn.sel{
  background: linear-gradient(180deg, var(--sel-1), var(--sel-2));
  color: var(--sel-text);
}

.row{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.spacer{ height:14px; }

.question{
  font-size:28px; font-weight:1000; line-height:1.25;
  margin:10px 0 14px 0;
}
.bigHebrew{
  font-size:44px; font-weight:1000;
  text-shadow: 0 12px 30px rgba(0,0,0,.28);
}

.optionGrid{ display:grid; grid-template-columns: repeat(2, 1fr); gap:12px; }
.option{ border-radius:18px; padding:14px; font-size:18px; }

.choices{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:10px;
}
.choiceBtn,
.btn.option,
.optionBtn{
  width:100%;
  min-height:84px;
  border:none;
  cursor:pointer;
  border-radius:20px;
  padding:18px 16px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.16);
  color:#fff;
  font-weight:1000;
  font-size:var(--a-font) !important;
  line-height:1.3;
  text-align:left;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  box-shadow:0 14px 34px rgba(0,0,0,.14);
  transition:transform .08s ease, filter .2s ease, opacity .2s ease, box-shadow .2s ease;
}
.choiceBtn:hover,
.btn.option:hover,
.optionBtn:hover{ filter:brightness(1.06); }
.choiceBtn:active,
.btn.option:active,
.optionBtn:active{ transform:translateY(1px) scale(.995); }
.choiceBtn.correct,
.btn.option.good,
.optionBtn.good{
  background:linear-gradient(180deg, var(--good-1), var(--good-2)) !important;
  color:var(--sel-text) !important;
  border-color:rgba(255,255,255,.20) !important;
}
.choiceBtn.wrong,
.btn.option.bad,
.optionBtn.bad{
  background:linear-gradient(180deg, var(--bad-1), var(--bad-2)) !important;
  color:#fff !important;
  border-color:rgba(255,255,255,.20) !important;
  opacity:.95;
}
.qBox{
  padding:14px;
  border-radius:16px;
  background:rgba(0,0,0,.16);
  border:1px solid rgba(255,255,255,.12);
  margin:10px 0 14px;
}
.qText{
  font-size:var(--q-font);
  font-weight:1000;
  color:#fff;
  line-height:1.25;
}
.explain,
.status{
  color:rgba(255,255,255,.90);
  font-weight:900;
}
.explain{ margin-top:10px; }
.diffBtns{ display:flex; gap:10px; flex-wrap:wrap; }
.miniBtn{
  border:none;
  cursor:pointer;
  padding:10px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.16);
  color:#fff;
  font-weight:900;
  box-shadow:0 14px 34px rgba(0,0,0,.14);
}
.miniBtn.active{
  outline:3px solid rgba(70,240,127,.95);
  box-shadow:0 0 0 3px rgba(0,0,0,.18);
}

.matchCols{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
.col{
  padding:12px; border-radius:20px;
  background: rgba(0,0,0,.14);
  border: 1px solid rgba(255,255,255,.16);
}
.colTitle{ font-weight:1000; margin-bottom:10px; opacity:.95; }

.animalCard{
  border-radius: 22px;
  background: rgba(0,0,0,.14);
  border: 1px solid rgba(255,255,255,.16);
  padding: 14px;
  text-align:center;
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
}
.animalCard img{
  width:100%;
  height: 180px;
  object-fit: contain;
  display:block;
  margin: 0 auto 10px;
  filter: drop-shadow(0 14px 30px rgba(0,0,0,.25));
}

.slotsRow,.poolRow{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:center; }

.infoBox{
  margin-top:12px;
  padding:12px 14px;
  border-radius:18px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.16);
}

@media (max-width: 700px){
  .matchCols{ grid-template-columns:1fr; }
  .optionGrid{ grid-template-columns:1fr; }
  .bigHebrew{ font-size:38px; }
  .animalCard img{ height: 160px; }
}
@media (max-width: 520px){
  .row .btn{ width:100%; }
  .card{ padding:14px; border-radius:22px; }
  .cardTitle{ font-size:22px; }
}

/* ===============================
   Torah Island - Header polish
   =============================== */

.titleBox.cleanHeader{
  width: 100%;
  justify-content: center;
  text-align: center;
  display: flex;
  align-items: center;
}

.hTitle{
  font-weight: 1000;
  font-size: 36px;
  letter-spacing: .6px;
  line-height: 1.05;
  text-shadow: 0 16px 40px rgba(0,0,0,.35);
}

.hSub{
  margin-top: 6px;
  opacity: .88;
  font-weight: 900;
  font-size: 15px;
}

/* Optional: make the top header card feel softer on the new background */
.headerRow{
  gap: 14px;
}
.panel{
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 70px rgba(0,0,0,.35);
  border-radius: 28px;
}
@media (max-width: 700px){
  body::before{ background-position:center top; }
  body::after{ opacity:.55; }
}











.modalOverlay{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background: rgba(3,10,24,.56);
  backdrop-filter: blur(8px);
  z-index:1000;
}

.modalCard{
  width:min(420px, 92vw);
  padding:24px 22px;
  border-radius:24px;
  background: linear-gradient(180deg, rgba(232,240,248,.94), rgba(203,216,231,.90));
  border:1px solid rgba(255,255,255,.42);
  box-shadow: 0 24px 80px rgba(0,0,0,.34);
  text-align:center;
  color:#17304b;
}

.modalTitle{
  margin:0 0 8px 0;
  font-size:28px;
  font-weight:1000;
}

.modalText{
  margin:0 0 18px 0;
  font-size:18px;
  font-weight:800;
  line-height:1.45;
}


.celebrateOverlay{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
  z-index:1400;
}

.celebratePopup{
  position:relative;
  min-width:min(420px, 86vw);
  padding:22px 28px;
  border-radius:28px;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.48), transparent 36%),
    linear-gradient(135deg, rgba(78,231,167,.96), rgba(79,150,255,.94));
  border:1px solid rgba(255,255,255,.44);
  box-shadow:0 30px 90px rgba(11,31,61,.34);
  text-align:center;
  overflow:hidden;
  animation:celebrateIn 1.45s cubic-bezier(.2,.9,.2,1) forwards;
}

.celebratePopup.bad{
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.36), transparent 36%),
    linear-gradient(135deg, rgba(255,129,128,.96), rgba(232,84,118,.94));
}

.celebratePopup::before,
.celebratePopup::after{
  content:"";
  position:absolute;
  inset:auto;
  width:180px;
  height:180px;
  border-radius:999px;
  filter:blur(8px);
  opacity:.35;
}

.celebratePopup::before{
  top:-40px;
  left:-30px;
  background:rgba(255,255,255,.55);
}

.celebratePopup::after{
  bottom:-60px;
  right:-20px;
  background:rgba(255,222,125,.55);
}

.celebrateBadge{
  position:relative;
  z-index:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:66px;
  height:66px;
  margin-bottom:10px;
  border-radius:999px;
  background:rgba(255,255,255,.26);
  box-shadow:0 12px 30px rgba(0,0,0,.18);
  font-size:34px;
}

.celebrateTitle,
.celebrateText{
  position:relative;
  z-index:1;
  color:#ffffff;
  text-shadow:0 10px 24px rgba(0,0,0,.18);
}

.celebrateTitle{
  margin:0;
  font-size:30px;
  font-weight:1000;
}

.celebrateText{
  margin:6px 0 0 0;
  font-size:17px;
  font-weight:900;
  opacity:.96;
}

.celebrateSparkle{
  position:absolute;
  width:12px;
  height:12px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  box-shadow:0 0 20px rgba(255,255,255,.9);
  animation:celebrateSparkle 1.65s ease-out forwards;
}

.celebrateSparkle.s1{ top:16%; left:18%; animation-delay:.02s; }
.celebrateSparkle.s2{ top:24%; right:16%; animation-delay:.10s; }
.celebrateSparkle.s3{ bottom:20%; left:20%; animation-delay:.18s; }
.celebrateSparkle.s4{ bottom:14%; right:22%; animation-delay:.26s; }
.celebrateSparkle.s5{ top:50%; left:10%; animation-delay:.14s; }
.celebrateSparkle.s6{ top:44%; right:9%; animation-delay:.22s; }

@keyframes celebrateIn{
  0%{ transform:translateY(28px) scale(.78); opacity:0; }
  20%{ opacity:1; }
  55%{ transform:translateY(-8px) scale(1.04); opacity:1; }
  72%{ transform:translateY(-14px) scale(1); opacity:1; }`r`n  100%{ transform:translateY(-22px) scale(1); opacity:0; }
}

@keyframes celebrateSparkle{
  0%{ transform:scale(.2); opacity:0; }
  25%{ opacity:1; }
  100%{ transform:translateY(-22px) scale(1.5); opacity:0; }
}


.cardTone-1,
.cardTone-1 .front,
.cardBtn.cardTone-1{
  background: linear-gradient(180deg, rgba(86,170,255,.82), rgba(58,111,221,.90)) !important;
  border-color: rgba(180,226,255,.42) !important;
}

.cardTone-2,
.cardTone-2 .front,
.cardBtn.cardTone-2{
  background: linear-gradient(180deg, rgba(255,167,104,.84), rgba(219,104,85,.92)) !important;
  border-color: rgba(255,214,171,.42) !important;
}

.cardTone-3,
.cardTone-3 .front,
.cardBtn.cardTone-3{
  background: linear-gradient(180deg, rgba(88,219,177,.82), rgba(42,156,133,.92)) !important;
  border-color: rgba(196,255,229,.40) !important;
}

.cardTone-4,
.cardTone-4 .front,
.cardBtn.cardTone-4{
  background: linear-gradient(180deg, rgba(189,153,255,.84), rgba(120,102,224,.92)) !important;
  border-color: rgba(229,214,255,.40) !important;
}
