/* ==========================================================================
   Stake - Static UI Mockup Stylesheet
   Pure CSS. No JavaScript is required anywhere on this page.
   ========================================================================== */

/* Palette below is sampled directly from Stake's own design-token CSS
   (slateNavy / boltBlue / dashGreen / crashRed scales) for an accurate match. */
:root {
  --bg-page: #0e202d;      /* slateNavy-900 */
  --bg-panel: #172b39;     /* slateNavy-850 */
  --bg-panel-alt: #213545; /* slateNavy-800 */
  --bg-hover: #3e586c;     /* slateNavy-650 */
  --border: #2a4151;       /* slateNavy-750 */
  --text-main: #ecf3f9;    /* slateNavy-50 */
  --text-muted: #a1bfd6;   /* slateNavy-250 */
  --text-faint: #7498b2;   /* slateNavy-400 */
  --accent-blue: #1475e1;  /* boltBlue-500 */
  --accent-blue-hover: #2383f4; /* boltBlue-450 */
  --accent-green: #00ca51; /* dashGreen-300 */
  --accent-red: #e9113c;   /* crashRed-500 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-content: 1320px;
  --header-height: 60px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-page);
  color: var(--text-main);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  /* Room for the fixed mobile bottom nav below 1024px; reset to 0 there. */
  padding-bottom: 64px;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

/* Every interactive element on this page is inert by design: buttons have
   type="button" with no handlers and links point to "#". They are safe to
   click anywhere without triggering navigation, scripts, or errors. */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background-color .15s ease, opacity .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent-blue); color: #fff; }
.btn-primary:hover { background: var(--accent-blue-hover); }
.btn-ghost { background: var(--bg-hover); color: #fff; }
.btn-ghost:hover { background: #3a5568; }
.btn-block { width: 100%; }
.btn-oauth {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-hover);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-oauth:hover { background: #3a5568; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-height);
  padding: 0 16px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
}
@media (min-width: 1024px) {
  .topbar { display: grid; grid-template-columns: 1fr auto 1fr; }
  .topbar-spacer { display: none; }
}
.topbar .hamburger {
  /* Replaced by the mobile bottom nav's "Browse" item below 1024px; the
     sidebar is always visible from 1024px up, so the hamburger has no
     destination to open at any width. Kept in the markup (unused) rather
     than removed, in case a future toggle needs it. */
  display: none;
}
.topbar .hamburger span {
  display: block;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
}
.topbar .logo { height: 26px; flex-shrink: 0; }
.topbar .logo img { height: 100%; max-width: 100%; filter: brightness(0) invert(1); }

.tabs {
  display: none;
  align-items: center;
  gap: 8px;
}
.tabs a {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-hover);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted);
}
.tabs a svg { width: 18px; height: 18px; }
.tabs a.active { color: #fff; }
.tabs a:hover { color: #fff; text-decoration: none; }

.topbar-spacer { flex: 1 1 auto; }
.topbar-zone-left { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; min-width: 0; }
.topbar-zone-right { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex: 1 1 0; min-width: 0; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-actions .btn { padding: 9px 18px; font-weight: 700; }

/* Small phones: tighten spacing so logo + Sign In + Register never overlap */
@media (max-width: 374.98px) {
  .topbar { padding: 0 10px; gap: 8px; }
  .topbar-zone-left { gap: 8px; }
  .topbar .logo { height: 20px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .btn { padding: 7px 10px; font-size: 12px; white-space: nowrap; }
}

/* ---------- Layout shell ---------- */
/* The shell itself spans the full viewport width so the sidebar can sit
   flush against the left edge (like the original). Only the main content
   area is width-capped and centered within the remaining space. */
.shell {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.sidebar {
  display: none;
  flex: 0 0 240px;
  padding: 20px 12px 20px 16px;
  position: sticky;
  top: var(--header-height);
  align-self: flex-start;
}
.sidebar ul, .browse-list-card ul { display: flex; flex-direction: column; gap: 2px; }
.sidebar a, .sidebar .side-item, .browse-list-card a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}
.sidebar a svg, .browse-list-card a svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar a .chevron, .browse-list-card a .chevron { margin-left: auto; }
.sidebar a:hover, .sidebar .side-item:hover, .browse-list-card a:hover { background: var(--bg-panel); color: #fff; text-decoration: none; }
.sidebar .divider { height: 1px; background: var(--border); margin: 10px 4px; }
.sidebar .chevron { opacity: .6; font-size: 11px; }

main.content { flex: 1 1 auto; min-width: 0; padding: 16px; display: flex; justify-content: center; }
.content-inner { width: 100%; max-width: 1080px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 460px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: #0b3a63 url('../img/hero-mobile.png') center/cover no-repeat;
  padding: 24px 16px 32px;
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.hero h1 {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.hero .or-continue { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.hero .oauth-row { display: flex; gap: 10px; }

/* ---------- Stat pills ---------- */
.stat-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.stat-pill {
  flex: 1 1 140px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
}
.stat-pill svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-muted); }
.stat-pill .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  margin-right: 4px;
}
.stat-pill .count { display: flex; align-items: center; color: var(--text-muted); font-weight: 600; margin-left: auto; font-size: 13px; }

/* ---------- Search ---------- */
.search-bar {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-faint);
  font-size: 14px;
}
.search-bar .kbd {
  margin-left: auto;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Section headers ---------- */
.section { margin-top: 30px; }
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 16px;
}
.section-header svg { flex-shrink: 0; color: var(--text-muted); }
.section-header .see-all {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------- Game grid ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.game-card { display: flex; flex-direction: column; color: inherit; text-decoration: none; cursor: pointer; }
.game-card .game-thumb {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-panel);
  aspect-ratio: 3 / 4;
}
.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.game-card .playing {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.game-card .playing .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  flex-shrink: 0;
}
.game-card .badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(15,33,46,.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-card .badge svg { width: 13px; height: 13px; }
.game-card .info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px;
  background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0));
  font-size: 12px;
  font-weight: 700;
}
.game-card .info .provider { display: block; font-size: 10px; font-weight: 600; color: var(--text-muted); margin-top: 2px; }

/* ---------- Sport grid ---------- */
.sport-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.sport-card {
  display: block;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bg-panel);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.sport-card img { width: 100%; height: 100%; object-fit: cover; }
.sport-card span {
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .02em;
  text-shadow: 0 2px 6px rgba(0,0,0,.6);
}

/* ---------- Load more ---------- */
.load-more {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
}

/* ---------- Promotions ---------- */
.promo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.promo-card {
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.promo-card .promo-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.promo-card .promo-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.promo-card .tag {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #0f212e;
  background: #fff;
  padding: 3px 8px;
  border-radius: 4px;
}
.promo-card .promo-body { padding: 12px 4px; }
.promo-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.promo-card p { font-size: 13px; color: var(--text-muted); }

/* ---------- Bets board ---------- */
.bets-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-panel);
  padding: 4px;
  border-radius: var(--radius-md);
  width: fit-content;
  margin-bottom: 14px;
}
.bets-tabs button {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}
.bets-tabs button.active { background: var(--bg-hover); color: #fff; }

.bets-table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
table.bets-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 13px; }
table.bets-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-faint);
  padding: 10px 14px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.bets-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.bets-table tbody tr:nth-child(even) { background: rgba(255,255,255,.02); }
table.bets-table .game-cell { display: flex; align-items: center; gap: 8px; font-weight: 600; }
table.bets-table .user-cell { display: flex; align-items: center; gap: 6px; color: var(--text-muted); }
.payout-pos { color: var(--accent-green); font-weight: 700; }
.payout-neg { color: var(--accent-red); font-weight: 700; }
.currency-dot {
  width: 16px; height: 16px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; flex-shrink: 0;
}

/* ---------- Footer ---------- */
footer {
  margin-top: 40px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  padding: 32px 16px;
}
.footer-inner { max-width: var(--max-content); margin: 0 auto; }
.footer-cols {
  display: grid;
  grid-template-columns: 1fr;
}

/* Mobile: collapsible accordion columns, built with a plain checkbox +
   label - zero JavaScript, cannot fail or crash. Tap a heading to
   expand/collapse it, exactly like the original site on small screens.
   (A native <details> element was tried first, but some browsers hide its
   closed content via an internal content-visibility mechanism that plain
   CSS cannot override, which broke the "always expanded on desktop" rule
   below. This checkbox approach stays fully under our own CSS control.) */
.footer-col { border-bottom: 1px solid var(--border); }
.footer-toggle { position: absolute; opacity: 0; pointer-events: none; }
.footer-col label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 16px 2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}
.footer-col label::after {
  content: '';
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform .15s ease;
  flex-shrink: 0;
}
.footer-toggle:checked + label::after { transform: rotate(-135deg); }
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 2px 0;
  max-height: 0;
  overflow: hidden;
}
.footer-toggle:checked ~ ul { padding-bottom: 18px; max-height: 600px; }
.footer-col a { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.footer-col a:hover { color: #fff; text-decoration: underline; }

.footer-social {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.footer-social a svg { width: 15px; height: 15px; }
.footer-social a:hover { color: #fff; text-decoration: none; }

.footer-divider {
  max-width: var(--max-content);
  margin: 24px auto 0;
  border: none;
  border-top: 1px solid var(--border);
}

.footer-legal { text-align: center; font-size: 12px; color: var(--text-muted); padding-top: 24px; }
.footer-legal p { margin-bottom: 14px; }
.footer-legal a { color: var(--text-muted); text-decoration: underline; }

.footer-rate { text-align: center; font-size: 12px; color: var(--text-muted); margin: 18px 0; }

.lang-select {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 28px;
  width: 150px;
  background: var(--bg-hover);
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.footer-logo { display: flex; justify-content: center; margin-bottom: 24px; }
.footer-logo img { height: 26px; filter: brightness(0) invert(1); }

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
}
.footer-badges img { height: 44px; width: auto; }
.badge-gcb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 2px solid #00c04a;
  border-radius: 6px;
  padding: 6px 14px;
  color: #00c04a;
}
.badge-gcb strong { font-size: 15px; font-weight: 900; letter-spacing: .03em; }
.badge-gcb span { font-size: 8px; font-weight: 700; letter-spacing: .02em; }

.footer-bottom-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0;
}

/* ==========================================================================
   Responsive breakpoints
   ========================================================================== */

/* Tablet and up */
@media (min-width: 768px) {
  .hero { background-image: url('../img/hero-tablet.png'); min-height: 320px; align-items: center; padding: 32px 16px; }
  .game-grid { grid-template-columns: repeat(4, 1fr); }
  .sport-grid { grid-template-columns: repeat(4, 1fr); }
  .promo-grid { grid-template-columns: repeat(2, 1fr); }

  /* From tablet up, footer columns are always fully expanded (matching the
     desktop layout) rather than collapsible. The <details> element still
     works fine underneath - we just override its default closed styling
     with plain CSS, no scripting involved. */
  .footer-cols { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .footer-col { border-bottom: none; }
  .footer-col label { pointer-events: none; padding: 0 0 12px; font-size: 13px; }
  .footer-col label::after { display: none; }
  .footer-col ul { max-height: none; overflow: visible; padding: 0 !important; }
}

/* Desktop: sidebar appears, header changes, hero variant swaps */
@media (min-width: 1024px) {
  .tabs { display: flex; }
  .sidebar { display: block; }
  main.content { padding: 24px; }
  .mobile-nav { display: none !important; }
  body { padding-bottom: 0; }

  .hero {
    background-image: url('../img/hero-desktop.png');
    min-height: 340px;
    justify-content: center;
    padding: 40px 60px;
  }
  .hero-inner { align-items: center; text-align: center; max-width: 420px; }
  .hero h1 { font-size: 34px; }

  .stat-row { flex-wrap: nowrap; }

  .game-grid { grid-template-columns: repeat(8, 1fr); }
  .sport-grid { grid-template-columns: repeat(8, 1fr); }
  .promo-grid { grid-template-columns: repeat(3, 1fr); }

  .footer-cols { display: flex; flex-wrap: wrap; gap: 28px 56px; }
  .footer-col { flex: 0 0 140px; }
  .footer-col label { font-size: 14px; }
}

@media (min-width: 480px) and (max-width: 767.98px) {
  .footer-cols { grid-template-columns: repeat(2, 1fr); column-gap: 24px; }
}

/* ---------- Mobile bottom nav (below 1024px) ---------- */
.mobile-nav {
  display: flex;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  padding: 6px 4px;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
}
.mobile-nav-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 2px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}
.mobile-nav-item svg { width: 20px; height: 20px; }
.mobile-nav-item:hover, .mobile-nav-item.active { color: #fff; text-decoration: none; }

/* ---------- Browse menu (mobile/tablet): pure CSS via :target ---------- */
.modal-overlay.browse-overlay {
  background: var(--bg-page);
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 16px;
}
.browse-panel { width: 100%; max-width: 480px; margin: 0 auto; }
.browse-search-row { display: flex; align-items: center; gap: 12px; }
.browse-search-row .search-bar { flex: 1 1 auto; margin-top: 0; }
.browse-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--text-muted);
}
.browse-close:hover { color: #fff; text-decoration: none; }
.browse-tabs { display: flex; gap: 10px; margin-top: 16px; }
.browse-tab {
  flex: 1 1 0;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--bg-hover);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
}
.browse-tab:hover { text-decoration: none; }
.browse-tab.active { background: var(--bg-panel-alt); color: #fff; }
.browse-list-card {
  background: var(--bg-panel-alt);
  border-radius: var(--radius-lg);
  padding: 6px;
  margin-top: 16px;
}

@media (min-width: 1024px) {
  .browse-overlay { display: none !important; }
}

/* ---------- WhatsApp floating button ---------- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
  z-index: 1000;
  transition: transform .15s ease, box-shadow .15s ease;
}
@media (max-width: 1023.98px) {
  .whatsapp-float { bottom: 76px; }
}
.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45);
}

/* ---------- Login-required modal (pure CSS, opened via :target) ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.modal-overlay:target { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .7);
}
.modal-box {
  position: relative;
  width: 90%;
  max-width: 340px;
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  padding: 28px 24px 24px;
  text-align: center;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  text-decoration: none;
}
.modal-close:hover { color: #fff; }
.modal-box h3 { font-size: 18px; margin-bottom: 10px; }
.modal-box p { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }


