@import url("../../colors_and_type.css");

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body, #root {
  width: 100%;
  min-height: 100%;
  background: var(--surface-0);
  color: var(--fg-1);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(60% 50% at 90% 8%,  rgba(93,0,183,0.55) 0%, transparent 65%),
    radial-gradient(55% 45% at -5% 20%, rgba(255,52,2,0.45) 0%, transparent 65%),
    radial-gradient(70% 60% at 50% 95%, rgba(93,0,183,0.30) 0%, transparent 70%),
    linear-gradient(180deg, #1a0a2e 0%, #0f0f1a 30%, #0A0A0A 100%);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---- Layout ---- */
.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

.shell {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 1100px) {
  .shell { grid-template-columns: 1fr; }
  .betslip-rail { display:none; }
}

.section-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 36px 0 14px;
}
.section-h h2 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 10px;
}
.section-h h2::before {
  content: ""; display: inline-block; width: 4px; height: 22px;
  border-radius: 3px;
  background: linear-gradient(180deg, #FF3402, #5D00B7);
}
.section-h a {
  font-size: 13px;
  color: var(--b4w-orange);
  font-weight: 600;
}

/* ---- Header ---- */
.hdr {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 32px;
  background: linear-gradient(90deg, rgba(74,0,146,0.55) 0%, rgba(20,10,40,0.85) 50%, rgba(196,39,0,0.35) 100%);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.hdr .logo { height: 28px; }
.hdr .nav { display:flex; gap: 6px; margin-left: 12px; }
.hdr .nav a {
  padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14px;
  color: var(--fg-2); transition: all 200ms var(--ease-out);
}
.hdr .nav a:hover { background: rgba(255,255,255,0.06); color: var(--fg-1); }
.hdr .nav a.active { color: var(--fg-1); background: rgba(255,52,2,0.12); }
.hdr .search {
  display:flex; align-items:center; gap:8px; flex:1; max-width: 320px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-1);
  border-radius: 12px; padding: 8px 12px; color: var(--fg-3); font-size: 14px;
}
.hdr .search input {
  background: none; border:none; color: var(--fg-1); outline:none; flex:1; font: inherit;
}
.hdr .right { display:flex; align-items:center; gap:10px; margin-left:auto; }
.balance {
  display:flex; align-items:center; gap:8px;
  background: rgba(255,255,255,0.05); padding: 6px 8px 6px 12px; border-radius: 999px;
  border: 1px solid var(--border-1);
}
.balance .amt { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.balance .plus {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(180deg,#FF3402,#C42700);
  display:grid; place-items:center; color:#FFF; font-weight: 800;
  box-shadow: 0 0 0 1px rgba(255,52,2,0.4), 0 4px 12px rgba(255,52,2,0.4);
  cursor: pointer;
}

/* ---- Buttons ---- */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-weight: 700; font-size: 14px; letter-spacing: 0.02em; text-transform: uppercase;
  padding: 10px 18px; border-radius: 12px; border: none; cursor: pointer;
  transition: all 200ms var(--ease-out); color: #FFF;
}
.btn-primary {
  background: linear-gradient(180deg,#FF3402,#C42700);
  box-shadow: 0 0 0 1px rgba(255,52,2,0.35), 0 6px 20px rgba(255,52,2,0.35);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-primary:active { transform: scale(0.97); }
.btn-outline { background: transparent; border: 1.5px solid rgba(255,255,255,0.22); }
.btn-outline:hover { background: rgba(255,255,255,0.06); }
.btn-purple {
  background: linear-gradient(180deg,#6F19D2,#4A0092);
  box-shadow: 0 0 0 1px rgba(93,0,183,0.40), 0 6px 18px rgba(93,0,183,0.35);
}
.btn-ghost { background: rgba(255,255,255,0.06); }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 10px; }

/* ---- Hero ---- */
.hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 10% 100%, #FF3402 0%, #6A0E0E 25%, #141414 55%, #2A0E5C 78%, #5D00B7 100%);
  padding: 48px 52px;
  min-height: 280px;
  display:flex; flex-direction:column; justify-content:center; gap: 14px;
  border: 1px solid rgba(255,255,255,0.06);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: url('../../assets/brand-promo.png') right center / contain no-repeat;
  opacity: 0.95;
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; max-width: 56%; }
.hero .eyebrow {
  font: 700 12px/1 var(--font-body); letter-spacing: 0.12em; text-transform:uppercase;
  color: #FFE2D7;
}
.hero h1 {
  font: 800 56px/1 var(--font-display); letter-spacing: -0.02em;
  text-shadow: 0 4px 30px rgba(0,0,0,0.6);
}
.hero p { color: rgba(255,255,255,0.85); font-size: 16px; max-width: 420px; }
.hero .cta-row { display:flex; gap: 10px; margin-top: 6px; }

/* ---- Category pills ---- */
.cats { display:flex; gap: 8px; overflow-x: auto; padding: 6px 0; }
.cats::-webkit-scrollbar { display:none; }
.cat {
  display:inline-flex; align-items:center; gap:6px;
  padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,0.05); color: var(--fg-2); cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
  transition: all 200ms var(--ease-out);
}
.cat:hover { background: rgba(255,255,255,0.10); color: var(--fg-1); }
.cat.active { background: var(--b4w-orange); color: #FFF; box-shadow: 0 4px 14px rgba(255,52,2,0.35); }

/* ---- Game tiles ---- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
@media (max-width: 900px) { .tile-grid { grid-template-columns: repeat(3,1fr); } }

.tile {
  position: relative; aspect-ratio: 3/4; border-radius: 14px;
  overflow: hidden; cursor: pointer;
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.tile:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 16px 40px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,52,2,0.45);
  z-index: 2;
}
.tile .art {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 800 36px/1 var(--font-display); color: #FFF;
}
.tile .badge {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  background: rgba(20,20,20,0.75); color: #FFF;
}
.tile .badge.hot { background: var(--b4w-orange); }
.tile .badge.new { background: var(--b4w-win); }
.tile .badge.live { background: var(--b4w-orange); }
.tile .badge.live::before {
  content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: #FFF; margin-right: 5px; vertical-align: middle;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }
.tile .meta {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 28px 10px 10px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
  color: #FFF; font-size: 12px; font-weight: 700;
}
.tile .meta small { display: block; font-weight: 400; opacity: 0.7; font-size: 10px; margin-top: 2px; }
.tile .play-overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(20,20,20,0.55);
  opacity: 0; transition: opacity 200ms var(--ease-out);
}
.tile:hover .play-overlay { opacity: 1; }
.tile .play-btn {
  background: linear-gradient(180deg,#FF3402,#C42700);
  color: #FFF; padding: 8px 18px; border-radius: 999px;
  font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
  box-shadow: 0 6px 18px rgba(255,52,2,0.5);
}

/* ---- Promo cards ---- */
.promo-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.promo {
  position: relative; overflow: hidden; border-radius: 16px;
  padding: 18px; min-height: 140px;
  border: 1px solid var(--border-1);
  display:flex; flex-direction:column; justify-content:space-between; gap: 8px;
}
.promo.p1 { background: linear-gradient(135deg, #4A0092 0%, #141414 100%); }
.promo.p2 { background: linear-gradient(135deg, #FF3402 0%, #6A0E0E 100%); }
.promo.p3 { background: linear-gradient(135deg, #21C16B 0%, #0F3D24 100%); }
.promo h3 { font: 800 20px/1.1 var(--font-body); letter-spacing: -0.01em; }
.promo p { font-size: 13px; color: rgba(255,255,255,0.85); }
.promo .pct {
  position: absolute; right: -10px; bottom: -20px;
  font: 900 110px/1 var(--font-display);
  color: rgba(255,255,255,0.10); letter-spacing: -0.04em;
}

/* ---- BetSlip ---- */
.betslip {
  position: sticky; top: 80px;
  background: linear-gradient(180deg, rgba(74,0,146,0.30) 0%, rgba(27,27,27,0.95) 60%);
  border: 1px solid rgba(138,63,217,0.35);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 16px 40px rgba(74,0,146,0.25);
}
.betslip header {
  padding: 14px 16px; border-bottom: 1px solid var(--border-1);
  display:flex; align-items:center; justify-content:space-between;
}
.betslip header h3 { font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.betslip .tabs { display:flex; padding: 8px; gap: 4px; border-bottom: 1px solid var(--border-1); }
.betslip .tabs button {
  flex: 1; padding: 7px; border-radius: 8px;
  background: transparent; border: none; color: var(--fg-3); cursor: pointer;
  font-weight: 600; font-size: 12px;
}
.betslip .tabs button.active { background: rgba(255,52,2,0.16); color: var(--b4w-orange); }
.betslip .bets { padding: 12px 16px; display:flex; flex-direction:column; gap: 10px; max-height: 360px; overflow-y:auto; }
.bet {
  background: var(--surface-3); border-radius: 10px;
  padding: 10px 12px; display:flex; flex-direction:column; gap:4px;
  position: relative; border: 1px solid var(--border-1);
}
.bet .x {
  position:absolute; top: 8px; right: 10px; cursor: pointer;
  color: var(--fg-3); font-size: 14px;
}
.bet .selection { font-weight: 700; font-size: 13px; }
.bet .match { font-size: 11px; color: var(--fg-3); }
.bet .odds { font-weight: 800; color: var(--b4w-orange); font-variant-numeric: tabular-nums; }
.betslip .stake {
  padding: 12px 16px; border-top: 1px solid var(--border-1);
  display:flex; flex-direction:column; gap: 10px;
}
.stake input {
  width: 100%; background: var(--surface-3); border: 1px solid var(--border-1);
  color: #FFF; padding: 10px 12px; border-radius: 10px; font: 600 14px var(--font-body); outline:none;
}
.stake input:focus { border-color: var(--b4w-orange); }
.stake .summary { display:flex; justify-content:space-between; font-size: 13px; color: var(--fg-2); }
.stake .summary b { color: var(--fg-1); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---- Footer ---- */
.foot {
  margin-top: 80px; padding: 40px 32px; border-top: 1px solid var(--border-1);
  display:flex; flex-direction:column; gap: 24px; max-width:1440px; margin-left:auto; margin-right:auto;
}
.foot .row1 { display:flex; gap: 40px; flex-wrap:wrap; }
.foot .col { flex: 1; min-width: 160px; }
.foot .col h4 { font-size: 12px; text-transform:uppercase; letter-spacing: 0.08em; color: var(--fg-3); margin-bottom: 10px; font-weight: 700; }
.foot .col a { display:block; font-size: 13px; color: var(--fg-2); padding: 4px 0; }
.foot .col a:hover { color: var(--fg-1); }
.foot .row2 { display:flex; align-items:center; justify-content:space-between; gap: 18px; flex-wrap:wrap; padding-top: 18px; border-top: 1px solid var(--border-1); }
.foot .pays { display:flex; gap: 10px; align-items:center; }
.foot .pays span { padding: 6px 10px; background: rgba(255,255,255,0.06); border-radius: 8px; font-size:11px; font-weight: 600; color: var(--fg-2); }
.foot .legal { font-size: 11px; color: var(--fg-3); }
.foot .rg { display:flex; align-items:center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--b4w-orange); }
.foot .rg .age { padding: 2px 6px; border: 1.5px solid var(--b4w-orange); border-radius: 4px; }

/* ---- Modal ---- */
.scrim {
  position: fixed; inset: 0; background: rgba(10,10,10,0.7); backdrop-filter: blur(8px);
  display: grid; place-items: center; z-index: 50; padding: 24px;
  animation: fade-in 200ms var(--ease-out);
}
.modal {
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: 20px; padding: 32px; width: 100%; max-width: 420px;
  display:flex; flex-direction:column; gap: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
  animation: rise 280ms var(--ease-out);
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }
.modal h2 { font: 800 26px/1.05 var(--font-display); }
.modal p { font-size: 14px; color: var(--fg-2); }
.modal .field { display:flex; flex-direction: column; gap: 6px; }
.modal label { font: 600 11px/1 var(--font-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-3); }
.modal input {
  background: #1B1B1B; border: 1px solid rgba(255,255,255,0.10); color: #FFF;
  padding: 12px 14px; border-radius: 12px; font: 14px var(--font-body); outline:none;
}
.modal input:focus { border-color: var(--b4w-orange); }
.modal .close { position:absolute; top: 16px; right: 16px; background: none; border: none; color: var(--fg-3); cursor: pointer; font-size: 22px; }
.modal-wrap { position: relative; }

/* Toast */
.toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 100;
  background: var(--surface-3); border: 1px solid var(--b4w-win);
  color: var(--fg-1); padding: 12px 18px; border-radius: 12px;
  font-weight: 600; font-size: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  animation: rise 220ms var(--ease-out);
}
.toast b { color: var(--b4w-win); }
