/* Global Reset & Styling Variables */
:root {
  --bg-gradient: radial-gradient(circle at center, #131b3d 0%, #080c1e 100%);
  --surface-glass: rgba(22, 29, 60, 0.5);
  --surface-glass-hover: rgba(22, 29, 60, 0.75);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-active: rgba(0, 210, 255, 0.3);
  
  /* Color Palette */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --color-accent: #00d2ff;
  --color-accent-rgb: 0, 210, 255;
  --color-bonus: #ef4444;
  --color-bonus-rgb: 255, 170, 0;
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  
  /* Layout sizes */
  --header-height: 80px;
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --border-radius-sm: 6px;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

/* Header & Nav Styling */
.app-header {
  height: var(--header-height);
  background: rgba(8, 12, 30, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  font-size: 1.8rem;
  color: var(--color-accent);
  text-shadow: 0 0 10px rgba(var(--color-accent-rgb), 0.5);
  animation: spinSlow 12s linear infinite;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.logo h1 .accent {
  color: var(--color-accent);
  text-shadow: 0 0 10px rgba(var(--color-accent-rgb), 0.3);
}

.nav-tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.25rem;
  border-radius: 30px;
  border: 1px solid var(--border-glass);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.tab-btn.active {
  color: #080c1e;
  background: var(--color-accent);
  box-shadow: 0 0 15px rgba(var(--color-accent-rgb), 0.4);
}

.sound-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-family: inherit;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.sound-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-accent);
}

.sound-btn.sound-on {
  border-color: var(--color-success);
  color: var(--color-success);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* Main Content Area */
.main-content {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

/* Glass Panels */
.glass-card {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  background: var(--surface-glass-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

/* TAB TOGGLING */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.tab-content.active {
  display: block;
}

/* --- LIVE DRAW TAB STYLES --- */
.live-grid-container {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Keno Board */
.keno-board-wrapper {
  background: rgba(14, 21, 52, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 1.75rem;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.4);
}

.board-header {
  margin-bottom: 1.5rem;
}

.board-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.board-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.keno-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.6rem;
}

.grid-cell {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  user-select: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.grid-cell::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  opacity: 0;
  transition: var(--transition-smooth);
}

/* Number Hit Animation styles */
.grid-cell.hit {
  background: radial-gradient(circle, #00d2ff 0%, #006699 100%);
  border-color: #00d2ff;
  color: #080c1e;
  font-weight: 800;
  box-shadow: 0 0 15px rgba(var(--color-accent-rgb), 0.6);
  transform: scale(1.12);
  animation: numberPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  z-index: 2;
}

.grid-cell.bonus-hit {
  background: radial-gradient(circle, #ffcc00 0%, #d97706 100%);
  border-color: #ffaa00;
  color: #080c1e;
  font-weight: 800;
  box-shadow: 0 0 25px rgba(var(--color-bonus-rgb), 0.8), 0 0 5px #fff;
  transform: scale(1.2);
  animation: bonusPop 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite alternate;
  z-index: 3;
}

/* Right Side - Live Status Panel */
.live-status-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stage-card {
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: 2rem;
  overflow: hidden;
}

.status-label {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.status-label.idle {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.status-label.countdown {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
  animation: pulseBlink 1s ease infinite;
}

.status-label.drawing {
  background: rgba(239, 68, 110, 0.15);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 110, 0.3);
  animation: pulseBlink 0.8s ease infinite;
}

.status-label.complete {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.display-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 1rem 0;
}

.idle-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  max-width: 300px;
}

.idle-icon {
  font-size: 3rem;
  opacity: 0.3;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-accent);
  animation: dotBlink 1.5s infinite;
}

/* Circular Countdown Styles */
.countdown-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  position: absolute;
  transform: rotate(-90deg);
}

.progress-ring__circle {
  transition: stroke-dashoffset 0.1s linear;
  transform-origin: 50% 50%;
}

.countdown-value {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-primary);
  text-shadow: 0 0 15px rgba(var(--color-accent-rgb), 0.4);
  animation: numberScale 1s infinite;
}

/* Large reveal showcase ball */
.draw-ball-showcase {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #00d2ff 40%, #0055aa 85%);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 30px rgba(var(--color-accent-rgb), 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #080c1e;
  animation: ballSpur 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.draw-ball-showcase.bonus {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #ffcc00 40%, #d97706 85%);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 45px rgba(var(--color-bonus-rgb), 0.8);
}

.draw-ball-showcase span:first-child {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.1;
}

.ball-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.8;
}

.draw-details-row {
  display: flex;
  justify-content: space-around;
  width: 100%;
  border-top: 1px solid var(--border-glass);
  padding-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.draw-details-row .highlight {
  color: var(--text-primary);
  font-weight: 600;
}

/* Draw Progress Track */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.progress-bar-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent) 0%, #0099ff 100%);
  box-shadow: 0 0 10px rgba(var(--color-accent-rgb), 0.5);
  width: 0%;
  border-radius: 10px;
  transition: width 0.3s ease;
}

/* Drawn Sequence Strip */
.drawn-numbers-strip {
  padding: 1.25rem 1.5rem;
}

.drawn-numbers-strip h4 {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}

.strip-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 40px;
  align-items: center;
}

.empty-strip-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  width: 100%;
  text-align: center;
  padding: 0.5rem 0;
}

.strip-ball {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #00d2ff 45%, #0055aa 90%);
  color: #080c1e;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  animation: ballSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.strip-ball.bonus {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #ffcc00 45%, #d97706 90%);
  box-shadow: 0 0 10px rgba(var(--color-bonus-rgb), 0.8);
}

/* Sidebets Card & Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 0.75rem;
}

.stat-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.75rem;
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-lbl {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: capitalize;
}

.bonus-text {
  color: var(--color-bonus) !important;
  text-shadow: 0 0 10px rgba(var(--color-bonus-rgb), 0.3);
}

/* Primary Button style */
.primary-btn {
  background: linear-gradient(135deg, #00d2ff 0%, #0066cc 100%);
  border: none;
  color: #080c1e;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.8rem 1.5rem;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
  transition: var(--transition-smooth);
  margin-top: 0.75rem;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
  background: linear-gradient(135deg, #33e0ff 0%, #0088ff 100%);
}

.primary-btn:active {
  transform: translateY(0);
}

.dev-actions-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.dev-actions-card h4 {
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  color: var(--color-warning);
  margin-bottom: 0.4rem;
}


/* --- TODAY'S DRAWS TAB STYLES --- */
.history-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: start;
}

.history-stats-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.8rem;
}

.stats-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
}

.date-badge {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  color: var(--text-secondary);
}

.stats-summary-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.summary-tile {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-glass);
  padding: 1rem;
  border-radius: var(--border-radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tile-title {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tile-val {
  font-size: 1.3rem;
  font-weight: 800;
}

.hot-numbers-list h4 {
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}

.hot-nums-flex {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hot-num-badge {
  padding: 0.4rem 0.8rem;
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.2);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.hot-num-badge .count {
  font-size: 0.75rem;
  color: var(--color-accent);
  background: rgba(0,0,0,0.3);
  padding: 0.05rem 0.35rem;
  border-radius: 10px;
}

/* History List controls */
.list-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-glass);
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-smooth);
}

.search-box input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 10px rgba(var(--color-accent-rgb), 0.2);
}

.date-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.date-picker-wrapper input {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-glass);
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
}

/* Draws Scroll Area */
.draws-scroll-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 700px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* Draw Card */
.draw-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
}

.draw-card-meta {
  flex: 1;
  border-right: 1px solid var(--border-glass);
  padding-right: 1.5rem;
}

.draw-card-id {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.draw-card-time {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.draw-card-sidebets {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.draw-card-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.history-ball {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-ball.bonus {
  background: radial-gradient(circle at 35% 35%, #ffcc00 0%, #d97706 100%);
  border-color: #ffaa00;
  color: #080c1e;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(var(--color-bonus-rgb), 0.4);
}

/* Loading & Empty States */
.loading-state, .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
  text-align: center;
  gap: 1rem;
}

.loading-state i, .empty-state i {
  font-size: 2.5rem;
  color: var(--color-accent);
}

.empty-state p {
  max-width: 300px;
  font-size: 0.95rem;
}

/* Footer */
.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-glass);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(8, 12, 30, 0.9);
}

/* --- KEYFRAME ANIMATIONS --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulseBlink {
  0% { opacity: 0.6; }
  50% { opacity: 1; filter: brightness(1.2); }
  100% { opacity: 0.6; }
}

@keyframes dotBlink {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

@keyframes numberScale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes numberPop {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.25); }
  100% { transform: scale(1.12); opacity: 1; }
}

@keyframes bonusPop {
  0% { transform: scale(1.1); box-shadow: 0 0 15px rgba(var(--color-bonus-rgb), 0.6); }
  100% { transform: scale(1.2); box-shadow: 0 0 30px rgba(var(--color-bonus-rgb), 1), 0 0 10px #fff; }
}

@keyframes ballSpur {
  0% { transform: scale(0.2) rotate(-180deg); opacity: 0; }
  70% { transform: scale(1.15) rotate(15deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes ballSlideIn {
  from { transform: translateY(15px) scale(0.5); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1100px) {
  .live-grid-container {
    grid-template-columns: 1fr;
  }
  
  .history-container {
    grid-template-columns: 1fr;
  }
  
  .history-stats-panel {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 650px) {
  .app-header {
    flex-direction: column;
    height: auto;
    padding: 1rem;
    gap: 1rem;
  }
  
  .main-content {
    padding: 1rem;
  }
  
  .keno-grid {
    gap: 0.4rem;
  }
  
  .grid-cell {
    font-size: 0.95rem;
  }
  
  .draw-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
  }
  
  .draw-card-meta {
    border-right: none;
    border-bottom: 1px solid var(--border-glass);
    padding-right: 0;
    padding-bottom: 1rem;
    width: 100%;
  }
}

/* --- ADDED FOR SPOILER OVERLAY & MINI KENO GRIDS --- */

.spoiler-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 38, 0.95);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  width: 100%;
  height: 100%;
  min-height: 220px;
  text-align: center;
  animation: fadeIn 0.3s ease;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
  z-index: 5;
}

.spoiler-icon {
  font-size: 2.2rem;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  text-shadow: 0 0 10px rgba(var(--color-accent-rgb), 0.3);
  animation: pulseBlink 2s infinite;
}

.spoiler-overlay h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.spoiler-overlay p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.spoiler-buttons {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 320px;
  justify-content: center;
}

.spoiler-buttons button {
  flex: 1;
  margin-top: 0;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.7rem 1.2rem;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-accent);
  box-shadow: 0 0 10px rgba(var(--color-accent-rgb), 0.2);
}

/* Mini Keno Grid in History Cards */
.mini-keno-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  width: 100%;
  max-width: 380px;
  flex-shrink: 0;
}

.mini-cell {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.mini-cell.hit {
  background: radial-gradient(circle, #00d2ff 0%, #0055aa 100%);
  border-color: #00d2ff;
  color: #080c1e;
  font-weight: 800;
  box-shadow: 0 0 5px rgba(var(--color-accent-rgb), 0.6);
}

.mini-cell.bonus-hit {
  background: radial-gradient(circle, #ffcc00 0%, #d97706 100%);
  border-color: #ffaa00;
  color: #080c1e;
  font-weight: 800;
  box-shadow: 0 0 8px rgba(var(--color-bonus-rgb), 0.8);
}

/* Global Hidden Helper */
.hidden {
  display: none !important;
}

/* Extra mobile screen optimizations */
@media (max-width: 480px) {
  .main-content {
    padding: 0.75rem;
  }
  
  .keno-board-wrapper {
    padding: 0.75rem;
  }
  
  .keno-grid {
    gap: 4px;
  }
  
  .grid-cell {
    font-size: 0.85rem;
  }
  
  .glass-card {
    padding: 1rem;
  }
  
  .stage-card {
    padding: 1.25rem 1rem;
    min-height: 240px;
  }

  .spoiler-overlay {
    padding: 1.25rem 1rem;
    min-height: 200px;
  }

  .spoiler-buttons {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .spoiler-buttons button {
    width: 100%;
  }

  .app-header {
    padding: 0.75rem;
  }
}

/* Board Header Live Info Styles */
.board-live-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.live-indicator {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.live-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-danger);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-danger);
  animation: dotBlink 1s infinite;
}

.board-live-info .divider {
  color: var(--text-muted);
  opacity: 0.5;
}

/* --- KINO7 ORANGE THEME --- */
body.theme-kino7 {
  --bg-gradient: radial-gradient(circle at center, #23150d 0%, #0d0603 100%);
  --surface-glass: rgba(38, 22, 13, 0.45);
  --surface-glass-hover: rgba(38, 22, 13, 0.7);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-active: rgba(255, 119, 0, 0.35);
  
  --color-accent: #ff7700;
  --color-accent-rgb: 255, 119, 0;
  
  background: var(--bg-gradient);
  background-attachment: fixed;
}

body.theme-kino7 .app-header {
  background: rgba(13, 6, 3, 0.85);
}

body.theme-kino7 .app-footer {
  background: rgba(13, 6, 3, 0.9);
}

body.theme-kino7 .keno-board-wrapper {
  background: rgba(33, 18, 10, 0.6);
}

body.theme-kino7 .grid-cell.hit {
  background: radial-gradient(circle, #ff9e00 0%, #ff5500 100%);
  border-color: #ff9e00;
  box-shadow: 0 0 15px rgba(255, 119, 0, 0.6);
}

body.theme-kino7 .mini-cell.hit {
  background: radial-gradient(circle, #ff9e00 0%, #ff5500 100%);
  border-color: #ff9e00;
  box-shadow: 0 0 5px rgba(255, 119, 0, 0.6);
}

body.theme-kino7 .draw-ball-showcase {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #ff7700 40%, #cc3300 85%);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 119, 0, 0.5);
}

body.theme-kino7 .strip-ball {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #ff7700 45%, #cc3300 90%);
}

body.theme-kino7 .progress-fill {
  background: linear-gradient(90deg, #ff7700 0%, #ffaa00 100%);
  box-shadow: 0 0 10px rgba(255, 119, 0, 0.5);
}

body.theme-kino7 .primary-btn {
  background: linear-gradient(135deg, #ff9e00 0%, #ff5500 100%);
  color: #0d0603;
  box-shadow: 0 4px 15px rgba(255, 119, 0, 0.3);
}

body.theme-kino7 .primary-btn:hover {
  background: linear-gradient(135deg, #ffa826 0%, #ff6a00 100%);
  box-shadow: 0 6px 20px rgba(255, 119, 0, 0.5);
}

body.theme-kino7 .hot-num-badge {
  background: rgba(255, 119, 0, 0.08);
  border: 1px solid rgba(255, 119, 0, 0.2);
}

body.theme-kino7 .hot-num-badge .count {
  color: #ff7700;
}

body.theme-kino7 #countdownCircle {
  stroke: #ff7700;
}

body.theme-kino7 .loading-state i, 
body.theme-kino7 .empty-state i {
  color: #ff7700;
}

body.theme-kino7 .spoiler-icon {
  color: #ff7700;
  text-shadow: 0 0 10px rgba(255, 119, 0, 0.3);
}

body.theme-kino7 .secondary-btn:hover {
  border-color: #ff7700;
  box-shadow: 0 0 10px rgba(255, 119, 0, 0.2);
}

body.theme-kino7 .pulse-dot {
  background-color: #ff7700;
  box-shadow: 0 0 10px #ff7700;
}

/* Accessibility / SEO Screen Reader Only Helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

