﻿/* Bingo 75 - Modern UI Design System */
:root {
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-card-alt: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --accent: #f59e0b;

  /* Bingo Column Branding Colors */
  --col-b: #2563eb; /* Blue 1-15 */
  --col-i: #dc2626; /* Red 16-30 */
  --col-n: #d97706; /* Amber/Orange 31-45 */
  --col-g: #16a34a; /* Green 46-60 */
  --col-o: #7c3aed; /* Purple 61-75 */
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Canvas Confetti */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* Top App Header */
.app-header {
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 28px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-badge {
  background: #3b82f6;
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  background: #0f172a;
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
  border: 1px solid var(--border-color);
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.nav-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* Audio Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.toggle-label input[type="checkbox"] {
  accent-color: var(--primary);
  cursor: pointer;
}

/* Main Container */
.main-content {
  flex: 1;
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
}

/* Tab Panes */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   1. HOST / CALLER VIEW
   ================================================================ */
.caller-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
}

@media (max-width: 950px) {
  .caller-layout {
    grid-template-columns: 1fr;
  }
}

/* Left: Sphere Ball & Controls */
.caller-left-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ball-display-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.ball-sphere-stage {
  width: 190px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
}

.ball-inner {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset -10px -10px 20px rgba(0,0,0,0.6),
    inset 10px 10px 20px rgba(255,255,255,0.4),
    0 12px 28px rgba(0,0,0,0.5);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ball-placeholder {
  background: radial-gradient(circle at 35% 35%, #475569, #1e293b);
  border: 3px dashed #64748b;
  color: var(--text-muted);
}

.ball-placeholder-text {
  font-size: 16px;
  font-weight: 600;
}

.ball-rolling {
  animation: rollShake 0.08s infinite alternate;
}

@keyframes rollShake {
  from { transform: rotate(-4deg) scale(0.98); }
  to { transform: rotate(4deg) scale(1.02); }
}

.animate-pop {
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Ball Theme Colors */
.letter-B { background: radial-gradient(circle at 35% 35%, #60a5fa, #1d4ed8); color: #fff; }
.letter-I { background: radial-gradient(circle at 35% 35%, #f87171, #b91c1c); color: #fff; }
.letter-N { background: radial-gradient(circle at 35% 35%, #fbbf24, #b45309); color: #fff; }
.letter-G { background: radial-gradient(circle at 35% 35%, #4ade80, #15803d); color: #fff; }
.letter-O { background: radial-gradient(circle at 35% 35%, #a78bfa, #6d28d9); color: #fff; }

.ball-letter {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.ball-number {
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
}

/* Caller Action Buttons */
.caller-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.btn-draw-main {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  border: none;
  padding: 16px 24px;
  font-size: 18px;
  font-weight: 800;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transition: all 0.2s ease;
}

.btn-draw-main:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

.btn-draw-main:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auto-controls-row {
  display: flex;
  gap: 8px;
}

.btn-auto {
  flex: 1;
  background: var(--bg-card-alt);
  color: #fff;
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-auto:hover {
  background: #475569;
}

.btn-active-pulse {
  background: #dc2626 !important;
  animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.speed-select {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: #fff;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
}

.btn-reset-game {
  background: transparent;
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-reset-game:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* History Bar */
.history-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
}

.card-heading-sm {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 12px;
}

.history-balls-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.history-ball {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.history-latest {
  outline: 3px solid #facc15;
  outline-offset: 2px;
}

.h-letter {
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.h-number {
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

/* Right: 75-Ball Master Board */
.master-board-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
}

.board-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.board-title {
  font-size: 18px;
  font-weight: 800;
}

.board-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-item {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-item strong {
  color: #fff;
  font-size: 15px;
}

.progress-track {
  width: 120px;
  height: 8px;
  background: #334155;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  width: 0%;
  transition: width 0.3s ease;
}

/* Master Board Rows */
.board-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.board-row {
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.board-row-header {
  font-size: 26px;
  font-weight: 900;
  text-align: center;
  border-radius: 8px;
  padding: 4px 0;
}

.board-row.letter-B .board-row-header { color: #60a5fa; }
.board-row.letter-I .board-row-header { color: #f87171; }
.board-row.letter-N .board-row-header { color: #fbbf24; }
.board-row.letter-G .board-row-header { color: #4ade80; }
.board-row.letter-O .board-row-header { color: #c084fc; }

.board-numbers-group {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 6px;
}

@media (max-width: 800px) {
  .board-numbers-group {
    grid-template-columns: repeat(8, 1fr);
  }
}

.board-cell {
  aspect-ratio: 1;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  transition: all 0.25s ease;
}

.board-row.letter-B .board-cell.called { background: #2563eb; color: #fff; border-color: #60a5fa; box-shadow: 0 0 10px rgba(37, 99, 235, 0.5); }
.board-row.letter-I .board-cell.called { background: #dc2626; color: #fff; border-color: #f87171; box-shadow: 0 0 10px rgba(220, 38, 38, 0.5); }
.board-row.letter-N .board-cell.called { background: #d97706; color: #fff; border-color: #fbbf24; box-shadow: 0 0 10px rgba(217, 119, 6, 0.5); }
.board-row.letter-G .board-cell.called { background: #16a34a; color: #fff; border-color: #4ade80; box-shadow: 0 0 10px rgba(22, 163, 74, 0.5); }
.board-row.letter-O .board-cell.called { background: #7c3aed; color: #fff; border-color: #c084fc; box-shadow: 0 0 10px rgba(124, 58, 237, 0.5); }

.animate-flash {
  animation: flashRing 0.6s ease-out;
}

@keyframes flashRing {
  0% { transform: scale(1.4); filter: brightness(2); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* ================================================================
   2. PRINTABLE CARDS STUDIO VIEW
   ================================================================ */
.generator-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gen-controls-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
}

.gen-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input, .form-select {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary);
}

.gen-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.btn-gen {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.btn-print {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Print Preview Container on Screen */
.preview-wrapper {
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  max-height: 750px;
  overflow-y: auto;
}

/* Screen representation of A4 pages */
.print-page {
  background: #ffffff;
  color: #1e293b;
  margin: 0 auto 30px auto;
  max-width: 210mm;
  min-height: 297mm;
  padding: 12mm 10mm;
  box-sizing: border-box;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  display: grid;
  gap: 8mm;
}

.print-page.layout-2 {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(2, 1fr);
}

.print-page.layout-4 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.print-page.layout-6 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

/* Single Printable Bingo Card */
.bingo-print-card {
  border: 2px solid #0f172a;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  position: relative;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #cbd5e1;
}

.card-brand {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 0.5px;
}

.brand-subtitle {
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
}

.card-badge {
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}

/* Card Table Grid */
.bingo-table {
  width: 100%;
  display: flex;
  flex-direction: column;
  border: 2px solid #0f172a;
  border-radius: 8px;
  overflow: hidden;
}

.bingo-table-header {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  text-align: center;
  font-weight: 900;
  font-size: 18px;
  color: #ffffff;
}

.head-b { background: var(--col-b); }
.head-i { background: var(--col-i); }
.head-n { background: var(--col-n); }
.head-g { background: var(--col-g); }
.head-o { background: var(--col-o); }

.bingo-table-body {
  display: flex;
  flex-direction: column;
}

.bingo-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.bingo-cell {
  aspect-ratio: 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  background: #ffffff;
}

.cell-free {
  background: #fef3c7;
  color: #b45309;
  flex-direction: column;
  gap: 2px;
}

.star-icon {
  font-size: 14px;
  color: #d97706;
}

.free-text {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 9px;
  color: #64748b;
  font-weight: 600;
}

/* Eco Black & White Theme */
.theme-eco-bw .bingo-table-header {
  background: #0f172a;
}
.theme-eco-bw .head-b,
.theme-eco-bw .head-i,
.theme-eco-bw .head-n,
.theme-eco-bw .head-g,
.theme-eco-bw .head-o {
  background: #0f172a !important;
  color: #ffffff !important;
  border-right: 1px solid #ffffff;
}
.theme-eco-bw .cell-free {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

/* ================================================================
   3. VIRTUAL PLAYER CARD VIEW
   ================================================================ */
.player-layout {
  max-width: 550px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.player-controls-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.player-id-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-card-id {
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
}

.player-win-banner {
  display: none;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.win-title {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 6px;
}

.win-desc {
  font-size: 15px;
}

.player-card-box {
  background: #1e293b;
  border: 3px solid #3b82f6;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.player-grid-header {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}

.p-head {
  padding: 10px 0;
}

.player-grid-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.player-cell {
  aspect-ratio: 1;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: all 0.15s ease;
}

.player-cell:hover {
  border-color: #60a5fa;
  transform: scale(1.03);
}

/* Daub / Stamped State */
.player-cell.daubed {
  background: #1e3a8a;
  border-color: #3b82f6;
  color: #ffffff;
}

.player-cell.daubed::after {
  content: '';
  position: absolute;
  width: 75%;
  height: 75%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.8) 0%, rgba(220, 38, 38, 0.4) 100%);
  border: 2px solid #ef4444;
  pointer-events: none;
  animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.player-cell.cell-free.daubed::after {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.8) 0%, rgba(217, 119, 6, 0.4) 100%);
  border-color: #f59e0b;
}

.player-cell.cell-winning {
  background: #065f46 !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.6);
  animation: pulseGreen 1.2s infinite;
}

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

/* ================================================================
   4. CHECKER VIEW
   ================================================================ */
.checker-layout {
  max-width: 650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.checker-input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
}

.checker-form-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.checker-results-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
}

.alert-box {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #a7f3d0;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #f59e0b;
  color: #fde68a;
}

.alert-icon {
  font-size: 24px;
}

.alert-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
  color: #fff;
}

.checker-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin: 12px 0;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}

.dot-win { background: #10b981; }
.dot-called { background: #3b82f6; }
.dot-uncalled { background: #475569; }

.checker-mini-card {
  border: 2px solid #475569;
  border-radius: 12px;
  overflow: hidden;
  max-width: 320px;
  margin: 0 auto;
}

.mini-header {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  text-align: center;
  background: #334155;
  color: #fff;
  font-weight: 800;
  padding: 6px 0;
}

.mini-body {
  display: flex;
  flex-direction: column;
}

.mini-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.mini-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #334155;
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
  background: #0f172a;
}

.mini-cell.is-called {
  background: #1e3a8a;
  color: #fff;
}

.mini-cell.is-winning {
  background: #065f46 !important;
  color: #fff !important;
  font-weight: 900;
  border-color: #34d399;
}
/* QR Modal Backdrop and Box */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
  box-sizing: border-box;
}

.modal-box {
  background: #1e293b;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  max-width: 420px;
  width: 100%;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.btn-modal-close:hover {
  color: #fff;
}

.btn-mobile-connect {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
  transition: all 0.2s ease;
}

.btn-mobile-connect:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.5);
}
/* Room Code & Anti-Cheat Lock Ticket Styles */
.active-room-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #fbbf24;
}

.room-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.badge-room-code {
  background: #f59e0b;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.badge-lock-status {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.status-locked {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #34d399;
}

.status-unlocked {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}

/* Ticket Select Box */
.ticket-select-box {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid #3b82f6;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.ticket-select-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-lock-ticket {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  white-space: nowrap;
  transition: all 0.2s ease;
  height: 38px;
}

.btn-lock-ticket:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.6);
}