/* ══════════════════════════════════════════════
   BULL ARENA — main.css
   Palette:
   --ink      #0B0908  arena night
   --dirt     #171210  arena floor shadow
   --sand     #C89B5A  arena sand
   --gold     #D4AF37  crest gold
   --bone     #EDE3D0  text on dark
   --charge   #E5484D  charge red
   --dodge    #4C8DFF  dodge blue
   Type: Cinzel (display) · Manrope (body) · JetBrains Mono (data)
   ══════════════════════════════════════════════ */

:root {
  --ink: #0B0908;
  --dirt: #171210;
  --panel: #1E1713;
  --line: rgba(212, 175, 55, 0.18);
  --sand: #C89B5A;
  --gold: #D4AF37;
  --gold-bright: #F0CE62;
  --bone: #EDE3D0;
  --muted: #9C8E78;
  --charge: #E5484D;
  --dodge: #4C8DFF;
  --tier-color: #C87F41; /* changes with bull */
  --radius: 14px;
  --font-display: 'Cinzel', serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--font-mono); }
strong { font-weight: 700; }
.c-charge { color: var(--charge); }
.c-dodge { color: var(--dodge); }

/* ── Buttons ── */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  padding: 0.85rem 1.9rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-align: center;
}
.btn:active { transform: scale(0.97); }
.btn-gold {
  background: linear-gradient(160deg, var(--gold-bright), var(--gold) 55%, #9c7a1e);
  color: #1a1204;
  box-shadow: 0 4px 24px rgba(212, 175, 55, 0.35);
}
.btn-gold:hover { box-shadow: 0 6px 32px rgba(212, 175, 55, 0.55); transform: translateY(-2px); }
.btn-ghost {
  border-color: var(--line);
  color: var(--gold);
  background: rgba(212, 175, 55, 0.05);
}
.btn-ghost:hover { background: rgba(212, 175, 55, 0.12); }

/* ══════════ NAVBAR ══════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0.7rem 1.2rem;
  background: rgba(11, 9, 8, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.navbar.scrolled { background: rgba(11, 9, 8, 0.9); border-bottom-color: var(--line); }
.nav-brand { display: flex; align-items: center; gap: 0.6rem; }
.nav-brand img { width: 38px; height: 38px; object-fit: contain; }
.nav-brand-text {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.1em;
  font-size: 1rem;
  color: var(--gold);
}
.nav-brand-text em { font-style: normal; color: var(--bone); }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; }
.nav-links a {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--gold-bright); }
.nav-buy { padding: 0.55rem 1.3rem; font-size: 0.75rem; }
.btn-outline {
  background: transparent;
  border: 1px solid rgba(212,175,55,0.45);
  color: var(--gold);
  padding: 0.55rem 1.2rem;
  font-size: 0.75rem;
}
.btn-outline:hover { background: rgba(212,175,55,0.1); }
.btn-outline.connected {
  border-color: rgba(78, 209, 130, 0.5);
  color: #4ed182;
}
.nav-wallet { white-space: nowrap; }
.nav-wallet + .nav-wallet { margin-left: -0.5rem; }
@media (max-width: 720px) {
  .nav-wallet { font-size: 0.62rem; padding: 0.45rem 0.65rem; }
  .nav-wallet + .nav-wallet { margin-left: -0.35rem; }
}
.drawer-toggle {
  display: flex;
  flex-direction: column;
  gap: 4.5px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 9px;
  cursor: pointer;
}
.drawer-toggle span { display: block; width: 18px; height: 2px; background: var(--gold); border-radius: 2px; }

/* ══════════ DRAWER ══════════ */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
  z-index: 98;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(310px, 84vw);
  background: linear-gradient(180deg, #14100D, var(--ink));
  border-right: 1px solid var(--line);
  z-index: 99;
  transform: translateX(-102%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  padding: 1.2rem;
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.drawer-head img { width: 56px; }
.drawer-close { background: none; border: 1px solid var(--line); color: var(--gold); width: 36px; height: 36px; border-radius: 8px; cursor: pointer; font-size: 0.9rem; }
.drawer-nav { display: flex; flex-direction: column; }
.drawer-nav a {
  padding: 0.85rem 0.4rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--bone);
  transition: color 0.2s, padding-left 0.2s;
}
.drawer-nav a:hover { color: var(--gold-bright); padding-left: 0.8rem; }
.drawer-ca { margin-top: 1.6rem; }
.drawer-ca-label { font-size: 0.68rem; letter-spacing: 0.15em; color: var(--muted); }
.ca-chip {
  margin-top: 0.4rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(212, 175, 55, 0.07);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  color: var(--gold-bright);
  cursor: pointer;
  font-size: 0.85rem;
}
.drawer-socials { display: flex; gap: 0.7rem; margin-top: 1.4rem; }
.drawer-socials a {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: background 0.2s;
}
.drawer-socials a:hover { background: rgba(212, 175, 55, 0.1); }
.drawer-socials svg { width: 18px; height: 18px; fill: var(--bone); }
.drawer-socials img { width: 22px; height: 22px; }

/* ══════════ HERO ══════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6.5rem 1.2rem 5rem;
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(212, 175, 55, 0.14), transparent 65%),
    radial-gradient(ellipse 90% 60% at 50% 115%, rgba(200, 155, 90, 0.08), transparent 60%),
    var(--ink);
  overflow: hidden;
}
.hero-lights {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle 2px at 18% 22%, rgba(240, 206, 98, 0.8), transparent 60%),
    radial-gradient(circle 2px at 82% 18%, rgba(240, 206, 98, 0.7), transparent 60%),
    radial-gradient(circle 1.5px at 65% 8%, rgba(240, 206, 98, 0.6), transparent 60%),
    radial-gradient(circle 1.5px at 35% 12%, rgba(240, 206, 98, 0.6), transparent 60%);
  animation: lightsFlicker 4.5s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes lightsFlicker { from { opacity: 0.6; } to { opacity: 1; } }
.hero-inner { position: relative; max-width: 780px; z-index: 2; }
.hero-logo {
  width: min(240px, 55vw);
  filter: drop-shadow(0 12px 44px rgba(212, 175, 55, 0.3));
  animation: heroFloat 5s ease-in-out infinite;
}
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.hero-eyebrow {
  margin-top: 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  color: var(--sand);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 6.5vw, 3.6rem);
  line-height: 1.12;
  margin-top: 0.7rem;
  background: linear-gradient(180deg, #FBEFC8 20%, var(--gold) 65%, #8a6b1c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 60px rgba(212, 175, 55, 0.25);
}
.hero-sub { margin: 1.2rem auto 0; max-width: 620px; color: var(--muted); font-size: 1.02rem; }
.hero-stats {
  margin: 2rem auto 0;
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(30, 23, 19, 0.6);
  backdrop-filter: blur(6px);
}
.hstat { display: flex; flex-direction: column; min-width: 88px; }
.hstat-num { font-family: var(--font-mono); font-weight: 700; font-size: 1.35rem; color: var(--gold-bright); }
.hstat-label { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.hstat-divider { width: 1px; height: 34px; background: var(--line); }
.hero-ctas { margin-top: 1.8rem; display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }
.hero-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(transparent, var(--ink)); }

/* ── CA box ── */
.ca-box {
  margin: 1.6rem auto 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  max-width: 620px;
  padding: 0.55rem 0.6rem 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(30, 23, 19, 0.75);
}
.ca-box-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--sand);
  flex-shrink: 0;
}
.ca-box code {
  flex: 1;
  font-size: 0.74rem;
  color: var(--gold-bright);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.ca-copy {
  flex-shrink: 0;
  background: rgba(212, 175, 55, 0.14);
  color: var(--gold-bright);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}
.ca-copy:hover { background: rgba(212, 175, 55, 0.28); }
.ca-copy.copied { background: #2e5c37; border-color: #4caf6d; color: #b9f0c8; }
.ca-box.big { margin-top: 2.4rem; }

/* ══════════ SECTIONS ══════════ */
.section { padding: 5.5rem 1.2rem; max-width: 1180px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 3rem; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: var(--sand);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 4.5vw, 2.5rem);
  letter-spacing: 0.04em;
  color: var(--gold);
  margin-top: 0.5rem;
}
.section-sub { max-width: 640px; margin: 0.9rem auto 0; color: var(--muted); font-size: 0.98rem; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ══════════ ARENA ══════════ */
.arena-shell {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #14100D, #0E0B09);
  padding: 1rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(212, 175, 55, 0.06) inset;
}
.arena-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.arena-bull-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--tier-color);
}
.bull-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tier-color); box-shadow: 0 0 12px var(--tier-color); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: 0.6; } }
.arena-pool { display: flex; align-items: baseline; gap: 0.5rem; margin-left: auto; }
.arena-pool-label { font-size: 0.62rem; letter-spacing: 0.18em; color: var(--muted); }
.arena-pool-val { font-family: var(--font-mono); font-weight: 700; color: var(--gold-bright); font-size: 1.05rem; }
.arena-timer {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--bone);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.2rem 0.8rem;
  min-width: 96px;
  text-align: center;
}
.arena-timer.hot { color: var(--charge); border-color: rgba(229, 72, 77, 0.5); animation: pulse 1s infinite; }

.arena-grid {
  display: grid;
  grid-template-columns: 250px 1fr 230px;
  gap: 0.9rem;
  margin-top: 0.9rem;
}
.panel-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--sand);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.6rem;
}

/* chat */
.arena-chat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  max-height: 430px;
}
.chat-feed { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.8rem; scrollbar-width: thin; }
.chat-msg strong { color: var(--sand); font-weight: 700; margin-right: 0.35rem; }
.chat-msg.me strong { color: var(--gold-bright); }
.chat-msg span { color: var(--bone); opacity: 0.85; }
.chat-form { display: flex; gap: 0.45rem; margin-top: 0.7rem; }
.chat-form input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 0.55rem 0.7rem;
  min-width: 0;
}
.chat-form input:focus { outline: 1px solid var(--gold); }
.chat-form button {
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid var(--line);
  color: var(--gold-bright);
  border-radius: 8px;
  width: 40px;
  cursor: pointer;
}

/* stage */
.arena-stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 340px;
  background: #0a0705;
}
#arenaCanvas { display: block; width: 100%; height: 100%; }
.entrance-overlay {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: rgba(5, 3, 2, 0.72);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
  text-align: center;
  padding: 1rem;
}
.entrance-overlay.show { opacity: 1; }
.entrance-kicker { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.3em; color: var(--muted); }
.entrance-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: var(--tier-color);
  text-shadow: 0 0 30px var(--tier-color);
  animation: entranceZoom 0.9s ease;
}
@keyframes entranceZoom { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.entrance-pool { font-family: var(--font-mono); font-size: 0.8rem; color: var(--gold-bright); }
.entrance-count { font-family: var(--font-mono); font-weight: 700; font-size: 2.6rem; color: var(--bone); margin-top: 0.4rem; }
.result-flash {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.3rem, 4vw, 2rem);
  letter-spacing: 0.1em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
  text-shadow: 0 0 40px currentColor;
}
.result-flash.show { opacity: 1; }

/* stats */
.arena-stats {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem;
  font-size: 0.82rem;
}
.stat-row { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px solid rgba(212, 175, 55, 0.07); }
.stat-row span { color: var(--muted); }
.stat-row strong { font-family: var(--font-mono); }
.pct-bar {
  display: flex;
  height: 22px;
  border-radius: 6px;
  overflow: hidden;
  margin: 0.7rem 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.pct-charge, .pct-dodge {
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  transition: width 0.6s ease;
  min-width: 34px;
}
.pct-charge { background: linear-gradient(180deg, #f2555a, #b2262b); color: #fff; }
.pct-dodge { background: linear-gradient(180deg, #5d97ff, #2b5cc4); color: #fff; }
.spectate-note { margin-top: 0.7rem; font-size: 0.7rem; color: var(--muted); line-height: 1.5; }

/* actions */
.arena-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-top: 0.9rem; }
.action-btn {
  border: 1px solid;
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: center;
  font-family: var(--font-body);
  transition: transform 0.15s, box-shadow 0.25s, opacity 0.2s;
  background-size: 200% 200%;
}
.action-btn:active { transform: scale(0.98); }
.action-btn .action-title { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; letter-spacing: 0.08em; }
.action-btn .action-sub { font-size: 0.72rem; opacity: 0.75; }
.action-btn.charge {
  background: linear-gradient(160deg, rgba(229, 72, 77, 0.2), rgba(229, 72, 77, 0.05));
  border-color: rgba(229, 72, 77, 0.45);
  color: #ffb9bb;
}
.action-btn.charge:hover { box-shadow: 0 0 30px rgba(229, 72, 77, 0.35); }
.action-btn.dodge {
  background: linear-gradient(160deg, rgba(76, 141, 255, 0.2), rgba(76, 141, 255, 0.05));
  border-color: rgba(76, 141, 255, 0.45);
  color: #bcd4ff;
}
.action-btn.dodge:hover { box-shadow: 0 0 30px rgba(76, 141, 255, 0.35); }
.action-btn.picked { outline: 2px solid currentColor; box-shadow: 0 0 34px currentColor; }
.action-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.arena-footnote { text-align: center; margin-top: 0.7rem; font-size: 0.72rem; color: var(--muted); }

.recent-winners { margin-top: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem; }
.winners-ticker { display: flex; gap: 0.6rem; overflow-x: auto; scrollbar-width: thin; padding-bottom: 0.2rem; }
.win-chip {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
  color: var(--muted);
  white-space: nowrap;
}
.win-chip b { font-weight: 700; }
.win-chip.w-charge b { color: var(--charge); }
.win-chip.w-dodge b { color: var(--dodge); }

/* ══════════ BULLS ══════════ */
.bulls-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.bull-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), #120E0B);
  padding: 1.5rem 1.2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.bull-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--tc, var(--gold));
  box-shadow: 0 0 18px var(--tc, var(--gold));
}
.bull-card[data-tier="bronze"] { --tc: #C87F41; }
.bull-card[data-tier="silver"] { --tc: #C9CFD9; }
.bull-card[data-tier="gold"]   { --tc: #F0CE62; }
.bull-card[data-tier="inferno"]{ --tc: #FF5A2D; }
.bull-card[data-tier="king"]   { --tc: #B266FF; }
.bull-card:hover { transform: translateY(-6px); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 26px color-mix(in srgb, var(--tc) 25%, transparent); }
.bull-horns { font-size: 2.1rem; filter: drop-shadow(0 0 14px var(--tc)); }
.bull-card h3 { font-family: var(--font-display); font-weight: 900; letter-spacing: 0.06em; color: var(--tc); margin-top: 0.6rem; font-size: 1.02rem; }
.bull-range { display: inline-block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--bone); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.75rem; margin-top: 0.5rem; }
.bull-card p { font-size: 0.8rem; color: var(--muted); margin-top: 0.8rem; }

/* ══════════ TIERS TABLE ══════════ */
.tiers-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; max-width: 860px; margin: 0 auto; }
.tier-row {
  display: grid;
  grid-template-columns: 1fr 90px 1.6fr;
  gap: 0.8rem;
  align-items: center;
  padding: 0.95rem 1.3rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
  font-size: 0.9rem;
  background: var(--panel);
}
.tier-row:last-child { border-bottom: 0; }
.tier-row span:first-child { font-family: var(--font-mono); color: var(--bone); font-size: 0.82rem; }
.tier-row strong { font-family: var(--font-display); color: var(--gold-bright); font-size: 1.05rem; text-align: center; }
.tier-row span:last-child { color: var(--muted); font-size: 0.82rem; }
.tier-head { background: rgba(212, 175, 55, 0.07); font-family: var(--font-mono); font-size: 0.64rem !important; letter-spacing: 0.18em; }
.tier-head span, .tier-head strong { color: var(--sand) !important; font-size: 0.64rem; font-family: var(--font-mono); }
.tier-king { background: linear-gradient(90deg, rgba(178, 102, 255, 0.1), var(--panel)); }
.rewards-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; max-width: 980px; margin: 2rem auto 0; }
.note-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 1.3rem; }
.note-card h4 { font-family: var(--font-display); color: var(--gold); letter-spacing: 0.04em; font-size: 0.95rem; }
.note-card p { font-size: 0.82rem; color: var(--muted); margin-top: 0.55rem; }

/* ══════════ TICKETS ══════════ */
.tickets-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.1rem; max-width: 900px; margin: 0 auto; }
.ticket-card {
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  border: 1px dashed var(--line);
  background:
    radial-gradient(circle 10px at 0% 50%, var(--ink) 98%, transparent) ,
    radial-gradient(circle 10px at 100% 50%, var(--ink) 98%, transparent),
    var(--panel);
  position: relative;
}
.ticket-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}
.ticket-card.free .ticket-tag { background: rgba(76, 175, 109, 0.15); color: #8de0a7; border: 1px solid rgba(76, 175, 109, 0.4); }
.ticket-card.paid .ticket-tag { background: rgba(212, 175, 55, 0.15); color: var(--gold-bright); border: 1px solid var(--line); }
.ticket-card h3 { font-family: var(--font-display); font-size: 1.15rem; color: var(--bone); margin-top: 0.9rem; }
.ticket-card p { font-size: 0.85rem; color: var(--muted); margin-top: 0.6rem; }
.ticket-fine { font-size: 0.76rem !important; padding-top: 0.5rem; border-top: 1px solid rgba(212, 175, 55, 0.1); margin-top: 0.9rem !important; }

/* ══════════ HOW TO PLAY ══════════ */
.howto-steps { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.howto-step {
  display: flex;
  gap: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1.3rem 1.4rem;
}
.step-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--gold);
  min-width: 44px;
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: 1rem;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}
.howto-step h3 { font-family: var(--font-display); font-size: 1.05rem; color: var(--bone); letter-spacing: 0.03em; }
.howto-step p { font-size: 0.87rem; color: var(--muted); margin-top: 0.4rem; }

/* ══════════ ABOUT ══════════ */
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem; max-width: 980px; margin: 0 auto; }
.about-cols p { color: var(--muted); font-size: 0.93rem; margin-bottom: 1.1rem; }
.about-cols p strong { color: var(--bone); }
.about-cols p em { color: var(--sand); }
.about-sign {
  font-family: var(--font-display);
  color: var(--gold) !important;
  font-size: 1.02rem !important;
  letter-spacing: 0.05em;
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
}

/* ══════════ LEADERBOARD ══════════ */
.lb-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; max-width: 860px; margin: 0 auto; }
.lb-row {
  display: grid;
  grid-template-columns: 42px 1.6fr 70px 80px 100px;
  gap: 0.6rem;
  align-items: center;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
  font-size: 0.85rem;
  background: var(--panel);
}
.lb-row:last-child { border-bottom: 0; }
.lb-head { background: rgba(212, 175, 55, 0.07); font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; color: var(--sand); }
.lb-rank { font-family: var(--font-display); font-weight: 900; color: var(--gold); }
.lb-row:nth-child(2) .lb-rank { color: #F0CE62; text-shadow: 0 0 12px rgba(240, 206, 98, 0.6); }
.lb-name { font-weight: 700; color: var(--bone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-num { font-family: var(--font-mono); color: var(--muted); font-size: 0.78rem; }
.lb-earn { font-family: var(--font-mono); color: var(--gold-bright); font-weight: 700; font-size: 0.78rem; }

/* ══════════ SOCIALS ══════════ */
.socials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; max-width: 900px; margin: 0 auto; }
.social-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1.1rem 1.2rem;
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.2s, box-shadow 0.25s, border-color 0.25s;
}
.social-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); }
.social-ic { width: 30px; height: 30px; flex-shrink: 0; }
.social-ic.x { fill: var(--bone); padding: 3px; }

/* ══════════ FOOTER ══════════ */
.footer {
  text-align: center;
  padding: 3.5rem 1.2rem 2.5rem;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  background: linear-gradient(180deg, var(--ink), #0e0a08);
}
.footer-logo { width: 84px; opacity: 0.9; }
.footer-tag { font-family: var(--font-display); color: var(--gold); letter-spacing: 0.08em; font-size: 0.85rem; margin-top: 0.8rem; }
.footer-disclaimer { max-width: 640px; margin: 1rem auto 0; font-size: 0.72rem; color: var(--muted); }
.footer-copy { margin-top: 1.1rem; font-size: 0.7rem; color: rgba(156, 142, 120, 0.6); font-family: var(--font-mono); }

/* ══════════ ADMIN ══════════ */
.admin-body { min-height: 100vh; background: var(--ink); padding: 5.5rem 1rem 3rem; }
.admin-gate {
  max-width: 380px;
  margin: 12vh auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 2rem 1.7rem;
  text-align: center;
}
.admin-gate img { width: 78px; }
.admin-gate h1 { font-family: var(--font-display); color: var(--gold); font-size: 1.2rem; letter-spacing: 0.08em; margin-top: 0.8rem; }
.admin-gate p { font-size: 0.8rem; color: var(--muted); margin-top: 0.4rem; }
.admin-gate input {
  width: 100%;
  margin-top: 1.2rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--bone);
  padding: 0.8rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-align: center;
}
.admin-gate input:focus { outline: 1px solid var(--gold); }
.admin-gate .btn { width: 100%; margin-top: 0.9rem; }
.gate-error { color: var(--charge); font-size: 0.78rem; margin-top: 0.7rem; min-height: 1.1em; }

.admin-wrap { max-width: 1060px; margin: 0 auto; display: none; }
.admin-wrap.unlocked { display: block; }
.admin-title { font-family: var(--font-display); color: var(--gold); font-size: 1.5rem; letter-spacing: 0.06em; }
.admin-sub { color: var(--muted); font-size: 0.82rem; margin-top: 0.3rem; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.1rem; margin-top: 1.8rem; }
.admin-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 1.3rem; }
.admin-card h3 { font-family: var(--font-display); font-size: 0.95rem; color: var(--gold-bright); letter-spacing: 0.05em; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); }
.admin-field { margin-top: 0.9rem; }
.admin-field label { display: block; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem; }
.admin-field input, .admin-field select {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--bone);
  padding: 0.6rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.admin-field input:focus { outline: 1px solid var(--gold); }
.admin-hint { font-size: 0.68rem; color: var(--muted); margin-top: 0.35rem; }
.admin-toggle { display: flex; align-items: center; justify-content: space-between; margin-top: 0.9rem; font-size: 0.85rem; }
.switch { position: relative; width: 46px; height: 25px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s;
}
.slider::before {
  content: '';
  position: absolute;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--bone);
  top: 3px; left: 3px;
  transition: transform 0.25s;
}
.switch input:checked + .slider { background: var(--gold); }
.switch input:checked + .slider::before { transform: translateX(21px); }

.tier-editor .tier-edit-row { display: grid; grid-template-columns: 1fr 1fr 70px; gap: 0.5rem; margin-top: 0.6rem; }
.tier-editor .tier-edit-row input { padding: 0.45rem 0.6rem; font-size: 0.78rem; }
.tier-editor .tier-edit-head { display: grid; grid-template-columns: 1fr 1fr 70px; gap: 0.5rem; margin-top: 0.9rem; font-size: 0.62rem; letter-spacing: 0.12em; color: var(--sand); font-family: var(--font-mono); }

.admin-users table { width: 100%; border-collapse: collapse; font-size: 0.76rem; margin-top: 0.8rem; }
.admin-users th { text-align: left; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; color: var(--sand); padding: 0.4rem 0.4rem; border-bottom: 1px solid var(--line); }
.admin-users td { padding: 0.5rem 0.4rem; border-bottom: 1px solid rgba(212, 175, 55, 0.07); color: var(--muted); }
.admin-users td.u-name { color: var(--bone); font-weight: 700; }
.admin-users td code { font-size: 0.66rem; color: var(--sand); }
.mini-btn {
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 0.28rem 0.6rem;
  cursor: pointer;
  border: 1px solid;
  background: transparent;
  margin-right: 0.3rem;
}
.mini-btn.ban { color: #ff9a9d; border-color: rgba(229, 72, 77, 0.5); }
.mini-btn.ban.active { background: rgba(229, 72, 77, 0.25); }
.mini-btn.chatban { color: #ffd27d; border-color: rgba(212, 175, 55, 0.5); }
.mini-btn.chatban.active { background: rgba(212, 175, 55, 0.25); }

.notif-list { margin-top: 0.8rem; display: flex; flex-direction: column; gap: 0.5rem; max-height: 300px; overflow-y: auto; }
.notif {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.6rem 0.8rem;
  font-size: 0.76rem;
  background: rgba(0, 0, 0, 0.25);
}
.notif.ok { border-left: 3px solid #4caf6d; }
.notif.fail { border-left: 3px solid var(--charge); }
.notif .n-body { flex: 1; color: var(--muted); }
.notif .n-body b { color: var(--bone); }
.notif .n-actions { display: flex; gap: 0.3rem; }

.admin-save-bar {
  position: sticky;
  bottom: 1rem;
  margin-top: 1.5rem;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  background: rgba(20, 16, 13, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem;
  backdrop-filter: blur(8px);
}
.save-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #2e5c37;
  border: 1px solid #4caf6d;
  color: #c8f2d4;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 200;
}
.save-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ══════════ RESPONSIVE ══════════ */
@media (max-width: 1020px) {
  .arena-grid { grid-template-columns: 1fr 1fr; }
  .arena-stage { grid-column: 1 / -1; order: -1; min-height: 300px; }
  .arena-chat { max-height: 320px; min-height: 260px; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .about-cols { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 640px) {
  .section { padding: 4rem 1rem; }
  .arena-grid { grid-template-columns: 1fr; }
  .arena-stage { min-height: 250px; }
  .hero-stats { gap: 0.9rem; padding: 0.9rem 1rem; width: 100%; justify-content: space-between; }
  .hstat { min-width: 0; }
  .hstat-num { font-size: 1.05rem; }
  .hstat-label { font-size: 0.55rem; }
  .arena-actions {
    position: sticky;
    bottom: 0.6rem;
    z-index: 40;
  }
  .action-btn { padding: 0.85rem 0.5rem; backdrop-filter: blur(10px); }
  .action-btn .action-title { font-size: 1rem; }
  .action-btn .action-sub { display: none; }
  .arena-timer { margin-left: auto; }
  .arena-pool { margin-left: 0; }
  .tier-row { grid-template-columns: 1fr 60px; }
  .tier-row span:last-child { grid-column: 1 / -1; font-size: 0.74rem; padding-top: 0.15rem; }
  .lb-row { grid-template-columns: 34px 1.4fr 54px 54px 78px; padding: 0.75rem 0.8rem; font-size: 0.76rem; }
  .ca-box code { font-size: 0.62rem; }
  .nav-buy { display: none; }
  .howto-step { padding: 1.1rem; gap: 0.9rem; }
  .footer-disclaimer { font-size: 0.66rem; }
}

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

/* ── Connection status banner ── */
.connection-banner {
  max-width: 1100px;
  margin: 0 auto 1.2rem;
  padding: 0.85rem 1.3rem;
  border-radius: 10px;
  background: rgba(229, 72, 61, 0.12);
  border: 1px solid rgba(229, 72, 61, 0.4);
  color: #ffb3ad;
  font-size: 0.85rem;
  text-align: center;
}

/* ── Active nav link ── */
.nav-links a.active { color: var(--gold); }
.drawer-nav a.active { color: var(--gold); }

/* ── Auth pages ── */
.auth-shell {
  max-width: 460px;
  margin: 3rem auto 5rem;
  padding: 2rem;
  background: rgba(20,16,10,0.6);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 16px;
}
.auth-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.auth-tab {
  flex: 1; padding: 0.7rem; text-align: center; border-radius: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid transparent;
  cursor: pointer; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.05em; font-size: 0.85rem;
  color: var(--muted);
}
.auth-tab.active { background: rgba(212,175,55,0.12); border-color: rgba(212,175,55,0.4); color: var(--gold); }
.auth-field { margin-bottom: 1rem; }
.auth-field label { display: block; font-size: 0.75rem; color: var(--muted); margin-bottom: 0.4rem; letter-spacing: 0.04em; }
.auth-field input {
  width: 100%; padding: 0.75rem 0.9rem; border-radius: 8px;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.12);
  color: var(--ivory); font-size: 0.9rem;
}
.auth-field input:focus { outline: none; border-color: var(--gold); }
.auth-error { color: #ff8a80; font-size: 0.82rem; margin: 0.6rem 0; min-height: 1.2em; }
.auth-note { font-size: 0.78rem; color: var(--muted); margin-top: 1rem; text-align: center; }
.auth-wallet-status { font-size: 0.82rem; padding: 0.6rem 0.8rem; border-radius: 8px; background: rgba(255,255,255,0.04); margin-bottom: 1rem; }
.auth-wallet-status.ok { color: #4ed182; }

/* ── Profile page ── */
.profile-shell { max-width: 760px; margin: 3rem auto 5rem; }
.profile-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #8a6d1f);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 900; font-size: 1.4rem; color: #0B0908;
}
.profile-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.profile-stat { padding: 1.2rem; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; text-align: center; }
.profile-stat .num { font-family: var(--font-mono); font-size: 1.6rem; color: var(--gold); font-weight: 700; }
.profile-stat .label { font-size: 0.72rem; color: var(--muted); margin-top: 0.3rem; letter-spacing: 0.05em; }
.profile-wins-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.profile-wins-table th { text-align: left; font-size: 0.7rem; color: var(--muted); padding: 0.5rem; letter-spacing: 0.05em; border-bottom: 1px solid rgba(255,255,255,0.1); }
.profile-wins-table td { padding: 0.6rem 0.5rem; font-size: 0.85rem; border-bottom: 1px solid rgba(255,255,255,0.05); }

/* ── Whitelist payout presets ── */
.tier-preset-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.tier-preset { font-size: 0.68rem; padding: 0.35rem 0.6rem; }

/* ── Shared admin nav bar ── */
.admin-nav {
  display: flex; align-items: center; gap: 1.2rem;
  padding: 0.9rem 1.2rem; margin-bottom: 1.6rem;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(212,175,55,0.15);
  border-radius: 12px; flex-wrap: wrap;
}
.admin-nav a {
  color: var(--muted); text-decoration: none; font-size: 0.82rem;
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0.03em;
  padding: 0.35rem 0.7rem; border-radius: 6px; transition: color 0.15s ease, background 0.15s ease;
}
.admin-nav a:hover { color: var(--ivory); background: rgba(255,255,255,0.05); }
.admin-nav a.active { color: var(--gold); background: rgba(212,175,55,0.1); }
.admin-nav .admin-nav-spacer { flex: 1; }
.admin-nav .admin-nav-brand { color: var(--gold); font-weight: 800; font-size: 0.9rem; }
