/* Chasin' Casino — Stake-style dark lobby. No frameworks, no external assets. */
* { box-sizing: border-box; }
:root {
  --bg: #0f212e; --panel: #1a2c38; --panel2: #213743; --line: #2f4553;
  --text: #e8f0f2; --muted: #8fa3ad; --green: #00e701; --green-dk: #00b801;
  --blue: #3b82f6; --gold: #f5b942;
}
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
button { font: inherit; cursor: pointer; }
#app { display: flex; min-height: 100vh; }

/* ---------- sidebar ---------- */
#sidebar {
  width: 240px; flex: 0 0 240px; background: #0b1a24; border-right: 1px solid var(--line);
  padding: 16px 12px; display: flex; flex-direction: column; gap: 8px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-logo, .top-logo { font-weight: 800; font-size: 20px; letter-spacing: .2px; padding: 6px 8px 14px; }
.side-logo span, .top-logo span { color: #fff; }
.side-logo em, .top-logo em {
  font-style: normal; font-size: 11px; letter-spacing: 3px; color: var(--green); display: block; margin-top: 1px;
}
.side-label { font-size: 11px; letter-spacing: 2px; color: var(--muted); padding: 14px 8px 4px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  background: none; border: none; color: var(--text); text-align: left; padding: 10px 12px;
  border-radius: 8px; font-size: 14px; font-weight: 600;
}
.nav-item:hover { background: var(--panel); }
.nav-item.active { background: var(--panel2); box-shadow: inset 3px 0 0 var(--green); }
.side-note { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 0; padding: 0 8px; }
.side-foot { margin-top: auto; font-size: 10px; letter-spacing: 1.5px; color: var(--muted); padding: 12px 8px 4px; }

/* ---------- main / topbar ---------- */
#main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#topbar {
  display: flex; align-items: center; gap: 10px; padding: 12px 20px;
  background: #0b1a24; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
#hamburger { display: none; background: none; border: none; color: #fff; font-size: 22px; padding: 4px 8px; }
.top-logo { display: none; padding: 0; }
.top-spacer { flex: 1; }
.balance {
  display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 12px; font-size: 14px;
}
.bal-label { color: var(--muted); font-size: 12px; }
.bal-amount { font-weight: 800; }
.bal-demo { font-size: 10px; font-weight: 800; color: #0f212e; background: var(--gold); border-radius: 4px; padding: 2px 5px; }
.btn { border: none; border-radius: 8px; padding: 9px 16px; font-weight: 700; font-size: 14px; color: #fff; }
.btn-green { background: var(--green-dk); color: #06130a; }
.btn-green:hover { background: var(--green); }
.btn-blue { background: var(--blue); }
.btn-blue:hover { filter: brightness(1.15); }
.btn-ghost { background: var(--panel2); color: var(--text); }
.btn-ghost:hover { background: var(--line); }
.btn-lg { padding: 12px 22px; font-size: 15px; }

/* ---------- lobby ---------- */
#view-lobby { padding: 20px 24px 8px; }
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(120deg, #123a4d 0%, #0f212e 55%, #123528 100%);
  border: 1px solid var(--line); border-radius: 16px; padding: 28px 32px; overflow: hidden;
}
.hero-kicker { color: var(--green); font-weight: 800; letter-spacing: 2px; font-size: 12px; }
.hero h1 { margin: 8px 0 6px; font-size: 38px; line-height: 1.1; }
.hero p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-art { font-size: 120px; line-height: 1; opacity: .9; filter: drop-shadow(0 8px 24px rgba(0,0,0,.5)); }
.trust-row { display: flex; gap: 18px; flex-wrap: wrap; padding: 16px 4px 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 18px 0 6px; }
#search {
  flex: 1 1 220px; max-width: 340px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; color: var(--text); padding: 10px 14px; font-size: 14px; outline: none;
}
#search:focus { border-color: var(--green); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 700;
}
.chip.active { background: var(--panel2); border-color: var(--green); color: var(--green); }

.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 19px; }
.section-head span { color: var(--muted); font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.tile {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  padding: 0 0 12px; text-align: left; color: var(--text); transition: transform .12s, border-color .12s;
}
.tile:hover { transform: translateY(-3px); border-color: var(--green); }
.tile-art {
  height: 108px; display: flex; align-items: center; justify-content: center;
  font-size: 52px; position: relative;
}
.tile-soon {
  position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.55); color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: 1px; border-radius: 999px; padding: 3px 8px;
}
.tile-live-dot {
  position: absolute; top: 8px; right: 8px; background: var(--green); color: #06130a;
  font-size: 10px; font-weight: 800; letter-spacing: 1px; border-radius: 999px; padding: 3px 8px;
}
.tile-name { font-weight: 800; font-size: 15px; padding: 10px 12px 2px; }
.tile-meta { color: var(--muted); font-size: 12px; padding: 0 12px; }
#no-results { color: var(--muted); padding: 32px 4px; font-size: 15px; }

/* ---------- game view ---------- */
#view-game { padding: 20px 24px 8px; flex: 1; display: flex; flex-direction: column; }
.game-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.game-title { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.game-tag { font-size: 10px; letter-spacing: 1.5px; background: var(--panel2); color: var(--green); border-radius: 999px; padding: 4px 9px; }
.game-bar-note { margin-left: auto; color: var(--muted); font-size: 12px; }
.game-frame-wrap { flex: 1; min-height: 640px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #0b1a24; }
#game-frame { width: 100%; height: 100%; min-height: 640px; border: none; display: block; background: #0b1a24; }

footer { padding: 28px 24px 32px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.foot-brand { color: var(--text); font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-links span { cursor: pointer; }
.foot-links span:hover { color: var(--text); }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50;
  background: #122f3f; border: 1px solid var(--line); color: var(--text);
  padding: 12px 20px; border-radius: 10px; font-size: 14px; font-weight: 600;
  box-shadow: 0 12px 32px rgba(0,0,0,.5); max-width: 90vw; text-align: center;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  #sidebar { position: fixed; left: -260px; top: 0; z-index: 40; transition: left .2s; box-shadow: 20px 0 40px rgba(0,0,0,.5); }
  #sidebar.open { left: 0; }
  #hamburger { display: block; }
  .top-logo { display: block; }
  #btn-login, #btn-signup { display: none; }
  .hero-art { display: none; }
  .hero h1 { font-size: 28px; }
  #view-lobby, #view-game { padding: 16px; }
  .game-frame-wrap, #game-frame { min-height: 560px; }
}
