:root {
  --bg: #060912;
  --bg-2: #0b1322;
  --panel: #111c33;
  --panel-2: #15213c;
  --line: #1f2c4a;
  --line-2: #243353;
  --text: #e6ecf5;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --primary: #3b82f6;
  --success: #10b981;
  --success-2: #34d399;
  --danger: #ef4444;
  --ball: #fbbf24;
  --ball-2: #f59e0b;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(800px 500px at 50% -10%, rgba(245, 158, 11, 0.10), transparent 60%),
    radial-gradient(700px 400px at 100% 100%, rgba(59, 130, 246, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Top bar ---------- */
.top-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 19, 34, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand-area {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #0b1220;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 28px;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
}
.brand-logo { width: 46px; height: 46px; border-radius: 12px; object-fit: contain; box-shadow: 0 0 24px rgba(245,158,11,.2); }
.brand-name {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.3px;
}
.brand-tag {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.top-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  padding: 8px 16px;
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.30);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--success-2);
  margin-right: 18px;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.clock-area { text-align: center; }
.clock {
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  font-size: 32px;
  letter-spacing: 2px;
  color: var(--accent);
  line-height: 1;
}
.date { font-size: 13px; color: var(--muted); margin-top: 4px; }

.top-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--panel-2); border-color: var(--line-2); }
.icon-btn.off { opacity: 0.4; }

/* ---------- Hero ---------- */
.hero {
  padding: 36px 32px 24px;
  position: relative;
  z-index: 1;
}
.hero-inner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(59, 130, 246, 0.06));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 22px;
  padding: 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 200px at 50% 100%, rgba(245, 158, 11, 0.20), transparent 70%);
  pointer-events: none;
}
.hero-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-2);
  font-weight: 800;
}
.hero-game {
  font-size: 46px;
  font-weight: 900;
  margin: 6px 0;
  letter-spacing: -0.8px;
}
.hero-time {
  font-size: 16px;
  color: #d6e3ff;
  font-family: "JetBrains Mono", monospace;
}
.balls-stage {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 28px 0 18px;
  min-height: 110px;
}
.hero-next {
  font-size: 15px;
  color: var(--muted);
}
.hero-next strong {
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  margin-left: 6px;
  font-weight: 700;
}
.countdown {
  display: inline-block;
  margin-left: 10px;
  padding: 4px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  color: var(--accent);
}

/* ---------- Balls ---------- */
.ball {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 50%),
    linear-gradient(135deg, var(--ball-2), var(--ball));
  display: grid;
  place-items: center;
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  font-size: 36px;
  color: #0b1220;
  box-shadow:
    0 12px 30px rgba(245, 158, 11, 0.35),
    inset 0 -8px 16px rgba(0,0,0,0.2);
  position: relative;
  animation: ballDrop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.ball.scratch {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: 18px;
  font-family: "Inter", sans-serif;
  font-weight: 700;
}
.ball.lotto {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: #fff;
}
.ball.mariage {
  background: linear-gradient(135deg, #ec4899, #f472b6);
  color: #fff;
}
.ball.empty {
  background: var(--panel-2);
  border: 2px dashed var(--line-2);
  color: var(--muted);
  box-shadow: none;
  font-size: 22px;
}

@keyframes ballDrop {
  0% { transform: translateY(-280px) rotate(360deg); opacity: 0; }
  60% { transform: translateY(14px) rotate(0deg); opacity: 1; }
  80% { transform: translateY(-8px) rotate(0deg); }
  100% { transform: translateY(0) rotate(0deg); opacity: 1; }
}

/* ---------- Games grid ---------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  padding: 0 32px 28px;
  position: relative;
  z-index: 1;
}
.game-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(300px 100px at 0% 0%, rgba(245,158,11,0.06), transparent 60%);
  pointer-events: none;
}
.game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.game-name {
  font-weight: 700;
  font-size: 19px;
}
.web-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 13px;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
  vertical-align: middle;
}
.game-status {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
}
.game-status.live {
  background: rgba(16, 185, 129, 0.18);
  color: var(--success-2);
  border: 1px solid rgba(16, 185, 129, 0.30);
}
.game-status.next {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-2);
  border: 1px solid rgba(245, 158, 11, 0.30);
}
.game-status.over {
  background: rgba(100, 116, 139, 0.15);
  color: var(--muted);
  border: 1px solid var(--line);
}

.game-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  min-height: 64px;
}
.ball.small {
  width: 56px;
  height: 56px;
  font-size: 22px;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.25), inset 0 -4px 10px rgba(0,0,0,0.2);
}
.ball.small.empty {
  font-size: 14px;
  width: 56px;
  height: 56px;
}

.game-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}
.game-meta strong { color: var(--text); }

/* ---------- History ---------- */
.history {
  padding: 0 32px 28px;
  position: relative;
  z-index: 1;
}
.history h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-2);
  margin: 0 0 12px;
  font-weight: 700;
}
.history-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  padding-bottom: 8px;
}
.history-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  min-width: 0;
  position: relative;
  overflow: hidden;
}
.history-item.new {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), var(--panel));
}
.hi-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
}
.hi-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.78);
  margin-bottom: 10px;
}
.hi-name { font-weight: 700; }
.hi-time { color: var(--muted); font-family: "JetBrains Mono", monospace; }
.hi-balls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.hi-balls .ball {
  width: 36px;
  height: 36px;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.20), inset 0 -3px 6px rgba(0,0,0,0.2);
}
.hi-balls .ball.empty {
  width: 36px;
  height: 36px;
  font-size: 11px;
}

.history-item.tone-1 { background: linear-gradient(135deg, rgba(59,130,246,0.24), rgba(17,28,51,0.96)); border-color: rgba(96,165,250,0.45); }
.history-item.tone-2 { background: linear-gradient(135deg, rgba(16,185,129,0.24), rgba(17,28,51,0.96)); border-color: rgba(52,211,153,0.45); }
.history-item.tone-3 { background: linear-gradient(135deg, rgba(236,72,153,0.22), rgba(17,28,51,0.96)); border-color: rgba(244,114,182,0.45); }
.history-item.tone-4 { background: linear-gradient(135deg, rgba(245,158,11,0.24), rgba(17,28,51,0.96)); border-color: rgba(251,191,36,0.45); }
.history-item.tone-5 { background: linear-gradient(135deg, rgba(139,92,246,0.24), rgba(17,28,51,0.96)); border-color: rgba(167,139,250,0.45); }
.history-item.tone-6 { background: linear-gradient(135deg, rgba(239,68,68,0.22), rgba(17,28,51,0.96)); border-color: rgba(248,113,113,0.45); }
.history-item .hi-name { color: #fff; }
.history-item .hi-time { color: rgba(255,255,255,0.86); }
.history-item .hi-balls .ball { box-shadow: 0 4px 10px rgba(0,0,0,0.18), inset 0 -3px 6px rgba(0,0,0,0.2); }

/* ---------- Footer ---------- */
.foot {
  padding: 18px 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(11, 19, 34, 0.6);
  position: relative;
  z-index: 1;
}
.foot .dot { color: var(--muted-2); }

/* ---------- Draw overlay (full animation) ---------- */
.draw-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1000px 600px at 50% 50%, rgba(245, 158, 11, 0.10), transparent 70%),
    rgba(6, 9, 18, 0.97);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.draw-overlay.show {
  display: flex;
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.draw-stage {
  text-align: center;
  width: 100%;
  max-width: 1100px;
}
.draw-game {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 6px;
}
.draw-time {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 36px;
  font-family: "JetBrains Mono", monospace;
}
.draw-balls {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin: 30px 0;
}
.draw-balls .ball {
  width: 140px;
  height: 140px;
  font-size: 56px;
  box-shadow:
    0 24px 60px rgba(245, 158, 11, 0.40),
    inset 0 -10px 22px rgba(0,0,0,0.25);
}
.draw-status {
  font-size: 22px;
  color: var(--muted);
  margin-top: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.draw-status.flash {
  color: var(--accent);
  animation: flash 0.8s ease infinite alternate;
}
@keyframes flash {
  from { opacity: 0.5; }
  to { opacity: 1; transform: scale(1.04); }
}

.draw-overlay .reveal-banner {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1220;
  padding: 16px 40px;
  border-radius: 18px;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 1px;
  box-shadow: 0 30px 60px rgba(245, 158, 11, 0.5);
}
.draw-overlay .reveal-banner.show {
  animation: bannerPop 1.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bannerPop {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-12deg); opacity: 0; }
  40% { transform: translate(-50%, -50%) scale(1.1) rotate(2deg); opacity: 1; }
  60% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  85% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0.9) rotate(0deg); opacity: 0; }
}

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1100;
}
.toast {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  animation: slideIn 0.2s ease;
  max-width: 360px;
}
@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .top-bar { grid-template-columns: 1fr auto; gap: 10px; padding: 12px 16px; }
  .top-meta, .top-actions { grid-column: 1 / -1; justify-self: stretch; }
  .clock { font-size: 22px; }
  .hero { padding: 20px 16px; }
  .hero-inner { padding: 22px; }
  .hero-game { font-size: 30px; }
  .ball { width: 64px; height: 64px; font-size: 24px; }
  .games-grid { padding: 0 16px 18px; }
  .history { padding: 0 16px 18px; }
  .draw-game { font-size: 30px; }
  .draw-balls .ball { width: 80px; height: 80px; font-size: 30px; }
  .foot { padding: 14px 16px; }
}


/* ---------- V2.17 display theme uplift ---------- */
:root {
  --bg: #060b16;
  --bg-2: #091428;
  --panel: #0f1c34;
  --panel-2: #132544;
  --line: #223a63;
  --line-2: #31518a;
  --text: #edf4ff;
  --muted: #a1b4d4;
  --accent: #f4b400;
  --accent-2: #ffd84d;
  --primary: #1f7cff;
  --ball: #ffd84d;
  --ball-2: #f4b400;
}
body::before {
  background:
    radial-gradient(920px 520px at 50% -10%, rgba(244,180,0,.14), transparent 60%),
    radial-gradient(820px 460px at 100% 100%, rgba(31,124,255,.12), transparent 60%),
    radial-gradient(780px 420px at 0% 100%, rgba(31,124,255,.08), transparent 60%);
}
.top-bar {
  background: rgba(8, 15, 28, 0.86);
  border-bottom-color: rgba(83,122,184,.24);
  box-shadow: 0 10px 30px rgba(0,0,0,.16);
}
.brand-logo {
  width: 52px; height: 52px; border-radius: 14px;
  box-shadow: 0 0 28px rgba(244,180,0,.20), 0 0 14px rgba(31,124,255,.16);
}
.brand-name {
  background: linear-gradient(180deg, #ffffff 0%, #d2ddff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-inner,
.history-item {
  box-shadow: 0 24px 60px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.03);
}
.hero-inner {
  background: linear-gradient(135deg, rgba(244,180,0,.16), rgba(31,124,255,.12));
  border-color: rgba(244,180,0,.28);
}
.ball {
  box-shadow: 0 14px 28px rgba(0,0,0,.22), inset 0 -6px 10px rgba(0,0,0,.16);
}
.icon-btn {
  background: linear-gradient(180deg, rgba(19,37,68,.95), rgba(14,27,49,.95));
  border-color: rgba(83,122,184,.25);
}
.icon-btn:hover { border-color: rgba(244,180,0,.35); }
.countdown { border-color: rgba(244,180,0,.25); }


/* ---------- V3.03 Lottery Results Board ---------- */
.board-section { position: relative; z-index: 1; padding: 0 32px 10px; }
.board-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin: 2px 0 16px; }
.board-heading h2 { margin:2px 0 0; font-size:28px; letter-spacing:-.5px; }
.board-kicker { color:var(--accent-2); font-size:11px; font-weight:900; letter-spacing:2px; }
.board-legend { color:var(--muted); font-size:12px; }
.results-board { padding:0 0 28px; grid-template-columns:repeat(auto-fit,minmax(360px,1fr)); }
.result-set-card { background:linear-gradient(145deg,#101d34,#0b1426); border:1px solid var(--line); border-radius:22px; padding:20px; box-shadow:0 16px 40px rgba(0,0,0,.18); position:relative; overflow:hidden; }
.result-set-card::after { content:""; position:absolute; width:220px; height:220px; border-radius:50%; right:-120px; top:-140px; background:radial-gradient(circle,rgba(245,158,11,.16),transparent 68%); pointer-events:none; }
.result-set-card.latest-set { border-color:rgba(245,158,11,.45); box-shadow:0 18px 48px rgba(245,158,11,.08); }
.result-set-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:16px; }
.result-location { font-size:24px; line-height:1.1; font-weight:900; letter-spacing:-.4px; }
.result-date { color:var(--muted); font-family:"JetBrains Mono",monospace; font-size:12px; margin-top:5px; }
.session-pill { flex:none; padding:7px 11px; border-radius:999px; font-size:11px; letter-spacing:.8px; font-weight:900; border:1px solid rgba(59,130,246,.35); background:rgba(59,130,246,.12); color:#93c5fd; }
.session-pill.evening { border-color:rgba(168,85,247,.35); background:rgba(168,85,247,.14); color:#d8b4fe; }
.lots-row { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.big-results-row { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-top:9px; }
.result-cell { min-width:0; border:1px solid var(--line-2); border-radius:14px; padding:11px 10px; background:rgba(6,9,18,.46); text-align:center; }
.result-cell span { display:block; font-size:10px; text-transform:uppercase; letter-spacing:.75px; color:var(--muted); font-weight:800; margin-bottom:6px; }
.result-cell strong { display:block; font-family:"JetBrains Mono",monospace; font-size:26px; line-height:1.05; letter-spacing:2px; color:#f8fafc; white-space:nowrap; }
.result-cell.featured strong { color:var(--accent-2); font-size:30px; text-shadow:0 0 18px rgba(245,158,11,.16); }
.result-source { margin-top:13px; display:flex; align-items:center; gap:7px; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.6px; }
.official-dot { width:7px; height:7px; border-radius:50%; background:var(--success); box-shadow:0 0 10px rgba(16,185,129,.7); }
.results-empty { grid-column:1/-1; min-height:230px; border:1px dashed var(--line-2); border-radius:22px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; background:rgba(17,28,51,.55); color:var(--muted); }
.results-empty strong { color:var(--text); font-size:20px; }
.empty-icon { font-size:34px; }

@media (max-width: 700px) {
  .board-section { padding:0 14px 8px; }
  .board-heading { align-items:flex-start; }
  .board-heading h2 { font-size:22px; }
  .board-legend { display:none; }
  .results-board { grid-template-columns:1fr; gap:12px; }
  .result-set-card { padding:15px; border-radius:18px; }
  .result-location { font-size:21px; }
  .lots-row { gap:6px; }
  .big-results-row { gap:6px; margin-top:6px; }
  .result-cell { padding:10px 5px; border-radius:12px; }
  .result-cell strong { font-size:21px; letter-spacing:1px; }
  .result-cell.featured strong { font-size:24px; }
  .result-cell span { font-size:9px; }
}

@media (min-width: 1200px) {
  .results-board { grid-template-columns:repeat(2,minmax(420px,1fr)); }
  .result-cell strong { font-size:30px; }
  .result-cell.featured strong { font-size:35px; }
}


/* ---------- V3.04 rotating location display ---------- */
.rotation-meta { display:flex; align-items:center; justify-content:flex-end; gap:12px; color:var(--muted); font-size:13px; }
.rotation-meta strong { color:#fff; font-size:15px; letter-spacing:.2px; }
.rotation-dots { display:flex; align-items:center; gap:6px; }
.rotation-dot { width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,.18); box-shadow:inset 0 0 0 1px rgba(255,255,255,.08); transition:all .25s ease; }
.rotation-dot.active { width:22px; border-radius:999px; background:var(--accent); box-shadow:0 0 16px rgba(244,180,0,.38); }
.results-board.rotating-board { grid-template-columns:minmax(0, 980px); justify-content:center; min-height:390px; }
.rotating-card { width:100%; min-height:350px; animation:rotationCardIn .42s ease both; display:flex; flex-direction:column; justify-content:center; }
.rotating-card .result-location { font-size:clamp(30px,5vw,62px); letter-spacing:-1.2px; }
.rotating-card .result-date { font-size:15px; margin-top:6px; }
.rotating-card .session-pill { font-size:14px; padding:9px 15px; }
.rotating-card .lots-row { margin-top:26px; }
.rotating-card .result-cell { min-height:108px; }
.rotating-card .result-cell strong { font-size:clamp(28px,4.3vw,54px); }
.rotating-card .big-results-row .result-cell strong { font-size:clamp(34px,5vw,64px); }
.waiting-card .results-empty { min-height:220px; }
@keyframes rotationCardIn { from { opacity:.25; transform:translateY(10px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
@media (max-width:700px) {
  .rotation-meta { gap:8px; font-size:11px; }
  .rotation-meta strong { font-size:13px; }
  .results-board.rotating-board { min-height:0; }
  .rotating-card { min-height:0; }
  .rotating-card .result-location { font-size:34px; }
  .rotating-card .lots-row { margin-top:16px; }
  .rotating-card .result-cell { min-height:84px; }
}
\n\n/* ---------- V3.21 BORLETTE POS TV DISPLAY REDESIGN ---------- */\n:root {\n  --tv-blue:#0a2f78;\n  --tv-blue-2:#1463d6;\n  --tv-red:#d71920;\n  --tv-gold:#f7bf24;\n  --tv-gold-2:#ffe37a;\n}\nbody {\n  background:\n    radial-gradient(900px 520px at 50% -12%, rgba(20,99,214,.22), transparent 62%),\n    radial-gradient(640px 460px at 90% 12%, rgba(247,191,36,.10), transparent 64%),\n    linear-gradient(180deg,#050914 0%,#081426 50%,#050914 100%);\n}\nbody::before {\n  opacity:.85;\n  background-image:\n    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),\n    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);\n  background-size:34px 34px;\n}\n.top-bar {\n  min-height:82px;\n  padding:12px 28px;\n  background:linear-gradient(90deg,rgba(5,12,28,.98),rgba(8,28,61,.96),rgba(5,12,28,.98));\n  border-bottom:2px solid rgba(247,191,36,.45);\n  box-shadow:0 12px 40px rgba(0,0,0,.34),0 1px 0 rgba(255,255,255,.05) inset;\n}\n.brand-logo { width:62px;height:62px;border-radius:16px;background:#fff;padding:3px;box-shadow:0 0 0 2px rgba(247,191,36,.38),0 8px 28px rgba(0,0,0,.42); }\n.brand-name { font-size:25px;font-weight:900;letter-spacing:-.7px;color:#fff;background:none;-webkit-text-fill-color:initial; }\n.brand-tag { color:#a8c9ff;font-size:10px;font-weight:800;letter-spacing:1.4px; }\n.clock { color:var(--tv-gold-2);font-size:30px;text-shadow:0 0 18px rgba(247,191,36,.22); }\n.top-meta { background:rgba(15,157,88,.12);border-color:rgba(52,211,153,.35); }\n.live-mini-dot,.ticker-pulse { display:inline-block;width:9px;height:9px;border-radius:50%;background:#31e68a;box-shadow:0 0 0 5px rgba(49,230,138,.08),0 0 16px rgba(49,230,138,.8);animation:pulse 1.3s infinite; }\n.hero { padding:18px 28px 12px; }\n.hero-inner {\n  min-height:215px;\n  padding:24px;\n  border-radius:26px;\n  border:1px solid rgba(247,191,36,.32);\n  background:\n    linear-gradient(120deg,rgba(8,35,82,.96),rgba(10,24,52,.92) 52%,rgba(64,20,20,.50)),\n    radial-gradient(440px 240px at 50% 110%,rgba(247,191,36,.16),transparent 68%);\n  box-shadow:0 24px 70px rgba(0,0,0,.34),inset 0 1px rgba(255,255,255,.05);\n}\n.hero-label { color:#ffe28a;font-size:11px;letter-spacing:2.4px;display:flex;justify-content:center;align-items:center;gap:9px; }\n.hero-game { font-size:clamp(34px,4.4vw,66px);line-height:1.02;margin:8px 0 4px;text-transform:uppercase;text-shadow:0 6px 24px rgba(0,0,0,.35); }\n.hero-time { color:#b9cbed;font-size:14px; }\n.balls-stage { margin:18px 0 8px;gap:14px; }\n.balls-stage .ball { width:72px;height:72px;background:radial-gradient(circle at 32% 26%,#fff9cf 0 7%,var(--tv-gold-2) 8%,var(--tv-gold) 58%,#b87800 100%);border:3px solid rgba(255,255,255,.76);font-size:30px;color:#07142d;box-shadow:0 12px 28px rgba(0,0,0,.36),0 0 25px rgba(247,191,36,.18); }\n.hero-next { display:none; }\n.board-section { padding:8px 28px 14px; }\n.board-heading { margin-bottom:12px;align-items:center; }\n.board-heading h2 { font-size:26px;text-transform:uppercase;letter-spacing:.2px; }\n.board-kicker { color:#7fb3ff; }\n.rotation-meta { padding:8px 12px;border:1px solid rgba(113,159,230,.18);border-radius:999px;background:rgba(11,28,56,.72); }\n.results-board.rotating-board { grid-template-columns:minmax(0,1120px);min-height:390px; }\n.rotating-card { min-height:382px;border-radius:28px;padding:26px 30px; }\n.result-set-card { background:linear-gradient(140deg,rgba(11,31,66,.98),rgba(7,18,39,.98));border:1px solid rgba(95,145,220,.26);box-shadow:0 28px 70px rgba(0,0,0,.34); }\n.result-set-card.latest-set { border-color:rgba(247,191,36,.55);box-shadow:0 28px 76px rgba(0,0,0,.35),0 0 42px rgba(247,191,36,.08); }\n.result-set-card::before { content:"OFFICIAL";position:absolute;right:24px;bottom:19px;font-size:74px;font-weight:900;letter-spacing:-4px;color:rgba(255,255,255,.018);pointer-events:none; }\n.result-set-head { align-items:center;margin-bottom:22px;padding-bottom:18px;border-bottom:1px solid rgba(109,151,216,.17); }\n.rotating-card .result-location { font-size:clamp(38px,5vw,68px);line-height:1;font-weight:950;text-transform:uppercase;letter-spacing:-1.8px; }\n.result-date { color:#8fb8f4;font-size:13px; }\n.session-pill { padding:10px 18px;font-size:13px;letter-spacing:1.5px;border-width:1px; }\n.session-pill.morning { color:#081529;background:linear-gradient(135deg,#ffe58a,#f6b91d);border-color:#ffe69c; }\n.session-pill.evening { color:#fff;background:linear-gradient(135deg,#6f36c9,#a34de0);border-color:#c78cff; }\n.session-pill.night { color:#dff2ff;background:linear-gradient(135deg,#0b4d92,#092957);border-color:#3288e0;box-shadow:0 0 24px rgba(50,136,224,.15); }\n.rotating-card .lots-row { gap:14px;margin-top:0; }\n.rotating-card .big-results-row { gap:14px;margin-top:14px; }\n.result-cell { min-height:118px;padding:13px 10px 15px;border-radius:20px;border:1px solid rgba(100,145,212,.24);background:linear-gradient(180deg,rgba(4,13,30,.72),rgba(7,23,48,.76)); }\n.result-cell span { color:#92add3;font-size:11px;font-weight:900;letter-spacing:1.3px;margin-bottom:9px; }\n.result-cell strong { display:flex;justify-content:center;align-items:center; }\n.number-disc {\n  display:inline-flex;align-items:center;justify-content:center;min-width:100px;min-height:70px;padding:8px 18px;border-radius:999px;\n  font-style:normal;font-family:"JetBrains Mono",monospace;font-weight:900;font-size:clamp(32px,4.2vw,57px);letter-spacing:2px;color:#081326;\n  background:radial-gradient(circle at 35% 22%,#fffbd7 0 9%,#ffe472 11%,#f8bd22 62%,#b97200 100%);\n  border:3px solid rgba(255,255,255,.68);box-shadow:0 12px 25px rgba(0,0,0,.3),0 0 25px rgba(247,191,36,.10);\n}\n.result-cell.featured .number-disc { background:radial-gradient(circle at 35% 22%,#fff 0 8%,#f3f8ff 10%,#b8d6ff 42%,#3c88ee 72%,#1550a6 100%);color:#061128;border-color:#dcecff; }\n.result-source { margin-top:16px;font-size:10px;color:#7899c7; }\n.results-ticker { position:relative;z-index:2;margin:0 28px 18px;display:flex;align-items:stretch;min-height:48px;border:1px solid rgba(247,191,36,.30);border-radius:14px;overflow:hidden;background:#071426;box-shadow:0 12px 28px rgba(0,0,0,.24); }\n.ticker-label { flex:none;display:flex;align-items:center;gap:9px;padding:0 18px;background:linear-gradient(135deg,#b70e18,#e3232c);font-weight:950;letter-spacing:1.2px;color:#fff;z-index:2; }\n.ticker-window { overflow:hidden;display:flex;align-items:center;flex:1;mask-image:linear-gradient(90deg,transparent,#000 3%,#000 97%,transparent); }\n.ticker-track { display:flex;align-items:center;width:max-content;white-space:nowrap;animation:tickerMove 44s linear infinite; }\n.ticker-item { display:inline-flex;align-items:center;gap:12px;padding:0 24px;border-right:1px solid rgba(255,255,255,.10);height:46px;color:#d8e6fb; }\n.ticker-item b { color:#fff;text-transform:uppercase; }\n.ticker-item i { font-style:normal;font-size:9px;color:#82a8df;border:1px solid rgba(130,168,223,.25);border-radius:999px;padding:3px 6px; }\n.ticker-item strong { color:#ffe078;font-family:"JetBrains Mono",monospace; }\n@keyframes tickerMove { from{transform:translateX(0)} to{transform:translateX(-50%)} }\n.history { opacity:.90; }\n.history h3 { text-transform:uppercase;letter-spacing:1px;font-size:15px;color:#9eb6d7; }\n.foot { background:rgba(3,9,20,.94);border-top:1px solid rgba(77,119,181,.18);font-size:11px; }\n@media (min-width:1500px) { .rotating-card { min-height:430px;padding:32px 38px; }.result-cell{min-height:132px}.number-disc{min-width:126px;min-height:82px}.top-bar{padding-left:42px;padding-right:42px}.board-section{padding-left:42px;padding-right:42px}.results-ticker{margin-left:42px;margin-right:42px} }\n@media (max-width:800px) {\n  .top-bar{grid-template-columns:1fr auto;padding:10px 12px}.brand-logo{width:50px;height:50px}.brand-name{font-size:19px}.brand-tag{font-size:8px}.clock{font-size:20px}.top-meta{display:none}.hero{padding:12px}.hero-inner{padding:18px;min-height:0}.hero-game{font-size:30px}.balls-stage .ball{width:58px;height:58px;font-size:24px}.board-section{padding:4px 12px}.board-heading h2{font-size:20px}.rotation-meta span:last-child{display:none}.rotating-card{padding:18px 14px;min-height:0}.rotating-card .result-location{font-size:30px}.result-set-head{margin-bottom:14px;padding-bottom:12px}.session-pill{padding:7px 10px;font-size:10px}.rotating-card .lots-row,.rotating-card .big-results-row{gap:7px}.result-cell{min-height:88px;padding:10px 4px}.number-disc{min-width:62px;min-height:50px;padding:6px 8px;font-size:24px;border-width:2px}.results-ticker{margin:0 12px 12px}.ticker-label{padding:0 10px;font-size:11px}.ticker-item{padding:0 14px;gap:8px}.history{padding-left:12px;padding-right:12px}\n}\n

/* ---------- V3.22 HERO HOUSE ROTATION FIX ---------- */
.hero .balls-stage { width:100%; max-width:1180px; margin:18px auto 6px; display:block; }
.hero-results-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; width:100%; }
.hero-result-item { min-height:94px; padding:10px 8px 12px; border-radius:18px; display:flex; flex-direction:column; align-items:center; justify-content:center; background:linear-gradient(180deg,rgba(4,13,30,.76),rgba(8,26,55,.82)); border:1px solid rgba(117,160,226,.28); box-shadow:0 10px 24px rgba(0,0,0,.22); }
.hero-result-item span { color:#9bb8e0; font-size:10px; font-weight:900; letter-spacing:1.25px; margin-bottom:7px; }
.hero-result-item strong { min-width:72px; padding:7px 13px; border-radius:999px; font-family:"JetBrains Mono",monospace; font-size:clamp(27px,3vw,43px); line-height:1.05; letter-spacing:1.5px; color:#07142d; background:radial-gradient(circle at 35% 22%,#fffbd7 0 8%,#ffe472 10%,#f8bd22 62%,#b97200 100%); border:2px solid rgba(255,255,255,.75); box-shadow:0 8px 20px rgba(0,0,0,.3),0 0 18px rgba(247,191,36,.12); }
.hero-result-item.first strong { background:radial-gradient(circle at 35% 22%,#fff 0 8%,#e9f4ff 10%,#a9ceff 42%,#3c88ee 72%,#1550a6 100%); }
.hero-result-item.second strong { background:radial-gradient(circle at 35% 22%,#fff 0 8%,#f4f6f8 10%,#c9d1dc 48%,#8593a7 100%); }
.hero-result-item.third strong { background:radial-gradient(circle at 35% 22%,#fff3de 0 8%,#e8ad73 12%,#bd6c2e 66%,#75401a 100%); }
.hero-result-item.three strong,.hero-result-item.four strong { color:#fff; background:radial-gradient(circle at 35% 22%,#ff8388 0 7%,#e8343b 26%,#c3151c 70%,#74080d 100%); }
.hero-waiting { padding:18px 28px; border:1px dashed rgba(247,191,36,.42); border-radius:16px; color:#ffe28a; font-weight:900; letter-spacing:2px; text-align:center; }
@media (max-width:800px) { .hero-results-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.hero-result-item{min-height:74px;padding:7px 3px}.hero-result-item strong{min-width:54px;padding:6px 8px;font-size:22px}.hero-result-item span{font-size:8px}.hero-result-item.three,.hero-result-item.four{grid-column:auto} }


/* ---------- V3.23 TV SINGLE-SCREEN: HERO + SLIDE ONLY ---------- */
html, body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden !important;
}
body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
}
.top-bar {
  position: relative !important;
  top: auto !important;
  flex: 0 0 74px;
  min-height: 74px;
  padding: 8px 24px;
}
.brand-logo { width: 54px; height: 54px; }
.brand-name { font-size: 23px; }
.brand-tag { font-size: 9px; }
.clock { font-size: 26px; }
.icon-btn { width: 40px; height: 40px; }

.hero {
  flex: 0 0 36vh;
  min-height: 0;
  padding: 10px 24px 7px;
}
.hero-inner {
  height: 100%;
  min-height: 0;
  padding: 14px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-label { font-size: 10px; }
.hero-game {
  font-size: clamp(30px, 3.8vw, 56px);
  margin: 4px 0 2px;
}
.hero-time { font-size: 12px; }
.hero .balls-stage {
  margin: 10px auto 0;
  max-width: 1220px;
}
.hero-results-grid { gap: 9px; }
.hero-result-item {
  min-height: 74px;
  padding: 7px 6px 8px;
}
.hero-result-item span { margin-bottom: 4px; font-size: 9px; }
.hero-result-item strong {
  min-width: 66px;
  padding: 5px 11px;
  font-size: clamp(24px, 2.65vw, 38px);
}
.hero-waiting { padding: 12px 22px; }

/* The rotating slide uses all remaining TV space. */
.board-section {
  flex: 1 1 auto;
  min-height: 0;
  padding: 5px 24px 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.board-heading { display: none !important; }
.games-grid,
.results-board.rotating-board {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: 100%;
  width: 100%;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1180px);
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
}
.rotating-card,
.result-set-card {
  height: 100%;
  min-height: 0 !important;
  max-height: 100%;
  padding: 16px 24px;
  border-radius: 22px;
  overflow: hidden;
}
.result-set-head {
  margin-bottom: 10px;
  padding-bottom: 10px;
}
.rotating-card .result-location {
  font-size: clamp(30px, 3.8vw, 54px);
}
.result-date { font-size: 11px; }
.session-pill { padding: 7px 13px; font-size: 11px; }
.rotating-card .lots-row { gap: 10px; }
.rotating-card .big-results-row { gap: 10px; margin-top: 9px; }
.result-cell {
  min-height: 78px;
  padding: 7px 7px 8px;
  border-radius: 16px;
}
.result-cell span { margin-bottom: 5px; font-size: 9px; }
.number-disc {
  min-width: 76px;
  min-height: 52px;
  padding: 5px 12px;
  font-size: clamp(25px, 3vw, 42px);
}
.result-source { margin-top: 7px; font-size: 9px; }

/* Keep these nodes for JS compatibility, but never show them on TV. */
.results-ticker,
.history,
.foot {
  display: none !important;
}

/* Make the fullscreen overlay itself fit the TV with no page movement. */
.draw-overlay { position: fixed; inset: 0; overflow: hidden; }

@media (min-width: 1600px) {
  .top-bar { flex-basis: 82px; min-height: 82px; }
  .hero { flex-basis: 35vh; }
  .rotating-card, .result-set-card { padding: 18px 30px; }
  .result-cell { min-height: 88px; }
  .number-disc { min-width: 92px; min-height: 58px; }
}

@media (max-height: 760px) {
  .top-bar { flex-basis: 64px; min-height: 64px; padding-top: 5px; padding-bottom: 5px; }
  .brand-logo { width: 46px; height: 46px; }
  .brand-name { font-size: 20px; }
  .clock { font-size: 22px; }
  .hero { flex-basis: 34vh; padding-top: 7px; }
  .hero-inner { padding: 10px 18px; }
  .hero-game { font-size: clamp(26px, 3.2vw, 44px); }
  .hero-result-item { min-height: 62px; }
  .hero-result-item strong { font-size: clamp(21px, 2.35vw, 32px); }
  .rotating-card, .result-set-card { padding: 12px 20px; }
  .result-set-head { margin-bottom: 7px; padding-bottom: 7px; }
  .rotating-card .result-location { font-size: clamp(26px, 3.3vw, 44px); }
  .result-cell { min-height: 65px; }
  .number-disc { min-height: 44px; font-size: clamp(22px, 2.5vw, 34px); }
}

@media (max-width: 800px) {
  html,body { overflow:hidden !important; }
  .top-bar { flex:0 0 64px; min-height:64px; }
  .hero { flex:0 0 38vh; padding:7px 10px 4px; }
  .hero-results-grid { grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; }
  .hero-result-item { min-height:58px; }
  .hero-result-item strong { min-width:45px; font-size:19px; padding:4px 5px; }
  .hero-result-item span { font-size:7px; }
  .board-section { padding:4px 10px 8px; }
  .rotating-card,.result-set-card { padding:10px; }
  .rotating-card .lots-row,.rotating-card .big-results-row { gap:5px; }
  .result-cell { min-height:58px; }
  .number-disc { min-width:48px; min-height:38px; font-size:20px; padding:3px 6px; }
}
