/* ===================================================================
   7XL עם רועי — משחקי הכיף
   שפה עיצובית: אובסידיאן שחור · אדום 7XL · זהב שמפניה
   Palette: obsidian #070608 · red #E8232E/#9E1420 · champagne #D8B36A/#F0D293
   Type: Frank Ruhl Libre (display) · Heebo (body)
   =================================================================== */

:root {
  --ink: #070608;
  --ink-2: #0D0A10;
  --panel: #16121A;
  --panel-2: #191420;
  --red: #E8232E;
  --red-hi: #FF3B45;
  --red-deep: #9E1420;
  --wine: #9E1420;
  --wine-deep: #6B0E16;
  --gold: #D8B36A;
  --gold-hi: #F0D293;
  --gold-deep: #8A6A2F;
  --ivory: #F3EDE4;
  --muted: #A79DB0;
  --wa: #25D366;
  --wa-deep: #128C4A;
  --on-accent: #FFF6F3;
  --on-gold: #2A2008;
  --line: rgba(216, 179, 106, 0.14);
  --line-strong: rgba(216, 179, 106, 0.34);
  --line-soft: rgba(243, 237, 228, 0.1);
  --font-display: "Heebo", "Arial Hebrew", sans-serif;
  --font-body: "Heebo", "Arial Hebrew", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background:
    radial-gradient(1100px 600px at 50% -10%, rgba(158, 20, 32, 0.3), transparent 60%),
    radial-gradient(900px 600px at 88% 30%, rgba(216, 179, 106, 0.07), transparent 62%),
    radial-gradient(900px 600px at 8% 80%, rgba(158, 20, 32, 0.14), transparent 65%),
    linear-gradient(180deg, #0D0A10 0%, #0A0810 55%, #070608 100%),
    var(--ink);
  color: var(--ivory);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* subtle grain — same as the main site */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; }

/* ---------- Header ---------- */

.g-head {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(18px, 4vw, 44px);
  background: rgba(7, 6, 8, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.g-brand { display: flex; align-items: center; gap: 12px; color: var(--gold); }
.g-brand-logo {
  display: block;
  height: 42px;
  width: auto;
}
.g-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.g-brand-text strong { font-family: var(--font-display); font-weight: 900; font-size: 1.05rem; color: var(--ivory); }
.g-brand-text small { font-size: 0.64rem; letter-spacing: 0.1em; color: var(--gold); font-weight: 500; }

.g-head-side { display: flex; align-items: center; gap: 14px; }
.g-head-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
}
.g-head-back svg { width: 16px; height: 16px; }
.g-head-back:hover { color: var(--gold-hi); }

.g-mute {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(216, 179, 106, 0.06);
  color: var(--gold-hi);
  cursor: pointer;
  padding: 10px;
  transition: border-color 0.2s, transform 0.2s;
}
.g-mute:hover { border-color: var(--gold); transform: translateY(-1px); }
.g-mute svg { width: 100%; height: 100%; }
.g-mute .snd-off { display: none; }
.g-mute.is-muted .snd-on { display: none; }
.g-mute.is-muted .snd-off { display: block; }
.g-mute.is-muted { color: var(--muted); }

/* ---------- Layout ---------- */

.g-wrap { width: min(1080px, calc(100% - 40px)); margin-inline: auto; }

.g-hero { text-align: center; padding: 56px 0 34px; }
.g-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold-hi);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: 7px 18px;
  background: rgba(216, 179, 106, 0.07);
  margin-bottom: 22px;
}
.g-badge svg { width: 15px; height: 15px; }
.g-hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); font-weight: 900; }
.g-hero h1 .grad {
  background: linear-gradient(100deg, #8A6A2F 5%, #D8B36A 32%, #FBF3DF 48%, #D8B36A 64%, #B8933F 95%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}
.g-sub { max-width: 560px; margin: 14px auto 0; color: var(--muted); font-size: 1.05rem; }

.g-stage-wrap { display: flex; justify-content: center; padding: 26px 0 10px; }
.g-help { text-align: center; color: var(--muted); font-size: 0.9rem; padding-bottom: 26px; }

/* ---------- Stage card ---------- */

.stage-card {
  position: relative;
  width: 100%;
  max-width: 640px;
  border-radius: 26px;
  padding: clamp(24px, 4vw, 44px);
  background:
    radial-gradient(500px 260px at 50% -10%, rgba(158, 20, 32, 0.22), transparent 60%),
    linear-gradient(160deg, var(--panel-2), var(--panel) 55%, #120E16);
  border: 1px solid var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(240, 210, 147, 0.1),
    0 40px 90px -35px rgba(0, 0, 0, 0.95);
}

/* ---------- Buttons ---------- */

.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 58px;
  padding: 0 34px;
  border-radius: 100px;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--red-hi), var(--red-deep));
  box-shadow: 0 14px 34px -12px rgba(232, 35, 46, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s;
  position: relative;
  overflow: hidden;
}
.g-btn::before {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.28) 50%, transparent 58%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
  pointer-events: none;
}
.g-btn:hover::before { transform: translateX(120%); }
.g-btn:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -14px rgba(255, 59, 69, 0.7); }
.g-btn:active { transform: scale(0.97); }
.g-btn[disabled] { opacity: 0.45; pointer-events: none; }

.g-btn--gold {
  color: var(--on-gold);
  background: linear-gradient(135deg, var(--gold-hi), var(--gold));
  box-shadow: 0 14px 34px -12px rgba(216, 179, 106, 0.55);
}
.g-btn--gold:hover { box-shadow: 0 20px 44px -14px rgba(240, 210, 147, 0.7); }

.stage-cta { display: flex; justify-content: center; margin-top: 26px; }

/* ---------- Real-game CTA ---------- */

.g-real {
  text-align: center;
  margin: 30px auto 0;
  max-width: 640px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(400px 200px at 50% -10%, rgba(158, 20, 32, 0.24), transparent 60%),
    linear-gradient(160deg, var(--panel-2), var(--panel));
  padding: 30px 26px;
}
.g-real h3 { font-size: 1.35rem; margin-bottom: 8px; color: var(--ivory); }
.g-real p { color: var(--muted); font-size: 0.92rem; margin-bottom: 18px; }
.g-real .g-btn { height: 54px; }

/* ---------- Prize board ---------- */

.g-prizes { text-align: center; padding: 44px 0 70px; }
.g-prizes h2 { font-size: 1.7rem; }
.g-prizes > p { color: var(--muted); margin: 8px 0 26px; }
.g-prizes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 780px;
  margin-inline: auto;
}
.prize {
  padding: 18px 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(243, 237, 228, 0.03), transparent);
}
.prize strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.7rem;
  color: var(--ivory);
  direction: ltr;
}
.prize span { font-size: 0.72rem; color: var(--muted); }
.prize.hl { border-color: var(--line-strong); background: linear-gradient(180deg, rgba(216, 179, 106, 0.14), rgba(216, 179, 106, 0.02)); }
.prize.hl strong { color: var(--gold-hi); }

/* ---------- Footer ---------- */

.g-foot { border-top: 1px solid var(--line); background: #0B090E; }
.g-foot .inner { width: min(860px, calc(100% - 40px)); margin-inline: auto; padding: 30px 0 34px; text-align: center; }
.a21 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--red);
  color: var(--red);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.g-foot p { font-size: 0.78rem; color: rgba(167, 157, 176, 0.85); }
.g-foot .cp { margin-top: 10px; color: var(--muted); }
.g-foot .cp a { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 3px; }
.g-foot .cp a:hover { color: var(--gold); }

/* ---------- Win modal ---------- */

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 6, 8, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}
.modal {
  position: relative;
  width: min(460px, 100%);
  text-align: center;
  border-radius: 24px;
  padding: 44px 34px 34px;
  background:
    radial-gradient(400px 220px at 50% -10%, rgba(216, 179, 106, 0.16), transparent 60%),
    linear-gradient(160deg, #1F1826, #16121A);
  border: 1px solid rgba(216, 179, 106, 0.5);
  box-shadow: 0 50px 110px -30px rgba(0, 0, 0, 1), 0 0 70px -20px rgba(216, 179, 106, 0.35);
  animation: popIn 0.4s cubic-bezier(0.2, 1.4, 0.4, 1);
  max-height: 90vh;
  overflow-y: auto;
}
.modal .close {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 7px;
}
.modal .close svg { width: 100%; height: 100%; }
.modal-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px; height: 74px;
  border-radius: 50%;
  color: var(--on-gold);
  background: linear-gradient(135deg, var(--gold-hi), var(--gold-deep));
  padding: 19px;
  box-shadow: 0 16px 40px -12px rgba(216, 179, 106, 0.6);
  margin-bottom: 14px;
}
.modal-medal svg { width: 100%; height: 100%; }
.modal .won {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 6px;
}
.modal h3 { font-size: 1.5rem; margin-bottom: 10px; }
.modal .desc { color: var(--muted); font-size: 0.92rem; margin-bottom: 22px; }
.modal .claim-label { font-size: 0.82rem; color: var(--muted); margin-bottom: 12px; }
.modal .claim-row { display: flex; flex-direction: column; gap: 10px; }
.modal .claim-row .g-btn { height: 54px; font-size: 0.95rem; }

.wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 54px;
  padding: 0 16px;
  border-radius: 100px;
  background: linear-gradient(135deg, #2BE070, var(--wa-deep));
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 14px 34px -12px rgba(37, 211, 102, 0.55);
  transition: transform 0.25s ease;
}
.wa-btn:hover { transform: translateY(-2px); }
.wa-btn svg { width: 19px; height: 19px; flex: none; }
.wa-btn__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  flex: none;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.78rem;
  color: #FFF6F3;
  background: linear-gradient(135deg, #E8232E, #6B0E16);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.modal-fine { margin-top: 16px; font-size: 0.75rem; color: var(--muted); }

/* ---------- Coin burst ---------- */

.coin-layer {
  position: fixed;
  inset: 0;
  z-index: 290;
  pointer-events: none;
  overflow: hidden;
}
.coin-layer i {
  position: absolute;
  top: 58%;
  left: 50%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #FBF3DF, #F0D293 40%, #8A6A2F 92%);
  box-shadow:
    inset 0 0 0 2px rgba(110, 83, 38, 0.75),
    inset 2px 2px 3px rgba(251, 243, 223, 0.8),
    0 4px 10px rgba(0, 0, 0, 0.45);
  animation: coinFly 1.4s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
@keyframes coinFly {
  0% { transform: translate(0, 0) scale(0.4) rotate(0deg); opacity: 0; }
  12% { opacity: 1; }
  38% { transform: translate(calc(var(--dx) * 0.65), var(--dy)) scale(1.05) rotate(220deg); opacity: 1; }
  100% { transform: translate(var(--dx), 60vh) scale(0.9) rotate(560deg); opacity: 0.9; }
}

/* ---------- Shake ---------- */

.shake { animation: stageShake 0.4s ease; }
@keyframes stageShake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-5px, 2px); }
  40% { transform: translate(5px, -2px); }
  60% { transform: translate(-4px, -1px); }
  80% { transform: translate(3px, 2px); }
}

/* ---------- Confetti ---------- */

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  overflow: hidden;
}
.confetti-layer i {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  opacity: 0.95;
}
@keyframes confettiFall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0.7; }
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { transform: scale(0.85); opacity: 0; } }

/* ---------- Hub (index) ---------- */

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 20px 0 30px;
}
.hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px 28px 26px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(300px 170px at 85% -10%, rgba(158, 20, 32, 0.16), transparent 60%),
    var(--panel);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}
.hub-card:hover {
  transform: translateY(-7px);
  border-color: var(--line-strong);
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.9), 0 0 40px -18px rgba(232, 35, 46, 0.35);
}
.hub-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 3px 12px;
  margin-bottom: 18px;
}
.hub-tag.hot {
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--red-hi), var(--red-deep));
  border-color: transparent;
}
.hub-ico { width: 52px; height: 52px; color: var(--gold); margin-bottom: 16px; }
.hub-ico svg { width: 100%; height: 100%; }
.hub-card h2 { font-size: 1.35rem; margin-bottom: 6px; }
.hub-card p { font-size: 0.92rem; color: var(--muted); }
.hub-go {
  margin-top: 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold-hi);
  border-bottom: 1px solid rgba(240, 210, 147, 0.4);
  padding-bottom: 2px;
}

/* ---------- A11y & motion ---------- */

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .hub-grid { grid-template-columns: 1fr; }
  .g-prizes-grid { grid-template-columns: repeat(2, 1fr); }
  .g-head-back span { display: none; }
}
