/* Trézo Lakay Loto — Rezilta Borlette · dark luxury theme */
:root {
  --bg: #0b1020;
  --bg-soft: #111832;
  --card: #151d38;
  --card-2: #1b2547;
  --gold: #f5b942;
  --gold-soft: #ffd166;
  --gold-deep: #b97e14;
  --ink: #f4f6fb;
  --muted: #93a0bd;
  --line: rgba(245, 185, 66, .16);
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(1200px 500px at 50% -80px, rgba(245, 185, 66, .10), transparent 60%),
    radial-gradient(900px 600px at 100% 110%, rgba(64, 86, 178, .12), transparent 60%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.45;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 16, 32, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: .7rem 1rem;
  display: flex;
  align-items: center;
  gap: .9rem;
}
.brand-logo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  box-shadow: 0 0 18px rgba(245, 185, 66, .35);
  flex: none;
}
.brand-text h1 {
  font-size: 1.35rem;
  letter-spacing: 2px;
  font-weight: 900;
  line-height: 1.1;
}
.brand-text h1 span {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-text p {
  color: var(--gold-soft);
  font-size: .78rem;
  letter-spacing: .6px;
  margin-top: .1rem;
}
.header-date {
  margin-left: auto;
  text-align: right;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.35;
  white-space: nowrap;
}
.header-date b { color: var(--ink); display: block; font-size: .9rem; }

/* ---------- layout ---------- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.1rem 1rem 2.5rem;
}

/* ---------- date bar ---------- */
.datebar {
  display: flex;
  align-items: center;
  gap: .6rem;
  justify-content: center;
  margin-bottom: .7rem;
  flex-wrap: wrap;
}
.nav-btn {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--gold-soft);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .12s, background .12s;
}
.nav-btn:active { transform: scale(.94); }
.nav-btn:disabled { opacity: .3; cursor: default; }
.today-pill {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #231603;
  border: none;
  border-radius: 999px;
  padding: .55rem 1.1rem;
  font-weight: 800;
  font-size: .9rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 185, 66, .35);
}
.date-label {
  font-size: 1.05rem;
  font-weight: 800;
  min-width: 210px;
  text-align: center;
  letter-spacing: .3px;
}
.date-picker {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 12px;
  padding: .5rem .6rem;
  font-size: .9rem;
  color-scheme: dark;
}

/* ---------- live / status ---------- */
.live-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  color: var(--muted);
  font-size: .85rem;
  min-height: 1.6rem;
  margin-bottom: .8rem;
}
.live-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: pulse 1.6s infinite;
  flex: none;
}
.live-dot.off { background: #64748b; box-shadow: none; animation: none; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.8); }
}

/* ---------- toolbar ---------- */
.toolbar { margin-bottom: .9rem; }
.search {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 14px;
  padding: .8rem 1.1rem;
  font-size: 1rem;
}
.search::placeholder { color: var(--muted); }
.search:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

/* ---------- state chips ---------- */
.chips {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .6rem;
  margin-bottom: 1.1rem;
  scrollbar-width: thin;
}
.chip {
  flex: none;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: .5rem .95rem;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.chip .star { color: var(--gold); }
.chip.active {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #231603;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(245, 185, 66, .35);
}

/* ---------- ad slots (future) ---------- */
.ad-slot {
  border: 1px dashed #3b4769;
  border-radius: 14px;
  color: #5b6a8f;
  text-align: center;
  font-size: .8rem;
  padding: 1.4rem;
  margin-bottom: 1.2rem;
  background: rgba(255,255,255,.015);
}

/* ---------- results grid ---------- */
.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}
@media (min-width: 640px) { .results-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .results-grid { grid-template-columns: repeat(3, 1fr); } }

.state-card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.state-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft), var(--gold-deep));
}
.state-head {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 1.1rem .7rem;
}
.state-flag { font-size: 1.6rem; }
.state-name { font-weight: 900; letter-spacing: 1.2px; font-size: 1.02rem; }
.state-code {
  margin-left: auto;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--gold-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .2rem .5rem;
  background: rgba(245, 185, 66, .08);
}

.session { border-top: 1px solid rgba(255,255,255,.06); padding: .75rem 1.1rem 1rem; }
.session-title {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: var(--gold-soft);
  margin-bottom: .55rem;
}
.game-row {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .42rem 0;
}
.game-row + .game-row { border-top: 1px dotted rgba(255,255,255,.07); }
.game-label {
  width: 86px;
  flex: none;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--muted);
}
.balls { display: flex; gap: .4rem; flex-wrap: wrap; }
.ball {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.15rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
  box-shadow: inset -3px -5px 8px rgba(0,0,0,.35), inset 3px 5px 8px rgba(255,255,255,.25), 0 3px 8px rgba(0,0,0,.4);
  font-variant-numeric: tabular-nums;
}
.ball.g3 { background: radial-gradient(circle at 32% 28%, #ffe9a8, var(--gold) 55%, var(--gold-deep)); color: #3a2503; text-shadow: none; }
.ball.g4 { background: radial-gradient(circle at 32% 28%, #ff8f8f, #dc2626 55%, #7f1d1d); }
.ball.g2 { background: radial-gradient(circle at 32% 28%, #93c5fd, #2563eb 55%, #1e3a8a); }
.ball.g5 { background: radial-gradient(circle at 32% 28%, #c4b5fd, #7c3aed 55%, #4c1d95); }
.numball {
  display: inline-block;
  min-width: 84px;
  padding: .45rem 1.1rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: .12em;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.45);
  box-shadow: 0 3px 10px rgba(0,0,0,.4), inset 0 1px 2px rgba(255,255,255,.35);
}
.numball.g3 { background: linear-gradient(160deg, #ffe9a8, var(--gold) 55%, var(--gold-deep)); color: #3a2503; text-shadow: none; }
.numball.g4 { background: linear-gradient(160deg, #ff8f8f, #dc2626 55%, #7f1d1d); }
.numball.g2 { background: linear-gradient(160deg, #93c5fd, #2563eb 55%, #1e3a8a); }
.numball.g5 { background: linear-gradient(160deg, #c4b5fd, #7c3aed 55%, #4c1d95); }
.pending {
  color: var(--muted);
  font-size: .9rem;
  font-style: italic;
  padding: .3rem 0;
}

/* ---------- empty state ---------- */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty .big { font-size: 2.6rem; margin-bottom: .6rem; }
.empty p { font-size: 1rem; }

/* ---------- footer ---------- */
footer {
  text-align: center;
  padding: 1.6rem 1.2rem 2.6rem;
  color: var(--muted);
  font-size: .82rem;
  border-top: 1px solid var(--line);
  max-width: 1080px;
  margin: 0 auto;
}
.foot-brand {
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--gold-soft);
  margin-bottom: .5rem;
  font-size: .9rem;
}
.disclaimer { margin: .25rem 0; max-width: 560px; margin-left: auto; margin-right: auto; }
.updated { margin-top: .7rem; font-size: .75rem; opacity: .75; }

@media (max-width: 480px) {
  .brand-text h1 { font-size: 1.1rem; }
  .header-date { display: none; }
  .date-label { min-width: 0; flex: 1; font-size: .95rem; }
  .ball { width: 36px; height: 36px; font-size: 1.05rem; }
  .game-label { width: 74px; }
}
