/* ============================================================
   ZKNbet — Design System v4 (95H.com Reference Overhaul)
   Complete visual redesign: deep navy-black, gold/teal accents,
   portrait game cards, raised center medallion bottom nav
   ============================================================ */
:root {
  /* ── Core palette ── */
  --bg-0: #090f1f;
  --bg-1: #0e1424;
  --bg-2: #161616;
  --bg-3: #1c1c1c;
  --bg-card: #222222;
  --bg-elevated: #262626;
  --bg-input: #1a1a1a;

  /* ── Borders ── */
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.10);
  --border-gold: rgba(244, 232, 58, 0.30);

  /* ── Text ── */
  --text: #f0f2f5;
  --text-muted: #9ca3af;
  --text-dim: #4b5563;

  /* ── Accent: Gold / Yellow ── */
  --gold: #f4e83a;
  --gold-2: #f5d020;
  --gold-hover: #e0d018;
  --gold-dark: #0a0a00;

  /* ── Accent: Teal / Mint CTA ── */
  --teal: #28e5b8;
  --teal-hover: #1fc9a1;
  --teal-glow: rgba(40, 229, 184, 0.35);

  /* ── Accent: Green (jackpot/emerald) ── */
  --green: #10b981;
  --green-hover: #0d9668;
  --green-jackpot: #22c55e;

  /* ── Other accents ── */
  --red: #ef4444;
  --blue: #3b82f6;
  --purple: #8b5cf6;

  /* ── Gradients ── */
  --grad-gold: linear-gradient(135deg, #f4e83a 0%, #f5d020 100%);
  --grad-green: linear-gradient(135deg, #10b981 0%, #0d9668 100%);
  --grad-teal: linear-gradient(135deg, #28e5b8 0%, #1fc9a1 100%);
  --grad-dark: linear-gradient(180deg, #161616 0%, #090f1f 100%);
  --grad-card: linear-gradient(180deg, #1c1c1c 0%, #161616 100%);

  /* ── Radii ── */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* ── Shadows ── */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 0 20px rgba(244, 232, 58, 0.20);
  --shadow-teal: 0 0 20px rgba(40, 229, 184, 0.20);

  /* ── Transitions ── */
  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Typography ── */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Sora', 'Inter', sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% -10%, rgba(244, 232, 58, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 110%, rgba(40, 229, 184, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ============================================================
   HEADER — sticky with backdrop blur
   ============================================================ */
.zkn-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  background: rgba(9, 15, 31, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.zkn-header-inner {
  max-width: 480px;
  margin: 0 auto;
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.zkn-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.6px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.zkn-logo .z {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.zkn-logo .rest { color: var(--text); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.zkn-nav { display: flex; gap: 4px; align-items: center; flex-wrap: nowrap; }
.zkn-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  position: relative;
}
.zkn-nav a:hover { background: var(--bg-3); color: var(--text); }
.zkn-nav a.active { color: var(--gold); background: rgba(244, 232, 58, 0.08); }
.nav-badge {
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.zkn-header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.balance-chip {
  background: var(--bg-2);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition);
  cursor: pointer;
}
.balance-chip:hover { background: var(--bg-3); box-shadow: var(--shadow-gold); }
.balance-chip .value { color: var(--gold); font-variant-numeric: tabular-nums; }

.btn-header {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition);
  background: var(--gold);
  color: var(--gold-dark);
}
.btn-header:hover { transform: translateY(-1px); box-shadow: var(--shadow-gold); }
.btn-header.ghost { background: transparent; border: 1px solid var(--border-strong); color: var(--text); }
.btn-header.ghost:hover { background: var(--bg-3); }

/* ============================================================
   BUTTONS / INPUTS
   ============================================================ */
.btn-primary {
  padding: 14px 28px;
  background: var(--gold);
  color: var(--gold-dark);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 800;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.2px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-gold); }

.btn-cta {
  padding: 14px 28px;
  background: var(--teal);
  color: #0a0a0a;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 800;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-teal); }

.btn-secondary {
  padding: 14px 28px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-secondary:hover { background: var(--bg-3); border-color: var(--border-gold); }

label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  margin-top: 16px;
  font-weight: 500;
}
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
input:focus, textarea:focus, select:focus { border-color: var(--border-focus, var(--gold)); }
input::placeholder, textarea::placeholder { color: var(--text-dim); }
textarea { resize: none; font-family: 'Courier New', monospace; font-size: 12px; line-height: 1.4; }

/* ============================================================
   SECTIONS — mobile-first single-column shell
   ============================================================ */
.section {
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 16px;
  position: relative;
  z-index: 1;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  width: 4px; height: 22px;
  background: var(--grad-gold);
  border-radius: 2px;
}
.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.section-link:hover { gap: 8px; }

/* ============================================================
   WINNERS TICKER
   ============================================================ */
.winners-ticker {
  background: linear-gradient(90deg, var(--bg-0) 0%, var(--bg-2) 50%, var(--bg-0) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  overflow: hidden;
  position: relative;
}
.winners-ticker::before,
.winners-ticker::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}
.winners-ticker::before { left: 0; background: linear-gradient(90deg, var(--bg-0), transparent); }
.winners-ticker::after { right: 0; background: linear-gradient(-90deg, var(--bg-0), transparent); }
.winners-track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: scrollTicker 40s linear infinite;
  width: max-content;
}
@keyframes scrollTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.winner-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.winner-name { color: var(--text); font-weight: 600; }
.winner-game { color: var(--text-muted); font-size: 12px; }
.winner-amount {
  background: var(--grad-green);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   GAME GRID — 4-column portrait cards (3:4 ratio)
   ============================================================ */
.games-carousel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
}
.game-card-cover {
  aspect-ratio: 3 / 4;
  background: var(--grad-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  color: var(--gold);
  position: relative;
  overflow: hidden;
}
.game-card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
}
.game-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.game-card:hover .game-card-cover img { transform: scale(1.06); }

/* Provider tag overlay */
.game-card-provider-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  z-index: 3;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(9, 15, 31, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: fit-content;
  max-width: calc(100% - 12px);
  pointer-events: none;
}

/* Translucent dark glass favorite button */
.game-card-fav {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border-radius: 50% !important;
  border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
  background: rgba(0, 0, 0, 0.50) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 16px !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10 !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  padding: 0 !important;
  font-family: inherit !important;
  -webkit-tap-highlight-color: transparent !important;
}

.game-card-fav:hover {
  background: rgba(244, 232, 58, 0.20) !important;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  transform: scale(1.1) !important;
}

.game-card-fav.active {
  color: var(--gold) !important;
  background: rgba(244, 232, 58, 0.20) !important;
  border-color: var(--gold) !important;
  box-shadow: 0 0 12px rgba(244, 232, 58, 0.4) !important;
}

.game-card-fav.active:hover {
  color: var(--gold-2) !important;
  transform: scale(1.1) !important;
}

.game-card-fav:active {
  transform: scale(0.9) !important;
}

.game-card-fav:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}
.game-card-fav svg {
  width: 15px;
  height: 15px;
  display: block;
}

.game-card-play {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  z-index: 2;
}
.game-card:hover .game-card-play { opacity: 1; }
.game-card-play .play-btn {
  width: 44px; height: 44px;
  background: var(--grad-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-dark);
  font-size: 18px;
  box-shadow: 0 4px 20px rgba(244, 232, 58, 0.5);
}
.game-card-play .play-btn svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}
.game-card-info { padding: 8px 10px; }
.game-card-name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.game-card-provider {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ============================================================
   PROVIDERS / PROVIDER TABS
   ============================================================ */
.providers-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.providers-strip::-webkit-scrollbar { display: none; }
.provider-chip {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.provider-chip:hover {
  border-color: var(--border-gold);
  background: var(--bg-3);
  transform: translateY(-2px);
}

/* ============================================================
   FILTERS
   ============================================================ */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar button {
  width: auto;
  padding: 8px 14px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.filter-bar button:hover { color: var(--text); border-color: var(--border-gold); }
.filter-bar button.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--gold-dark);
}

/* ============================================================
   GENERIC CARD (deposit/withdrawal/forms)
   ============================================================ */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}
.card h1 {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 4px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.card .subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }

/* Quick values (deposit) */
.quick-valores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.quick-valores button {
  background: var(--bg-3);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
  font-weight: 700;
  font-size: 14px;
  transition: var(--transition);
}
.quick-valores button:hover,
.quick-valores button.active {
  border-color: var(--gold);
  background: rgba(244, 232, 58, 0.08);
  color: var(--gold);
}

/* QR / copy-paste (deposit) */
.qr-block { display: none; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--border); }
.qr-block.active { display: block; }
.qr-frame { background: #fff; padding: 16px; border-radius: 14px; display: inline-block; box-shadow: 0 8px 40px rgba(244, 232, 58, 0.15); }
.qr-wrap { text-align: center; }
.timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(244, 232, 58, 0.08);
  color: var(--gold);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  margin-top: 16px;
}
.copia-cola { display: flex; gap: 8px; margin-top: 16px; }
.copia-cola input {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: 'Courier New', monospace;
  font-size: 13px;
  outline: none;
}
.copia-cola button {
  background: var(--gold);
  color: var(--gold-dark);
  border: none;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 13px;
  transition: var(--transition);
  white-space: nowrap;
}
.copia-cola button:hover { box-shadow: var(--shadow-gold); }

/* Status boxes */
.status-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: none;
  text-align: center;
  line-height: 1.5;
}
.status-box.active { display: block; }
.status-box.pending { background: rgba(244, 232, 58, 0.08); color: var(--gold); border: 1px solid rgba(244, 232, 58, 0.25); }
.status-box.success { background: rgba(16, 185, 129, 0.08); color: var(--green); border: 1px solid rgba(16, 185, 129, 0.25); }
.status-box.error { background: rgba(239, 68, 68, 0.08); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.25); }

.progress-bar { height: 4px; background: var(--bg-3); border-radius: 2px; overflow: hidden; margin-top: 12px; }
.progress-bar-fill { height: 100%; background: var(--grad-gold); width: 0%; transition: width 0.3s; }

/* Page wraps for deposit/withdrawal */
.deposito-wrap, .saque-wrap {
  max-width: 480px;
  margin: 32px auto;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}
.saldo-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.saldo-info .label { color: var(--text-muted); font-size: 13px; font-weight: 600; margin: 0; }
.saldo-info .val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
}

/* ============================================================
   SPINNER
   ============================================================ */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   BADGE MOCK
   ============================================================ */
.badge-mock {
  display: inline-block;
  background: rgba(244, 232, 58, 0.12);
  color: var(--gold);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 600;
  vertical-align: middle;
}

/* ============================================================
   REFERRAL / INDICACAO
   ============================================================ */
.ref-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 16px;
  position: relative;
  z-index: 1;
}
.ref-hero {
  background: var(--grad-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
/* Pure CSS decorative element replacing emoji */
.ref-hero::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(244, 232, 58, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.ref-hero h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.ref-hero p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.ref-link-box {
  display: flex;
  gap: 10px;
  background: var(--bg-0);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px;
  align-items: center;
  margin-bottom: 16px;
}
.ref-link-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'Courier New', monospace;
  font-size: 14px;
  padding: 8px 12px;
  min-width: 0;
}
.ref-link-box button {
  background: var(--gold);
  color: var(--gold-dark);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-xs);
  font-weight: 800;
  font-size: 13px;
  transition: var(--transition);
  white-space: nowrap;
}
.ref-link-box button:hover { box-shadow: var(--shadow-gold); }

.ref-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.ref-stat {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.ref-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--grad-gold);
}
.ref-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.ref-stat-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.ref-stat-value.gold { color: var(--gold); }
.ref-stat-value.green { color: var(--green); }

.ref-share { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.ref-share-btn {
  padding: 12px 20px;
  background: var(--bg-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.ref-share-btn:hover { background: var(--bg-2); border-color: var(--border-gold); }

.ref-table-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ref-table { width: 100%; border-collapse: collapse; }
.ref-table th {
  background: var(--bg-3);
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.ref-table td {
  padding: 14px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.ref-table tr:last-child td { border-bottom: none; }
.ref-table tr:hover td { background: rgba(244, 232, 58, 0.03); }
.ref-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--grad-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-dark);
  font-weight: 800;
  font-size: 12px;
  margin-right: 10px;
  vertical-align: middle;
}
.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.status-pill.active { background: rgba(16, 185, 129, 0.12); color: var(--green); }
.status-pill.pending { background: rgba(244, 232, 58, 0.12); color: var(--gold); }
.status-pill.processing { background: rgba(59, 130, 246, 0.12); color: var(--blue); }
.status-pill.expired { background: rgba(156, 163, 175, 0.12); color: var(--text-muted); }
.status-pill.rejected { background: rgba(239, 68, 68, 0.12); color: var(--red); }

/* ============================================================
   TOASTS
   ============================================================ */
.toast-container {
  position: fixed;
  top: 76px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
}
.toast {
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  animation: slideIn 0.25s ease-out;
}
.toast.error { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--gold); }
.toast-title { font-weight: 800; font-size: 14px; margin-bottom: 3px; }
.toast-body { font-size: 13px; color: var(--text-muted); line-height: 1.4; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============================================================
   PAGINATION / LOADING
   ============================================================ */
.loading {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.zkn-footer {
  border-top: 1px solid var(--border);
  padding: 32px 16px 28px;
  margin-top: 40px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.zkn-footer-inner { max-width: 480px; margin: 0 auto; }
.zkn-footer p { color: var(--text-muted); font-size: 12px; }
.zkn-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-bottom: 14px;
}
.zkn-footer-links a {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  transition: color var(--transition);
}
.zkn-footer-links a:hover { color: var(--gold); }
.zkn-footer .disclaimer {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.6;
}
.zkn-footer-badge-18 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: var(--red);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 800;
  margin-right: 6px;
}

/* ============================================================
   RESPONSIVE — desktop nav hide
   ============================================================ */
@media (max-width: 900px) {
  .zkn-nav { display: none; }
}

/* ============================================================
   SUBMIT BUTTONS (fallback)
   ============================================================ */
button.btn-submit,
button#btnGerar,
button#btnSaque {
  width: 100%;
  padding: 16px;
  margin-top: 24px;
  background: var(--gold);
  color: var(--gold-dark);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
  transition: var(--transition);
}
button.btn-submit:hover,
button#btnGerar:hover,
button#btnSaque:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}
button.btn-submit:disabled,
button#btnGerar:disabled,
button#btnSaque:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ============================================================
   AUTH (login/signup/PIN)
   ============================================================ */
.auth-wrap {
  max-width: 460px;
  margin: 32px auto;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}
.auth-card { max-width: none; width: 100%; }
.auth-alt {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}
.auth-alt a { color: var(--gold); font-weight: 700; }

.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  transition: color var(--transition);
}

.btn-block {
  width: 100%;
  justify-content: center;
  margin-top: 24px;
  padding: 15px;
  font-size: 15px;
}

/* ============================================================
   HAMBURGER MENU + SIDE DRAWER
   ============================================================ */
.menu-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-strong);
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition);
  margin-right: 4px;
}
.menu-toggle:hover { background: var(--bg-3); border-color: var(--border-gold); }
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: var(--transition);
}

/* Backdrop */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 998;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

/* Drawer */
.drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: linear-gradient(180deg, #1c1c1c 0%, #090f1f 100%);
  border-right: 1px solid var(--border-gold);
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.6);
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.drawer-close {
  width: 34px; height: 34px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
}
.drawer-close:hover { color: var(--text); border-color: var(--border-gold); }

.drawer-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.drawer-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--grad-gold);
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}
.drawer-user-info { min-width: 0; }
.drawer-user-name {
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer-user-phone { color: var(--text-muted); font-size: 12px; }

.drawer-nav { flex: 1; padding: 8px 0; }
.drawer-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 14px 18px 6px;
}
.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  border-left: 2px solid transparent;
  text-align: left;
  width: 100%;
  background: transparent;
  border-right: none;
  border-top: none;
  border-bottom: none;
  cursor: pointer;
  font-family: inherit;
}
.drawer-link:hover {
  background: rgba(244, 232, 58, 0.04);
  color: var(--text);
  border-left-color: var(--gold);
}
.drawer-link-btn { border-left: 2px solid transparent; }

.drawer-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-btn {
  width: 100%;
  padding: 11px;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: var(--gold-dark);
  border: none;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}
.drawer-btn:hover { box-shadow: var(--shadow-gold); }
.drawer-btn.ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}

body.drawer-open { overflow: hidden; }

@media (max-width: 900px) {
  .zkn-nav { display: none; }
}

/* ============================================================
   MOBILE RESPONSIVE — compact layout
   ============================================================ */
@media (max-width: 640px) {
  .zkn-header { height: 56px; }
  .zkn-header-inner { padding: 0 12px; gap: 8px; }
  .zkn-logo { font-size: 18px; }
  .balance-chip { padding: 6px 10px; font-size: 12px; min-height: 34px; }
  .btn-header { padding: 7px 12px; font-size: 12px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
  .section { padding: 14px 12px; }
  .section-header { margin-bottom: 10px; }
  .section-title { font-size: 17px; }
  .quick-valores { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 18px 16px; }
  .auth-wrap { margin: 16px auto 28px; padding: 0 12px; }
  .ref-container { padding: 14px 12px; }
  .ref-hero { padding: 16px; }
  .ref-hero h1 { font-size: 20px; }
  .ref-link-box { flex-direction: column; }
  .ref-link-box button { width: 100%; }
  .ref-table { font-size: 12px; }
  .ref-table th, .ref-table td { padding: 10px 12px; }
  .deposito-wrap, .saque-wrap { margin: 14px auto; padding: 0 12px; }
  .toast-container { left: 12px; right: 12px; max-width: none; }
  .zkn-footer { margin-top: 24px; padding: 20px 12px 24px; }
  .zkn-footer-links { gap: 4px 10px; margin-bottom: 10px; }
  .zkn-footer-links a { padding: 5px 6px; display: inline-flex; align-items: center; }
}

/* ============================================================
   MOBILE 4-PER-ROW: 4 portrait cards on mobile
   ============================================================ */
@media (max-width: 640px) {
  .games-carousel {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }

  .game-card-info {
    padding: 5px 5px 6px !important;
  }

  .game-card-name {
    font-size: 10px !important;
    line-height: 1.2 !important;
    margin-bottom: 0 !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 24px;
  }

  .game-card-provider {
    display: none !important;
  }

  .game-card-cover {
    font-size: 20px !important;
  }

  .game-card-play .play-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 380px) {
  .games-carousel {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
  }

  .game-card-name {
    font-size: 9px !important;
    min-height: 22px;
  }
}

/* ============================================================
   BALANCE REFRESH BUTTON
   ============================================================ */
.balance-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.balance-refresh:hover {
  background: var(--bg-3);
  border-color: var(--border-gold);
  color: var(--gold);
}
.balance-refresh:active {
  transform: scale(0.92);
}
.balance-refresh svg {
  width: 14px;
  height: 14px;
  transition: transform 0.4s ease;
}
.balance-refresh.loading svg {
  animation: spinRefresh 0.8s linear infinite;
}
@keyframes spinRefresh {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .balance-refresh {
    width: 26px;
    height: 26px;
  }
  .balance-refresh svg {
    width: 12px;
    height: 12px;
  }
}

/* ============================================================
   MOBILE FAV BUTTON RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .game-card-fav {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    font-size: 15px !important;
    top: 5px !important;
    right: 5px !important;
  }
}

@media (max-width: 480px) {
  .game-card-fav {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    font-size: 13px !important;
    top: 4px !important;
    right: 4px !important;
    border-width: 1px !important;
  }
  .game-card-fav::before {
    content: '';
    position: absolute;
    inset: -7px;
  }
  .game-card-fav svg {
    width: 12px !important;
    height: 12px !important;
  }
  .game-card-provider-tag {
    font-size: 7.5px;
    padding: 2px 5px;
    top: 4px;
    bottom: auto;
    left: 4px;
    right: auto;
    max-width: calc(100% - 36px);
  }
}

@media (max-width: 480px) {
  .game-card-fav:hover {
    transform: none !important;
  }
  .game-card-fav.active {
    box-shadow: 0 0 8px rgba(244, 232, 58, 0.3) !important;
  }
}

/* ============================================================
   MOBILE PERFORMANCE — reduce heavy repaints without losing blur
   ============================================================ */
@media (max-width: 768px) {
  .zkn-header {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    background: rgba(9, 15, 31, 0.93);
  }

  .bottom-nav {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    background: rgba(20, 20, 25, 0.95);
  }

  .drawer-backdrop {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(0, 0, 0, 0.78) !important;
  }

  .games-carousel > .game-card {
    contain: layout style paint;
    content-visibility: auto;
    contain-intrinsic-size: 86px 140px;
  }

  .game-card-provider-tag {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(9, 15, 31, 0.84);
  }

  .game-card-fav {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(9, 15, 31, 0.74) !important;
  }

  .game-card:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .game-card:hover .game-card-cover img {
    transform: none !important;
  }

  .winners-track {
    animation-duration: 60s !important;
    will-change: transform;
  }
}

@media (max-width: 768px) {
  .winners-ticker {
    padding: 10px 0;
  }

  .winner-item {
    font-size: 12px;
  }

  .winner-game {
    display: none;
  }
}

@media (max-width: 480px) {
  .winners-track {
    animation-duration: 50s !important;
    gap: 24px !important;
    will-change: transform;
  }
}

/* ============================================================
   BONUS CHIP + MODAL
   ============================================================ */
.bonus-chip:hover {
  background: linear-gradient(135deg, rgba(244, 232, 58, 0.20), rgba(245, 208, 32, 0.12));
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(244, 232, 58, 0.3);
}

@keyframes bonus-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(244, 232, 58, 0.15); }
  50% { box-shadow: 0 0 14px rgba(244, 232, 58, 0.4); }
}

.bonus-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.bonus-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.bonus-modal {
  background: var(--bg-1);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.bonus-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.bonus-modal-header h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
}

.bonus-modal-close {
  width: 34px;
  height: 34px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.bonus-modal-close:hover {
  color: var(--text);
  border-color: var(--border-gold);
}

.bonus-modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bonus-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.bonus-item:hover {
  border-color: var(--border-gold);
}

.bonus-item-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.bonus-item-info {
  flex: 1;
  min-width: 0;
}

.bonus-item-title {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 3px;
}

.bonus-item-sub {
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 2px;
}

.bonus-item-exp {
  font-size: 11px;
  color: var(--text-muted);
}

.bonus-btn {
  padding: 9px 16px;
  background: var(--gold);
  color: var(--gold-dark);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.bonus-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.bonus-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.bonus-btn.claimed {
  background: var(--grad-green);
  color: white;
}

.bonus-btn.expired {
  background: var(--bg-3);
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .bonus-chip {
    padding: 6px 10px;
    font-size: 12px;
    margin-left: 4px;
  }
  .bonus-chip span:not(.emoji) {
    display: none;
  }
}

/* ============================================================
   GAME MODAL — fullscreen iframe
   ============================================================ */
.game-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg-0);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.game-main {
  contain: layout style;
  flex: 1;
  position: relative;
  background: #000;
  overflow: hidden;
}

.game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Floating menu */
.game-floating-menu {
  transition: opacity 0.2s ease;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(9, 15, 31, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(244, 232, 58, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.game-float-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(244, 232, 58, 0.08);
  border: 1px solid rgba(244, 232, 58, 0.25);
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  padding: 10px;
}

.game-float-btn:hover {
  background: rgba(244, 232, 58, 0.20);
  border-color: var(--gold);
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(244, 232, 58, 0.3);
}

.game-float-btn:active {
  transform: scale(0.95);
}

.game-float-btn svg {
  width: 20px;
  height: 20px;
}

.game-float-close {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--red);
  margin-top: 4px;
}

.game-float-close:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: var(--red);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.game-menu-back {
  top: 50%;
}

.game-float-back {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--green);
}

.game-float-back:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: var(--green);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

/* Loading */
.game-loading {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 5;
  transition: opacity 0.3s ease;
}

.game-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.game-loading-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid rgba(244, 232, 58, 0.12);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: gm-spin 0.9s linear infinite;
}

@keyframes gm-spin {
  to { transform: rotate(360deg); }
}

.game-loading-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  text-align: center;
  padding: 0 20px;
}

.game-loading-sub {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  min-height: 20px;
}

.game-loading-retry,
.game-loading-newtab {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  border: none;
  margin-top: 8px;
}

.game-loading-retry {
  background: var(--gold);
  color: var(--gold-dark);
}

.game-loading-newtab {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hidden { display: none !important; }

/* Mobile game modal */
@media (max-width: 768px) {
  .game-floating-menu {
    transition: opacity 0.2s ease;
    right: 8px;
    top: 50%;
    padding: 6px;
    gap: 6px;
    border-radius: 12px;
  }
  .game-float-btn {
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 8px;
  }
  .game-float-btn svg {
    width: 18px;
    height: 18px;
  }
  .game-loading-text {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .game-floating-menu {
    transition: opacity 0.2s ease;
    right: 6px;
    padding: 5px;
    gap: 5px;
  }
  .game-float-btn {
    width: 36px;
    height: 36px;
    padding: 7px;
  }
  .game-float-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* Balance animation */
@keyframes saldo-pulse { 0%{transform:scale(1);color:inherit} 40%{transform:scale(1.15);color:var(--gold-2);text-shadow:0 0 20px rgba(245,208,32,0.8)} 100%{transform:scale(1);color:inherit} }
@keyframes saldo-glow { 0%,100%{box-shadow:0 0 0 rgba(244,232,58,0)} 50%{box-shadow:0 0 20px rgba(244,232,58,0.5)} }
.saldo-atualizado { animation: saldo-pulse 0.6s ease-out; }
.balance-chip.saldo-atualizado { animation: saldo-glow 0.8s ease-out; }

/* ============================================================
   PASSWORD EYE TOGGLE
   ============================================================ */
.zkn-pass-wrap {
  position: relative !important;
  width: 100% !important;
  display: block !important;
}
.zkn-pass-wrap input {
  padding-right: 45px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.zkn-eye-toggle {
  position: absolute !important;
  right: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  color: var(--text-muted) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 10 !important;
}
.zkn-eye-toggle:hover {
  color: var(--gold) !important;
}
.zkn-eye-toggle svg {
  width: 20px !important;
  height: 20px !important;
}

/* ============================================================
   GAME MODAL EXTRAS (balance, collapsible)
   ============================================================ */
.game-floating-menu.collapsed .game-float-collapsible {
  display: none !important;
}
.game-floating-menu.collapsed {
  padding: 5px;
  gap: 0;
  opacity: 0.78;
}
.game-float-balance {
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  background: rgba(244, 232, 58, 0.08);
  border: 1px solid rgba(244, 232, 58, 0.25);
  border-radius: 8px;
  padding: 4px 6px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* ============================================================
   BANNER CAROUSEL
   ============================================================ */
#carrosselBanners {
  width: 100%;
  max-width: 480px;
  margin: 12px auto 0;
  padding: 0 12px;
  box-sizing: border-box;
}
.carrossel-wrapper {
  max-width: 480px;
  margin: 0 auto;
  aspect-ratio: 2 / 1;
  background: var(--bg-2);
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
#carrosselTrack {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  height: 100%;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.5s ease;
}
#carrosselTrack > div {
  flex: 0 0 100%;
  min-width: 100%;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
#carrosselTrack img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* ============================================================
   CATALOG: search, categories, sorting
   ============================================================ */
.catalog-controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.search-box-wrapper {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.search-box-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px 10px 38px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  outline: none;
  min-height: 40px;
}
.search-box-input:focus {
  border-color: var(--gold);
}
.cat-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 18px 2px 0;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
}
.cat-pills::-webkit-scrollbar { display: none; }
.cat-pill {
  padding: 7px 13px;
  min-height: 34px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.cat-pill:hover {
  border-color: var(--border-gold);
  color: var(--text);
}
.cat-pill.active {
  background: var(--gold);
  color: var(--gold-dark);
  border-color: transparent;
  box-shadow: var(--shadow-gold);
}
.sort-select {
  width: auto;
  max-width: 138px;
  flex-shrink: 0;
  min-width: 0;
  min-height: 40px;
  padding: 9px 10px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

/* ============================================================
   ANNOUNCEMENT BAR & PROMO DISPLAY TYPOGRAPHY
   ============================================================ */
.announcement-bar {
  max-width: 480px;
  margin: 8px auto 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 7px 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.announcement-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  width: max-content;
  animation: scrollTicker 30s linear infinite;
}
.announcement-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.announcement-text .ico {
  color: var(--gold);
  font-size: 14px;
}

.promo-display {
  font-family: var(--font-display);
  font-weight: 900;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
  letter-spacing: -0.4px;
}
.jackpot-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: var(--green-jackpot);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   PROVIDER PILLS & PROGRESSIVE DISCLOSURE
   ============================================================ */
.provider-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 18px 2px 0;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
}
.provider-pills::-webkit-scrollbar { display: none; }
.provider-pill {
  padding: 6px 12px;
  min-height: 32px;
  border-radius: 999px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.provider-pill:hover {
  border-color: var(--border-gold);
  color: var(--text);
}
.provider-pill.active {
  background: var(--grad-gold);
  color: var(--gold-dark);
  border-color: transparent;
  box-shadow: var(--shadow-gold);
}

.games-counter,
.games-disclosure-count {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 16px;
}
.games-counter strong {
  color: var(--text);
}
.games-disclosure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.games-load-more,
.games-disclosure-btn {
  display: block;
  margin: 10px auto 0;
  padding: 11px 28px;
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.games-load-more:hover,
.games-disclosure-btn:hover {
  background: var(--gold);
  color: var(--gold-dark);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

/* ============================================================
   RTP BADGE on game cards
   ============================================================ */
.game-card-rtp {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(9, 15, 31, 0.78);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2px;
  pointer-events: none;
}
@media (max-width: 640px) {
  .game-card-rtp { display: none; }
}

/* ============================================================
   SKELETON LOADER
   ============================================================ */
.skeleton-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.skeleton-thumb {
  aspect-ratio: 3 / 4;
  background: linear-gradient(90deg, #161616 25%, #222222 50%, #161616 75%);
  background-size: 200% 100%;
  animation: zknShimmer 1.3s ease-in-out infinite;
}
.skeleton-line {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #161616 25%, #222222 50%, #161616 75%);
  background-size: 200% 100%;
  animation: zknShimmer 1.3s ease-in-out infinite;
  margin: 8px;
}
.skeleton-line.short { width: 55%; height: 8px; margin-top: 5px; }
@keyframes zknShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   DEPOSIT BONUS PREVIEW
   ============================================================ */
.deposito-bonus-preview {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  display: none;
}
.deposito-bonus-preview.visible {
  display: block;
}

/* ============================================================
   LEGAL / INSTITUTIONAL PAGES
   ============================================================ */
.legal-wrap {
  max-width: 480px;
  margin: 24px auto;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}
.legal-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
}
.legal-card h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 8px;
}
.legal-updated {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.legal-card h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 20px 0 8px;
}
.legal-card p, .legal-card li {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}
.legal-card ul {
  padding-left: 20px;
  margin: 8px 0 12px;
}

@media (max-width: 768px) {
  #carrosselBanners {
    margin-top: 8px;
    padding: 0 12px;
  }
  .carrossel-wrapper { border-radius: 10px; }
  .winners-ticker {
    margin: 8px 12px 0;
    padding: 7px 0;
    border-radius: 10px;
    border: 1px solid var(--border);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
  }
  .announcement-bar {
    margin: 6px 12px 0;
    border-radius: 10px;
    border: 1px solid var(--border);
  }
  .section-header { gap: 8px; }
  .section-title { font-size: 17px; }
  .zkn-footer { padding-bottom: 24px; }
  .legal-card { padding: 18px 14px; }
  .legal-card h1 { font-size: 20px; }
}

/* ============================================================
   BOTTOM NAVIGATION BAR — 95H.com Raised Medallion FAB
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(22, 22, 26, 0.94);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-top: 1px solid rgba(244, 232, 58, 0.24);
  border-radius: 20px 20px 0 0;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 6px 6px calc(8px + env(safe-area-inset-bottom));
  z-index: 9998;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.65);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  border-radius: 12px;
  position: relative;
  transition: var(--transition);
  background: transparent;
  border: none;
  cursor: pointer;
}

.bottom-nav-item:hover {
  color: var(--gold);
}

.bottom-nav-item.active {
  color: var(--gold);
}

.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 3px;
  background: var(--gold);
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(244, 232, 58, 0.6);
}

.bottom-nav-icon {
  width: 28px;
  height: 26px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition);
}

.bottom-nav-item.active .bottom-nav-icon {
  background: rgba(244, 232, 58, 0.12);
}

.bottom-nav-icon svg {
  width: 20px;
  height: 20px;
}

.bottom-nav-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-2);
  animation: badge-pulse 1.5s ease-in-out infinite;
  font-family: var(--font);
}

@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
}

/* Raised center circular medallion FAB */
.bottom-nav-fab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  text-decoration: none;
  margin-top: -24px;
  padding-bottom: 4px;
  cursor: pointer;
}

.bottom-nav-fab-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 180deg, #f4e83a, #f5d020, #fff4a3, #c9960c, #f4e83a);
  box-shadow:
    0 0 20px rgba(244, 232, 58, 0.55),
    0 0 36px rgba(245, 208, 32, 0.25),
    0 6px 16px rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  animation: fabGlow 2.8s ease-in-out infinite;
}

.bottom-nav-fab:hover .bottom-nav-fab-ring,
.bottom-nav-fab:active .bottom-nav-fab-ring {
  transform: translateY(-2px) scale(1.06);
  box-shadow:
    0 0 28px rgba(244, 232, 58, 0.75),
    0 8px 20px rgba(0, 0, 0, 0.8);
}

.bottom-nav-fab-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #fff59e 0%, #f4e83a 42%, #d49d04 100%);
  color: #090f1f;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.75),
    inset 0 -3px 5px rgba(0, 0, 0, 0.32);
}

.bottom-nav-fab-circle svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.3;
}

.bottom-nav-fab-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  margin-top: 3px;
  letter-spacing: 0.2px;
}

@keyframes fabGlow {
  0%, 100% {
    box-shadow:
      0 0 18px rgba(244, 232, 58, 0.48),
      0 6px 16px rgba(0, 0, 0, 0.75);
  }
  50% {
    box-shadow:
      0 0 28px rgba(244, 232, 58, 0.78),
      0 0 42px rgba(245, 208, 32, 0.35),
      0 6px 18px rgba(0, 0, 0, 0.8);
  }
}

body {
  padding-bottom: 102px;
}

/* ============================================================
   DESKTOP MAX-WIDTH EXPANSION (>900px)
   Keep <=900px as centered 480px mobile shell with bottom nav
   ============================================================ */
@media (min-width: 901px) {
  .bottom-nav { display: none !important; }
  body { padding-bottom: 0; }
  .section { max-width: 1280px; }
  .zkn-header-inner { max-width: 1280px; }
  .zkn-footer-inner { max-width: 1280px; }
  .ref-container { max-width: 1100px; }
  .games-carousel { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 14px; }
  .ref-stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .search-box-wrapper { max-width: 420px; flex-basis: 260px; }
  .sort-select { width: auto; min-width: 170px; }
  .legal-wrap { max-width: 880px; }
  #carrosselBanners { max-width: 1000px; }
  .carrossel-wrapper { max-width: 1280px; aspect-ratio: 3 / 1; }
  .announcement-bar { max-width: 1280px; }
}

/* ============================================================
   AGENCY & TREASURE CHESTS (95H.com Convidar / Baús)
   ============================================================ */
.ref-agency-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}
.ref-copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.ref-copy-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
}
.ref-copy-input {
  flex: 1;
  min-width: 0;
  background: var(--bg-0);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-family: 'Courier New', monospace;
  font-size: 12px;
  padding: 8px 10px;
}
.ref-copy-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
  background: rgba(244, 232, 58, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.ref-copy-btn:hover { background: var(--gold); color: var(--gold-dark); }

.ref-quick-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.ref-quick-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.ref-quick-scroll::-webkit-scrollbar { display: none; }
.ref-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  padding: 0;
}
.ref-quick-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease;
}
.ref-quick-btn:hover .ref-quick-circle { transform: translateY(-2px); }
.ref-quick-circle.wa { background: linear-gradient(135deg, #25d366, #128c7e); }
.ref-quick-circle.tg { background: linear-gradient(135deg, #2aabee, #229ed9); }
.ref-quick-circle.qr { background: linear-gradient(135deg, #f4e83a, #c9960c); color: #090f1f; }
.ref-quick-circle.copy { background: linear-gradient(135deg, #28e5b8, #0d9668); color: #090f1f; }
.ref-quick-circle.share { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }

.ref-sub-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ref-sub-text {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}
.ref-sub-num {
  color: var(--gold);
  font-weight: 800;
  margin: 0 2px;
}
.ref-sub-details {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Baús Card */
.chests-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  margin-bottom: 16px;
}
.chests-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.chests-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.chests-progress-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(244, 232, 58, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}
.chests-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 8px;
}
.chest-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px 2px 5px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease;
}
.chest-item:not(:nth-child(4n))::after {
  content: '>';
  position: absolute;
  right: -7px;
  top: 26px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 800;
  pointer-events: none;
}
.chest-graphic {
  position: relative;
  width: 72px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.chest-graphic svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.65));
}
.chest-ribbon {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 58px;
  max-width: 74px;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff3d33 0%, #c81010 55%, #8a0606 100%);
  border: 1.5px solid #ffd54f;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.chest-label {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.25;
  font-weight: 600;
}
.chest-label strong {
  color: var(--gold);
  font-weight: 800;
}
.chest-status-tag {
  margin-top: 3px;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.chest-item.locked .chest-graphic { opacity: 0.94; }
.chest-item.locked .chest-status-tag {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}
.chest-item.claimable {
  cursor: pointer;
  background: radial-gradient(circle at 50% 42%, rgba(244, 232, 58, 0.18) 0%, rgba(244, 232, 58, 0.03) 72%);
  border-color: var(--border-gold);
  animation: chestPulse 1.8s ease-in-out infinite;
}
.chest-item.claimable:hover { transform: translateY(-2px); }
.chest-item.claimable .chest-status-tag {
  background: var(--grad-gold);
  color: var(--gold-dark);
  box-shadow: 0 2px 8px rgba(244, 232, 58, 0.4);
}
.chest-item.claimed {
  opacity: 0.78;
}
.chest-item.claimed .chest-ribbon {
  background: linear-gradient(180deg, #10b981 0%, #047857 100%);
  border-color: #a7f3d0;
}
.chest-item.claimed .chest-status-tag {
  background: rgba(16, 185, 129, 0.16);
  color: var(--green);
}
@keyframes chestPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 232, 58, 0.32); }
  50% { box-shadow: 0 0 16px 2px rgba(244, 232, 58, 0.48); }
}

.chest-conditions-card,
.chest-rules-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}
.chest-conditions-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.chest-cond-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
.chest-cond-val {
  color: var(--gold);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.chest-rules-card h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
}
.chest-rules-card ol {
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.65;
}
.chest-rules-card li + li { margin-top: 6px; }

@media (max-width: 380px) {
  .chests-grid { gap: 14px 4px; }
  .chest-graphic { width: 64px; height: 56px; }
  .chest-ribbon { min-width: 52px; font-size: 9.5px; padding: 2px 5px; }
  .chest-item:not(:nth-child(4n))::after { right: -5px; font-size: 11px; top: 22px; }
}
