/* ================================================================
   BingoLive — Mobile-First Stylesheet
   Primary:  #0f3460  (dark blue)
   Accent:   #e94560  (red/pink)
   Surface:  #16213e  (dark panel)
   ================================================================ */

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0e1a;
  color: #e8eaf6;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: #e94560; text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #1e2540; padding: 2px 6px; border-radius: 4px; font-size: .85em; }

/* ── Utility ───────────────────────────────────────────────────── */
.muted       { color: #7b8cb5; }
.hint-text   { font-size: .78rem; color: #7b8cb5; margin-top: 6px; text-align: center; }
.text-center { text-align: center; }
.empty-row   { text-align: center; color: #7b8cb5; padding: 24px !important; }
.empty-state {
  text-align: center; color: #7b8cb5; padding: 48px 16px; font-size: 1rem;
}
.empty-state a { color: #e94560; }

/* ── Alerts ────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: 10px; font-size: .88rem;
  margin-bottom: 16px; border: 1px solid transparent;
}
.alert-error   { background: #2d1018; color: #f87171; border-color: #7f1d1d; }
.alert-success { background: #0d2d1c; color: #4ade80; border-color: #14532d; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn-primary, .btn-secondary, .btn-danger, .btn-ok {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border: none; border-radius: 10px; font-size: 1rem;
  font-weight: 700; cursor: pointer; text-decoration: none !important;
  transition: opacity .15s, transform .1s; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary   { background: linear-gradient(135deg, #e94560, #c0392b); color: #fff; }
.btn-secondary { background: #1e2d50; color: #e8eaf6; }
.btn-danger    { background: #7f1d1d; color: #fca5a5; }
.btn-ok        { background: #14532d; color: #86efac; }
.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover,
.btn-ok:hover { opacity: .85; }
.btn-primary:active { transform: scale(.97); }

.btn-full   { width: 100%; }
.btn-lg     { padding: 15px 28px; font-size: 1.1rem; }
.btn-sm     { padding: 7px 14px; font-size: .82rem; border-radius: 7px; }

/* ── Form elements ─────────────────────────────────────────────── */
.field-group { margin-bottom: 14px; }
.field-group label {
  display: block; font-size: .82rem; font-weight: 600;
  color: #a0aec0; margin-bottom: 5px;
}
input[type=text], input[type=email], input[type=password],
input[type=number], select, textarea {
  width: 100%; padding: 11px 14px; background: #1a2035;
  border: 2px solid #2d3b5e; border-radius: 10px; color: #e8eaf6;
  font-size: .95rem; outline: none; transition: border-color .2s;
  -webkit-appearance: none;
}
input:focus, select:focus { border-color: #e94560; }
input::placeholder { color: #4a5568; }
.field-row { display: flex; gap: 12px; }
.field-row .field-group { flex: 1; }
.select-field { height: 44px; }
.select-sm    { padding: 6px 10px; font-size: .82rem; border-radius: 7px; height: auto; width: auto; }

/* ── Status badges ─────────────────────────────────────────────── */
.status-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}
.s-waiting  { background: #1e2d50; color: #7b8cb5; }
.s-lobby    { background: #1c3a4a; color: #38bdf8; }
.s-active   { background: #14532d; color: #86efac; }
.s-finished { background: #1a1a2e; color: #6b7280; }
.s-pending  { background: #451a03; color: #fb923c; }
.s-suspended{ background: #3b0764; color: #c084fc; }

/* ── Tables ────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: 12px; background: #111827; margin-top: 16px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th {
  padding: 12px 14px; text-align: left; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; color: #7b8cb5;
  border-bottom: 1px solid #1e2540; background: #0f1629;
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid #1a2035; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #151f35; }
.code-chip { font-family: monospace; background: #1e2540; padding: 2px 8px; border-radius: 6px; letter-spacing: 2px; }
.inline-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ── Filter tabs ───────────────────────────────────────────────── */
.filter-tabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-tabs a {
  padding: 6px 16px; border-radius: 20px; font-size: .82rem; font-weight: 600;
  color: #7b8cb5; background: #1a2035; transition: all .15s;
}
.filter-tabs a.active,
.filter-tabs a:hover { background: #e94560; color: #fff; text-decoration: none; }

/* ── Auth pages ────────────────────────────────────────────────── */
.auth-body {
  background: linear-gradient(160deg, #0f3460 0%, #16213e 50%, #0a0e1a 100%);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 16px;
}
.auth-wrap {
  background: #111827; border-radius: 18px; width: 100%;
  max-width: 440px; padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.auth-logo    { font-size: 3.5rem; text-align: center; margin-bottom: 8px; }
.auth-heading { font-size: 1.6rem; text-align: center; margin-bottom: 4px; }
.auth-sub     { text-align: center; color: #7b8cb5; font-size: .88rem; margin-bottom: 24px; }
.auth-form    { margin-top: 8px; }
.auth-links   { margin-top: 20px; text-align: center; font-size: .82rem; display: flex; gap: 12px; justify-content: center; }
.back-link    { display: inline-block; color: #7b8cb5; font-size: .85rem; margin-bottom: 16px; }
.back-link:hover { color: #e8eaf6; text-decoration: none; }

.role-tabs { display: flex; background: #1a2035; border-radius: 10px; padding: 4px; margin-bottom: 20px; gap: 4px; }
.role-tab {
  flex: 1; text-align: center; padding: 9px; border-radius: 8px;
  font-size: .85rem; font-weight: 600; color: #7b8cb5; transition: all .2s;
}
.role-tab.active { background: #e94560; color: #fff; }
.role-tab:hover:not(.active) { color: #e8eaf6; text-decoration: none; }

.info-box {
  background: #1a2035; border: 1px solid #2d3b5e; border-radius: 10px;
  padding: 14px 16px; font-size: .84rem; color: #a0aec0; margin-bottom: 18px; line-height: 1.7;
}
.price-pill {
  display: inline-block; background: #0f3460; color: #93c5fd;
  padding: 2px 10px; border-radius: 20px; font-size: .78rem; font-weight: 700; margin: 2px 2px;
}

.radio-group { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.radio-opt {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  background: #1a2035; border: 2px solid #2d3b5e; border-radius: 10px; cursor: pointer;
}
.radio-opt input[type=radio] { margin-top: 3px; accent-color: #e94560; }
.radio-opt strong { display: block; font-size: .9rem; }
.radio-opt small  { color: #7b8cb5; font-size: .78rem; }
.radio-opt.checked,
.radio-opt:has(input:checked) { border-color: #e94560; background: #2d1830; }

/* ── Dashboard layout ──────────────────────────────────────────── */
.dashboard-body { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex-shrink: 0; background: #0c1222;
  display: flex; flex-direction: column; padding: 20px 0;
  border-right: 1px solid #1a2540; position: fixed; top: 0; bottom: 0; left: 0; z-index: 100;
}
.sidebar-brand { padding: 0 20px 20px; font-size: 1.1rem; font-weight: 800; color: #e94560; }
.sidebar-nav { flex: 1; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px; padding: 11px 20px;
  color: #7b8cb5; font-size: .88rem; font-weight: 600; transition: all .15s;
}
.sidebar-nav a:hover  { color: #e8eaf6; background: #1a2035; text-decoration: none; }
.sidebar-nav a.active { color: #e8eaf6; background: #1e2d50; border-right: 3px solid #e94560; }
.nav-icon  { font-size: 1rem; width: 20px; text-align: center; }
.nav-badge {
  margin-left: auto; background: #e94560; color: #fff;
  font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 20px;
}
.sidebar-footer {
  padding: 16px 20px; border-top: 1px solid #1a2540;
  display: flex; flex-direction: column; gap: 6px;
}
.sidebar-user   { font-size: .82rem; color: #7b8cb5; }
.sidebar-logout { font-size: .78rem; color: #e94560; }

.dashboard-main {
  margin-left: 220px; flex: 1; padding: 28px 28px 48px;
  max-width: 1100px;
}
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 1.6rem; font-weight: 800; }
.page-header p  { color: #7b8cb5; font-size: .88rem; margin-top: 4px; }

.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px; margin-bottom: 28px;
}
.stat-card {
  background: #111827; border-radius: 12px; padding: 18px 16px;
  border: 1px solid #1e2540;
}
.stat-card.stat-warn   { border-color: #92400e; background: #1c1409; }
.stat-card.stat-ok     { border-color: #14532d; background: #0a1f12; }
.stat-num  { font-size: 2rem; font-weight: 800; color: #e8eaf6; line-height: 1; }
.stat-lbl  { font-size: .72rem; color: #7b8cb5; margin-top: 5px; text-transform: uppercase; letter-spacing: .6px; }

.action-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px; margin-bottom: 28px;
}
.action-card {
  background: #111827; border: 1px solid #1e2540; border-radius: 14px;
  padding: 20px 18px; display: flex; flex-direction: column; gap: 6px;
  transition: border-color .2s, background .2s; position: relative;
}
.action-card:hover { border-color: #e94560; background: #15202e; text-decoration: none; }
.action-icon  { font-size: 2rem; }
.action-title { font-size: 1rem; font-weight: 700; color: #e8eaf6; }
.action-desc  { font-size: .8rem; color: #7b8cb5; }
.action-badge {
  display: inline-block; background: #e94560; color: #fff;
  font-size: .72rem; font-weight: 700; padding: 2px 10px; border-radius: 20px;
  margin-top: 4px; width: fit-content;
}

.section-heading { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; margin-top: 28px; }

.settings-form { max-width: 640px; }
.settings-section {
  background: #111827; border: 1px solid #1e2540; border-radius: 14px;
  padding: 22px 20px; margin-bottom: 18px;
}
.settings-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; color: #e8eaf6; }

/* Log viewer */
.log-channel-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.log-tab {
  padding: 6px 14px; border-radius: 8px; font-size: .78rem; font-weight: 600;
  background: #1a2035; color: #7b8cb5; border: 1px solid #2d3b5e; cursor: pointer; transition: all .15s;
}
.log-tab.active,
.log-tab:hover  { background: #0f3460; color: #e8eaf6; border-color: #3b5bdb; }
.log-pre {
  background: #080c18; border: 1px solid #1e2540; border-radius: 10px;
  padding: 14px; font-size: .74rem; line-height: 1.6; overflow-x: auto;
  max-height: 400px; overflow-y: auto; color: #a0aec0; white-space: pre-wrap; word-break: break-all;
}
.log-error { color: #f87171; }
.log-warn  { color: #fb923c; }
.log-debug { color: #4b5563; }
.log-empty { color: #4b5563; font-style: italic; }

/* ── Game Master sessions list ────────────────────────────────── */
.sessions-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px; margin-top: 8px;
}
.session-card {
  background: #111827; border: 1px solid #1e2540; border-radius: 14px;
  padding: 18px 16px; display: flex; flex-direction: column; gap: 8px;
}
.session-code  { font-size: 1.6rem; font-weight: 900; letter-spacing: 4px; color: #e94560; font-family: monospace; }
.session-title { font-size: .95rem; font-weight: 600; color: #e8eaf6; }
.session-meta  { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .78rem; color: #7b8cb5; }
.session-actions { margin-top: 4px; }

/* Subscription wall */
.sub-wall {
  text-align: center; background: #111827; border: 1px solid #1e2540;
  border-radius: 18px; padding: 36px 24px; max-width: 480px;
}
.sub-wall-icon { font-size: 3rem; margin-bottom: 12px; }
.sub-wall h2   { font-size: 1.5rem; margin-bottom: 8px; }
.sub-wall p    { color: #7b8cb5; margin-bottom: 20px; }
.plan-cards    { display: flex; gap: 14px; justify-content: center; margin: 20px 0; }
.plan-card {
  background: #1a2035; border: 2px solid #2d3b5e; border-radius: 12px;
  padding: 18px 24px; min-width: 110px; text-align: center; position: relative;
}
.plan-card.plan-featured { border-color: #e94560; background: #2d1830; }
.plan-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: #e94560; color: #fff; font-size: .65rem; font-weight: 700;
  padding: 2px 10px; border-radius: 20px; white-space: nowrap;
}
.plan-name  { font-size: .82rem; color: #7b8cb5; }
.plan-price { font-size: 1.6rem; font-weight: 800; color: #e8eaf6; margin-top: 4px; }
.gcash-box  { background: #0a1f12; border: 1px solid #14532d; border-radius: 10px; padding: 14px 16px; margin: 16px 0; }
.gcash-label  { font-size: .72rem; color: #4ade80; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.gcash-number { font-size: 1.3rem; font-weight: 800; color: #e8eaf6; letter-spacing: 2px; }
.gcash-name   { font-size: .82rem; color: #7b8cb5; margin-top: 2px; }
.pay-form      { display: flex; flex-direction: column; gap: 10px; }
.sub-status-bar {
  display: flex; align-items: center; gap: 12px; background: #0a1f12;
  border: 1px solid #14532d; border-radius: 10px; padding: 12px 16px;
  font-size: .88rem; margin-bottom: 20px; flex-wrap: wrap;
}

/* ── Join page ──────────────────────────────────────────────────── */
.join-body {
  background: linear-gradient(160deg, #0f3460 0%, #16213e 40%, #0a0e1a 100%);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 16px;
}
.join-wrap {
  width: 100%; max-width: 380px; text-align: center;
}
.join-logo  { font-size: 5rem; margin-bottom: 8px; }
.join-title { font-size: 2.2rem; font-weight: 900; color: #fff; margin-bottom: 4px; }
.join-sub   { color: #7b8cb5; font-size: .95rem; margin-bottom: 28px; }
.join-form  { display: flex; flex-direction: column; gap: 12px; }
.code-input {
  width: 100%; font-size: 2.4rem; font-weight: 900; text-align: center;
  letter-spacing: 16px; padding: 16px; background: #111827;
  border: 3px solid #2d3b5e; border-radius: 14px; color: #e94560;
  font-family: monospace; outline: none; text-transform: uppercase;
  -webkit-appearance: none;
}
.code-input:focus { border-color: #e94560; }
.name-input {
  text-align: center; font-size: 1.1rem; padding: 14px;
  background: #111827; border: 2px solid #2d3b5e; border-radius: 14px;
  color: #e8eaf6; outline: none;
}
.name-input:focus { border-color: #e94560; }
.btn-join {
  padding: 16px; font-size: 1.2rem; font-weight: 800;
  background: linear-gradient(135deg, #e94560, #c0392b);
  color: #fff; border: none; border-radius: 14px; cursor: pointer;
  transition: opacity .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.btn-join:active { transform: scale(.97); opacity: .9; }
.join-footer {
  margin-top: 24px; font-size: .82rem; color: #7b8cb5;
  display: flex; gap: 12px; justify-content: center;
}

/* ── Lobby ──────────────────────────────────────────────────────── */
.lobby-body { background: #0a0e1a; min-height: 100vh; padding-bottom: 32px; }
.lobby-wrap { max-width: 500px; margin: 0 auto; padding: 0 16px; }
.lobby-header {
  padding: 20px 0 14px; display: flex; flex-direction: column; gap: 6px; text-align: center;
}
.lobby-game-title { font-size: 1.3rem; font-weight: 800; color: #e8eaf6; }
.lobby-status { font-size: .88rem; color: #7b8cb5; display: flex; align-items: center; justify-content: center; gap: 6px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.waiting { background: #7b8cb5; }
.status-dot.lobby   { background: #38bdf8; animation: blink 1.2s infinite; }
#countdown { color: #e94560; font-weight: 800; font-size: 1.1rem; }

.saved-card-notice {
  background: #0a1f12; border: 2px solid #14532d; border-radius: 12px;
  padding: 14px 16px; margin-bottom: 16px; display: flex;
  align-items: center; gap: 12px; flex-wrap: wrap;
}
.saved-icon   { font-size: 1.5rem; }
.saved-actions { margin-left: auto; display: flex; gap: 8px; }
.saved-tag { text-align: center; font-size: .78rem; color: #4ade80; margin-top: 6px; }
.saved-border { border: 2px solid #4ade80 !important; }
.card-confirmed {
  text-align: center; padding: 14px; background: #0a1f12;
  border: 1px solid #14532d; border-radius: 10px; color: #4ade80;
  font-size: .9rem; font-weight: 600; margin-top: 12px;
}
.card-container { margin: 14px 0; }
.lobby-actions { display: flex; flex-direction: column; gap: 10px; align-items: center; padding-top: 4px; }

/* ── Bingo Card ──────────────────────────────────────────────────── */
.bingo-card {
  background: #111827; border-radius: 14px; overflow: hidden;
  border: 2px solid #1e2540; user-select: none; max-width: 360px; margin: 0 auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.bingo-card-header {
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: linear-gradient(135deg, #e94560, #c0392b);
}
.bingo-col-hdr {
  text-align: center; padding: 10px 0; font-size: 1.3rem; font-weight: 900;
  color: #fff; letter-spacing: 2px;
}
.bingo-card-body {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
}
.bingo-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: clamp(1rem, 5vw, 1.4rem); font-weight: 800; color: #e8eaf6;
  border: 1px solid #1a2540; background: #0f1629; cursor: pointer;
  transition: background .2s, transform .1s; -webkit-tap-highlight-color: transparent;
  min-height: 44px; min-width: 44px; /* accessibility touch target */
}
.bingo-cell:active          { transform: scale(.92); }
.bingo-cell.free-cell       { background: #1c3a4a; color: #38bdf8; font-size: .8rem; font-weight: 800; cursor: default; }
.bingo-cell.marked          { background: #14532d !important; color: #4ade80; }
.bingo-cell.just-marked     { animation: pop-mark .4s ease; }
.bingo-cell.manual-mark     { background: #1c4f2a; color: #86efac; }

/* Smaller card variant for summary */
.bingo-card-sm .bingo-col-hdr { font-size: .9rem; padding: 6px 0; }
.bingo-card-sm .bingo-cell    { font-size: .8rem; min-height: 32px; min-width: 32px; }
.marked-sm                    { background: #1c3a4a !important; color: #38bdf8; }

.card-error {
  text-align: center; padding: 24px; color: #f87171; background: #2d1018;
  border-radius: 12px; border: 1px solid #7f1d1d;
}
.card-placeholder {
  text-align: center; padding: 48px 16px; color: #7b8cb5;
}
.card-placeholder-icon { font-size: 3rem; margin-bottom: 8px; }
.card-placeholder-icon.spinning { animation: spin 1s linear infinite; }

/* ── Play page ──────────────────────────────────────────────────── */
.play-body { background: #0a0e1a; min-height: 100vh; padding-bottom: 32px; }
.play-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: #0c1222; border-bottom: 1px solid #1a2540; position: sticky; top: 0; z-index: 50;
}
.play-game-title  { font-size: .95rem; font-weight: 700; color: #e8eaf6; }
.play-drawn-count { font-size: .82rem; color: #7b8cb5; }

.latest-number-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; background: linear-gradient(135deg, #0f3460, #1a2e5c);
  border-bottom: 1px solid #1e3a6e;
}
.latest-letter-big {
  font-size: 2.6rem; font-weight: 900; color: #e94560; line-height: 1;
  width: 52px; text-align: center;
}
.latest-num-big {
  font-size: 3.5rem; font-weight: 900; color: #fff; line-height: 1;
  min-width: 72px; text-align: center;
}
.latest-waiting { color: #7b8cb5; font-size: .9rem; }

.called-strip {
  display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px;
  scrollbar-width: none; -ms-overflow-style: none;
  border-bottom: 1px solid #1a2540;
}
.called-strip::-webkit-scrollbar { display: none; }
.called-chip {
  flex-shrink: 0; background: #1a2035; border: 1px solid #2d3b5e;
  color: #7b8cb5; font-size: .72rem; font-weight: 700; padding: 4px 8px;
  border-radius: 20px; white-space: nowrap;
}
.called-chip.chip-new { background: #e94560; border-color: #e94560; color: #fff; animation: pop-chip .4s ease; }

.play-card-wrap { padding: 16px 12px; }

.full-board-wrap { padding: 0 12px 16px; }
.full-board-label { font-size: .72rem; color: #7b8cb5; text-transform: uppercase; font-weight: 700; letter-spacing: .8px; margin-bottom: 8px; }
.board-cols-header {
  display: grid; grid-template-columns: repeat(5, 1fr);
  text-align: center; font-size: .8rem; font-weight: 800; color: #e94560;
  margin-bottom: 4px; padding: 0 4px;
}
.full-board {
  display: grid; grid-template-columns: repeat(15, 1fr); gap: 2px;
}
.fb-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: clamp(.55rem, 2vw, .72rem); font-weight: 700; color: #3a4a6b;
  background: #111827; border-radius: 4px; transition: background .2s;
}
.fb-cell.fb-called { background: #0f3460; color: #93c5fd; }
.fb-cell.fb-new    { background: #e94560; color: #fff; animation: pop-mark .4s ease; }

/* Win overlays */
.bingo-overlay, .winner-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 32px;
}
.bingo-overlay {
  background: radial-gradient(circle, rgba(14,53,96,.97) 0%, rgba(10,14,26,.98) 100%);
}
.bingo-shout {
  font-size: clamp(3rem, 15vw, 6rem); font-weight: 900; color: #e94560;
  animation: bingo-shout .6s cubic-bezier(.36,.07,.19,.97);
}
.bingo-pattern { font-size: 1.2rem; color: #4ade80; margin-top: 12px; font-weight: 700; }
.winner-overlay {
  background: rgba(10,14,26,.96);
}
.winner-icon           { font-size: 4rem; }
.winner-overlay h2     { font-size: 1.8rem; margin: 8px 0; }
.winner-announce-name  { font-size: 1.5rem; font-weight: 800; color: #e94560; }

/* ── Game Master pages ──────────────────────────────────────────── */
.gm-body { background: #0a0e1a; min-height: 100vh; display: flex; flex-direction: column; }
.gm-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 14px 20px; background: #0c1222; border-bottom: 1px solid #1a2540;
  flex-wrap: wrap; gap: 10px; position: sticky; top: 0; z-index: 50;
}
.gm-header-left h1 { font-size: 1.2rem; font-weight: 800; margin-bottom: 3px; }
.gm-meta  { font-size: .78rem; color: #7b8cb5; display: flex; gap: 6px; flex-wrap: wrap; }
.code-display { font-family: monospace; color: #e94560; letter-spacing: 3px; font-size: 1rem; }
.gm-layout { display: flex; gap: 0; flex: 1; overflow: hidden; }

.gm-controls {
  width: 300px; flex-shrink: 0; padding: 20px 16px;
  border-right: 1px solid #1a2540; display: flex; flex-direction: column; gap: 16px;
  overflow-y: auto; background: #0c1222;
}
.ctrl-card {
  background: #111827; border: 1px solid #1e2540; border-radius: 14px;
  padding: 20px 18px; display: flex; flex-direction: column; gap: 10px;
}
.ctrl-card h3 { font-size: 1rem; font-weight: 800; }
.ctrl-card p  { font-size: .85rem; color: #7b8cb5; }

.btn-draw {
  width: 100%; padding: 22px; font-size: 2rem; font-weight: 900;
  background: linear-gradient(135deg, #e94560, #c0392b);
  color: #fff; border: none; border-radius: 14px; cursor: pointer;
  transition: opacity .15s, transform .1s; letter-spacing: 4px;
  -webkit-tap-highlight-color: transparent;
}
.btn-draw:hover  { opacity: .9; }
.btn-draw:active { transform: scale(.96); }
.btn-draw:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-draw.pulse  { animation: pulse-draw 2s infinite; }

.latest-draw {
  background: linear-gradient(135deg, #0f3460, #1a2e5c);
  border: 1px solid #1e3a6e; border-radius: 14px;
  display: none; flex-direction: column; align-items: center;
  justify-content: center; padding: 20px; gap: 4px;
}
.latest-letter { font-size: 2.5rem; font-weight: 900; color: #e94560; line-height: 1; }
.latest-number { font-size: 4rem;   font-weight: 900; color: #fff;    line-height: 1; }
.latest-label  { font-size: .72rem; color: #7b8cb5; text-transform: uppercase; letter-spacing: 1px; }

.winner-alert {
  background: linear-gradient(135deg, #0a1f12, #132d1c);
  border: 2px solid #14532d; border-radius: 14px;
  display: none; flex-direction: column; align-items: center;
  padding: 24px; gap: 8px; text-align: center;
}
.winner-name    { font-size: 1.4rem; font-weight: 800; color: #4ade80; }
.winner-pattern { font-size: .85rem; color: #86efac; }

.gm-board-panel {
  flex: 1; padding: 20px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px;
}
.board-toolbar {
  display: flex; justify-content: space-between; align-items: center;
}
.board-toolbar h3 { font-size: 1rem; font-weight: 700; }
.numbers-board {
  display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px;
}
.num-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: clamp(.6rem, 2vw, .8rem); font-weight: 700; color: #3a4a6b;
  background: #111827; border-radius: 5px; transition: all .2s;
}
.num-cell.called      { background: #0f3460; color: #93c5fd; }
.num-cell.just-called { background: #e94560; color: #fff; animation: pop-mark .4s ease; }

.players-panel { border-top: 1px solid #1a2540; padding-top: 14px; }
.players-panel h4 { font-size: .82rem; font-weight: 700; margin-bottom: 10px; color: #7b8cb5; text-transform: uppercase; letter-spacing: .8px; }
.players-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.player-chip {
  background: #1a2035; border: 1px solid #2d3b5e; color: #7b8cb5;
  font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 20px;
}
.player-chip.has-card { background: #0a1f12; border-color: #14532d; color: #4ade80; }

/* ── Summary page ──────────────────────────────────────────────── */
.summary-body { background: #0a0e1a; min-height: 100vh; padding-bottom: 48px; }
.summary-wrap { max-width: 800px; margin: 0 auto; padding: 0 16px; }
.summary-header { text-align: center; padding: 32px 0 20px; }
.summary-logo   { font-size: 4rem; margin-bottom: 8px; }
.summary-header h1 { font-size: 1.8rem; font-weight: 900; }
.winners-section { margin: 16px 0; }
.winner-podium {
  background: linear-gradient(135deg, #0a1f12, #111827);
  border: 2px solid #14532d; border-radius: 18px; padding: 24px 20px;
  text-align: center; margin-bottom: 16px;
}
.winner-crown        { font-size: 2.5rem; }
.winner-podium-name  { font-size: 1.6rem; font-weight: 900; color: #4ade80; margin: 6px 0; }
.winner-podium-pattern { font-size: .85rem; color: #86efac; margin-bottom: 16px; }
.no-winner { text-align: center; color: #7b8cb5; padding: 24px; font-size: 1rem; }

.save-card-cta {
  background: #0c1f30; border: 2px solid #1e3a6e; border-radius: 14px;
  padding: 20px; margin: 16px 0; text-align: center;
}
.save-cta-actions { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }

.drawn-section { margin: 24px 0; }
.summary-board {
  display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; margin-top: 8px;
}
.sb-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: clamp(.55rem, 2vw, .72rem); font-weight: 700; color: #3a4a6b;
  background: #111827; border-radius: 4px;
}
.sb-cell.sb-called { background: #0f3460; color: #93c5fd; }

.all-cards-section { margin: 24px 0; }
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px;
}
.card-summary-wrap { display: flex; flex-direction: column; gap: 6px; }
.card-summary-wrap.winner-card .bingo-card { border-color: #4ade80; }
.card-summary-name    { font-size: .78rem; font-weight: 700; color: #e8eaf6; text-align: center; }
.card-summary-pattern { font-size: .7rem; color: #4ade80; text-align: center; }

/* ── Animations ─────────────────────────────────────────────────── */
@keyframes pop-mark {
  0%   { transform: scale(1.4); }
  100% { transform: scale(1); }
}
@keyframes pop-chip {
  0%   { transform: scale(1.3); }
  100% { transform: scale(1); }
}
@keyframes pop-in {
  0%   { transform: scale(.5) rotate(-10deg); opacity: 0; }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.pop-in { animation: pop-in .4s cubic-bezier(.36,.07,.19,.97); }
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse-draw {
  0%   { box-shadow: 0 0 0 0 rgba(233,69,96,.5); }
  70%  { box-shadow: 0 0 0 14px rgba(233,69,96,0); }
  100% { box-shadow: 0 0 0 0 rgba(233,69,96,0); }
}
@keyframes bingo-shout {
  0%   { transform: scale(.3) rotate(-15deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

/* ── How to Play ────────────────────────────────────────────────── */
.how-to-play-wrap {
  width: 100%; max-width: 440px; margin: 16px auto 0; padding: 0 16px 32px;
}
.htp-toggle {
  width: 100%; padding: 12px; background: #111827; border: 1px solid #2d3b5e;
  border-radius: 12px; color: #a0aec0; font-size: .9rem; font-weight: 700;
  cursor: pointer; transition: all .2s; -webkit-tap-highlight-color: transparent;
}
.htp-toggle:hover { border-color: #e94560; color: #e8eaf6; }
.htp-body {
  background: #111827; border: 1px solid #1e2540; border-top: none;
  border-radius: 0 0 14px 14px; padding: 20px 18px; display: flex;
  flex-direction: column; gap: 16px;
}
.htp-section {
  display: flex; gap: 14px; align-items: flex-start; font-size: .88rem; color: #a0aec0;
}
.htp-icon { font-size: 1.5rem; flex-shrink: 0; }
.htp-section strong { display: block; color: #e8eaf6; margin-bottom: 3px; font-size: .95rem; }
.htp-steps { display: flex; flex-direction: column; gap: 10px; }
.htp-step {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: .85rem; color: #a0aec0;
}
.htp-num {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: #e94560; color: #fff; font-size: .75rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.htp-patterns strong { display: block; color: #e8eaf6; margin-bottom: 10px; font-size: .9rem; }
.htp-pattern-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.htp-pattern-card {
  background: #0f1629; border: 1px solid #1e2540; border-radius: 10px; padding: 12px;
}
.htp-pattern-name { font-size: .85rem; font-weight: 700; color: #e8eaf6; margin-bottom: 4px; }
.htp-pattern-desc { font-size: .78rem; color: #7b8cb5; }
.htp-tip {
  background: #1a2035; border: 1px solid #2d3b5e; border-radius: 10px;
  padding: 12px 14px; font-size: .82rem; color: #a0aec0;
}
.htp-reviews-link {
  display: inline-block; color: #e94560; font-size: .85rem; font-weight: 600;
}

/* ── Reviews page ────────────────────────────────────────────────── */
.reviews-body { background: #0a0e1a; min-height: 100vh; padding-bottom: 48px; }
.reviews-wrap { max-width: 680px; margin: 0 auto; padding: 0 16px; }
.reviews-header { text-align: center; padding: 32px 0 20px; }
.reviews-header h1 { font-size: 1.8rem; font-weight: 900; }
.reviews-header p  { color: #7b8cb5; margin-top: 6px; }
.reviews-avg {
  text-align: center; background: #111827; border: 1px solid #1e2540;
  border-radius: 14px; padding: 20px; margin-bottom: 24px;
}
.reviews-avg-score { font-size: 3.5rem; font-weight: 900; color: #e8eaf6; line-height: 1; }
.reviews-avg-stars { font-size: 1.5rem; margin: 4px 0; }
.reviews-avg-count { font-size: .82rem; color: #7b8cb5; }
.review-card {
  background: #111827; border: 1px solid #1e2540; border-radius: 14px;
  padding: 18px 18px; margin-bottom: 14px;
}
.review-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.review-name  { font-weight: 700; color: #e8eaf6; font-size: .95rem; }
.review-stars { color: #fbbf24; font-size: 1rem; letter-spacing: 2px; }
.review-date  { font-size: .75rem; color: #7b8cb5; }
.review-comment { font-size: .88rem; color: #a0aec0; line-height: 1.6; }
.no-reviews { text-align: center; padding: 48px 16px; color: #7b8cb5; }
.leave-review-btn { text-align: center; margin: 24px 0; }

/* ── Review submit form ─────────────────────────────────────────── */
.star-rating { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; margin: 8px 0; }
.star-rating input { display: none; }
.star-rating label {
  font-size: 2rem; color: #374151; cursor: pointer; transition: color .1s;
  -webkit-tap-highlight-color: transparent;
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label { color: #fbbf24; }

/* ── Mobile topbar (replaces hidden sidebar on small screens) ─────── */
.mobile-topbar {
  display: none;
}

/* ── Responsive adjustments ─────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .dashboard-main { margin-left: 0; padding: 16px; }
  .gm-layout { flex-direction: column; }
  .gm-controls { width: 100%; border-right: none; border-bottom: 1px solid #1a2540; }
  .field-row { flex-direction: column; }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0c1222;
    padding: 12px 16px;
    border-bottom: 1px solid #1a2540;
    position: sticky;
    top: 0;
    z-index: 200;
    width: 100%;
    box-sizing: border-box;
  }
  .mobile-topbar-brand { font-size: .95rem; font-weight: 800; color: #e94560; }
  .mobile-topbar-right { display: flex; align-items: center; gap: 12px; }
  .mobile-topbar-user  { font-size: .78rem; color: #7b8cb5; }
  .mobile-topbar-logout { font-size: .82rem; color: #e94560; font-weight: 600; padding: 6px 12px; border: 1px solid #e94560; border-radius: 6px; }
  .mobile-topbar-logout:hover { background: #e94560; color: #fff; text-decoration: none; }
}
@media (min-width: 769px) {
  .bingo-cell { font-size: 1.3rem; }
  .bingo-col-hdr { font-size: 1.5rem; }
}
