/* ===================================================================
   ניב · JVCbet — משחקי המזל
   אותה שפה עיצובית של האתר הראשי: ink · plum · JVC magenta
   =================================================================== */

:root {
  --ink: #0A0910;
  --ink-2: #100D19;
  --plum: #180C2A;
  --plum-2: #22113A;
  --brand: #F20DD9;
  --brand-hi: #FF63EE;
  --brand-deep: #A80896;
  --ivory: #F5F1FA;
  --muted: #A79FB8;
  --wa: #25D366;
  --wa-deep: #128C4A;
  --line: rgba(242, 13, 217, 0.18);
  --line-soft: rgba(245, 241, 250, 0.08);
  --font-display: "Rubik", "Heebo", sans-serif;
  --font-body: "Heebo", "Arial Hebrew", sans-serif;
}

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

body {
  background:
    radial-gradient(1100px 520px at 50% -10%, rgba(242, 13, 217, 0.16), transparent 60%),
    radial-gradient(700px 500px at 8% 40%, rgba(109, 40, 217, 0.18), transparent 65%),
    radial-gradient(700px 500px at 92% 60%, rgba(242, 13, 217, 0.1), transparent 65%),
    radial-gradient(900px 600px at 50% 115%, rgba(34, 17, 58, 0.95), transparent 65%),
    var(--ink);
  position: relative;
  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;
}

/* JVC art wash behind the page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 9, 16, 0.6), rgba(10, 9, 16, 0.9) 50%, var(--ink)),
    url("../img/hero-bg.jpg") center 20%/cover no-repeat;
  opacity: 0.75;
  filter: blur(14px) saturate(1.2);
  transform: scale(1.08);
  pointer-events: none;
}

/* film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.35;
  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.05 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(10, 9, 16, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.g-brand { display: flex; align-items: center; gap: 12px; }
.g-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  color: var(--brand);
  padding: 7px;
}
.g-brand-mark svg { width: 100%; height: 100%; }
.g-brand-logo { height: 30px; width: auto; filter: drop-shadow(0 0 12px rgba(242, 13, 217, 0.45)); }
.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.2rem; }
.g-brand-text small { font-size: 0.66rem; letter-spacing: 0.12em; color: var(--brand); font-weight: 500; }

.g-head-wa {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  border-radius: 100px;
  background: linear-gradient(135deg, #2BE070, var(--wa-deep));
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 12px 30px -10px rgba(37, 211, 102, 0.45);
  transition: transform 0.25s ease;
}
.g-head-wa:hover { transform: translateY(-2px); }
.g-head-wa svg { width: 19px; height: 19px; }

/* ---------- 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.1em;
  color: var(--brand-hi);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 7px 18px;
  background: rgba(242, 13, 217, 0.07);
  margin-bottom: 22px;
}
.g-badge svg { width: 15px; height: 15px; }
.g-hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); font-weight: 900; letter-spacing: -0.01em; text-shadow: 0 0 40px rgba(242, 13, 217, 0.25); }
.g-hero h1 .grad {
  background: linear-gradient(100deg, #A80896 5%, #FF63EE 35%, #FFD1F8 50%, #FF63EE 65%, #A80896 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.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: 660px;
  border-radius: 28px;
  padding: clamp(24px, 4vw, 44px);
  background:
    radial-gradient(520px 280px at 50% -10%, rgba(242, 13, 217, 0.22), transparent 60%),
    radial-gradient(400px 300px at 100% 100%, rgba(109, 40, 217, 0.22), transparent 60%),
    linear-gradient(160deg, #2A1447, var(--plum) 55%, #0E0818);
  border: 1px solid rgba(255, 99, 238, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(242, 13, 217, 0.08),
    0 0 0 6px rgba(242, 13, 217, 0.05),
    0 40px 100px -30px rgba(0, 0, 0, 0.95),
    0 0 90px -30px rgba(242, 13, 217, 0.55);
  isolation: isolate;
}
.stage-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 99, 238, 0.7), transparent 30%, transparent 70%, rgba(109, 40, 217, 0.7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.stage-card::after {
  content: "";
  position: absolute;
  left: 10%; right: 10%; bottom: -34px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 13, 217, 0.45), transparent 75%);
  filter: blur(14px);
  z-index: -1;
  pointer-events: none;
}

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

.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 34px;
  border-radius: 100px;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  background: linear-gradient(135deg, #FF63EE 0%, #F20DD9 45%, #A80896 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 0 rgba(0, 0, 0, 0.25),
    0 14px 34px -12px rgba(242, 13, 217, 0.75);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s;
  position: relative;
  overflow: hidden;
}
.g-btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; width: 40%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: btnShine 3.2s ease-in-out infinite;
}
@keyframes btnShine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.g-btn:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -14px rgba(242, 13, 217, 0.75); }
.g-btn:active { transform: scale(0.97); }
.g-btn[disabled] { opacity: 0.45; pointer-events: none; }

.g-btn--wa {
  color: #fff;
  background: linear-gradient(135deg, #2BE070, var(--wa-deep));
  box-shadow: 0 14px 34px -12px rgba(37, 211, 102, 0.5);
}

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

/* ---------- 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: 720px;
  margin-inline: auto;
}
.prize {
  position: relative;
  padding: 20px 10px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(120px 60px at 50% 0%, rgba(255, 99, 238, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(34, 17, 58, 0.9), rgba(16, 13, 25, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 30px -18px rgba(0, 0, 0, 0.9);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.prize:hover { transform: translateY(-4px); border-color: rgba(255, 99, 238, 0.4); }
.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: rgba(255, 99, 238, 0.55);
  background:
    radial-gradient(140px 70px at 50% 0%, rgba(255, 99, 238, 0.35), transparent 70%),
    linear-gradient(180deg, rgba(168, 8, 150, 0.45), rgba(34, 17, 58, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 30px -10px rgba(242, 13, 217, 0.6), 0 14px 30px -18px rgba(0, 0, 0, 0.9);
}
.prize.hl strong { color: #FFFFFF; text-shadow: 0 0 18px rgba(255, 99, 238, 0.9); }

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

.g-foot { border-top: 1px solid var(--line-soft); background: rgba(5, 4, 8, 0.85); backdrop-filter: blur(10px); }
.g-foot .inner { width: min(860px, calc(100% - 40px)); margin-inline: auto; padding: 30px 0 34px; text-align: center; }
.a18 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.g-foot p { font-size: 0.78rem; color: rgba(152, 160, 153, 0.75); }
.g-foot .cp { margin-top: 10px; color: var(--muted); }

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

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 6, 5, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}
.modal {
  position: relative;
  width: min(430px, 100%);
  text-align: center;
  border-radius: 24px;
  padding: 44px 34px 34px;
  background:
    radial-gradient(400px 220px at 50% -10%, rgba(242, 13, 217, 0.18), transparent 60%),
    linear-gradient(160deg, #131A16, #0A0D0B);
  border: 1px solid rgba(242, 13, 217, 0.5);
  box-shadow: 0 50px 110px -30px rgba(0, 0, 0, 1), 0 0 70px -20px rgba(242, 13, 217, 0.4);
  animation: popIn 0.4s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.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: #14100A;
  background: linear-gradient(135deg, var(--brand-hi), var(--brand-deep));
  padding: 19px;
  box-shadow: 0 16px 40px -12px rgba(242, 13, 217, 0.7);
  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(--brand);
  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 .fields { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.modal input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(10, 9, 16, 0.6);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.modal input:focus { outline: none; border-color: var(--brand); }
.modal .wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  border-radius: 100px;
  background: linear-gradient(135deg, #2BE070, var(--wa-deep));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 14px 34px -12px rgba(37, 211, 102, 0.55);
  transition: transform 0.25s ease;
}
.modal .wa-btn:hover { transform: translateY(-2px); }
.modal .wa-btn svg { width: 20px; height: 20px; }
.modal-fine { margin-top: 12px; font-size: 0.75rem; color: var(--muted); }

/* ---------- Mute button ---------- */

.g-head-side { display: flex; align-items: center; gap: 10px; }
.g-mute {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(242, 13, 217, 0.06);
  color: var(--brand-hi);
  cursor: pointer;
  padding: 10px;
  transition: border-color 0.2s, transform 0.2s;
}
.g-mute:hover { border-color: var(--brand); 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); }

/* ---------- 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%, #FFD1F8, #FF63EE 40%, #A80896 85%);
  box-shadow:
    inset 0 0 0 2px rgba(122, 95, 40, 0.7),
    inset 2px 2px 3px rgba(255, 248, 226, 0.7),
    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) — art cards ---------- */

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 20px 0 70px;
}
.hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 380px;
  padding: 26px 24px 24px;
  border-radius: 22px;
  border: 1px solid rgba(255, 99, 238, 0.22);
  background: var(--plum);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.9);
}
.hub-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center 20%;
  transform: scale(1.04);
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s ease;
  filter: saturate(1.05);
}
.hub-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 9, 16, 0.05) 30%, rgba(10, 9, 16, 0.55) 60%, rgba(10, 9, 16, 0.96) 100%);
}
.hub-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 99, 238, 0.65), transparent 40%, transparent 65%, rgba(109, 40, 217, 0.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.3s;
}
.hub-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 99, 238, 0.6);
  box-shadow: 0 34px 70px -28px rgba(0, 0, 0, 0.95), 0 0 50px -14px rgba(242, 13, 217, 0.5);
}
.hub-card:hover .hub-art { transform: scale(1.12); }
.hub-card:hover::after { opacity: 1; }
.hub-tag {
  position: absolute;
  top: 16px;
  inset-inline-start: 16px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ivory);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 100px;
  padding: 5px 12px;
  background: rgba(10, 9, 16, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hub-tag.gold {
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--brand-hi), var(--brand));
  border-color: transparent;
  box-shadow: 0 8px 20px -8px rgba(242, 13, 217, 0.8);
}
.hub-ico {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  width: 44px; height: 44px;
  padding: 9px;
  border-radius: 12px;
  color: #FFFFFF;
  background: rgba(10, 9, 16, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hub-ico svg { width: 100%; height: 100%; }
.hub-card h2 { font-size: 1.5rem; margin-bottom: 6px; font-weight: 900; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7); }
.hub-card p { font-size: 0.92rem; color: rgba(245, 241, 250, 0.82); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }
.hub-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 16px;
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #FFFFFF;
  background: linear-gradient(135deg, #FF63EE, #F20DD9 55%, #A80896);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 26px -12px rgba(242, 13, 217, 0.9);
  transition: transform 0.25s ease;
}
.hub-card:hover .hub-go { transform: translateX(-4px); }
.hub-go svg { width: 16px; height: 16px; }

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

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--brand-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-wa span { display: none; }
}
