/* ── Override drum.css body centering for the room layout ── */
body {
  align-items: stretch !important;
  overflow-y: auto;
}

/* ── Pre-start countdown banner (over drum) ── */
.draw-stage { position: relative; }
.room-prestart {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 60; text-align: center;
  background: rgba(8,8,18,.88); border: 1px solid rgba(124,58,237,.6);
  border-radius: 16px; padding: 14px 28px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 32px rgba(124,58,237,.35);
  white-space: nowrap;
}
.room-prestart-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--room-muted); margin-bottom: 4px;
}
.room-prestart-timer {
  font-size: 36px; font-weight: 900; color: #a78bfa;
  line-height: 1;
}

/* ── Draw-in-progress blocking screen ── */
.room-blocked {
  position: fixed; inset: 0; z-index: 1000;
  background: url('/bingo-room/curtain.png') center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.room-blocked.hidden { display: none !important; }
.room-blocked-inner {
  background: rgba(8,8,18,0.85);
  border: 1px solid rgba(167,139,250,0.4);
  border-radius: 20px; padding: 48px 36px; text-align: center; max-width: 400px; width: 100%;
  box-shadow: 0 0 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(167,139,250,0.12);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.room-blocked-icon  { font-size: 56px; margin-bottom: 16px; }
.room-blocked-title { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.room-blocked-msg   { color: var(--room-muted); font-size: 14px; line-height: 1.6; margin-bottom: 28px; }
.room-blocked-next  {
  background: var(--room-surface2); border: 1px solid var(--room-border);
  border-radius: 12px; padding: 16px; margin-bottom: 28px;
}
.rbn-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--room-muted); margin-bottom: 6px; }
.rbn-time  { font-size: 18px; font-weight: 800; color: var(--room-accent); }
.room-blocked-btn {
  display: inline-block; background: var(--room-primary); color: #fff;
  font-size: 14px; font-weight: 700; padding: 12px 28px; border-radius: 10px;
  text-decoration: none; transition: opacity .15s;
}
.room-blocked-btn:hover { opacity: .85; }

/* ── Bingo Room layout ──────────────────────────────────────────────────── */

:root {
  --room-bg:        #080812;
  --room-surface:   #0f0f1e;
  --room-surface2:  #16162a;
  --room-border:    #1e1e3a;
  --room-primary:   #7c3aed;
  --room-accent:    #06b6d4;
  --room-success:   #10b981;
  --room-danger:    #ef4444;
  --room-text:      #e2e8f0;
  --room-muted:     #64748b;
  --callcard-width: 280px;
}

/* ── Top bar ── */
.room-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--room-surface);
  border-bottom: 1px solid var(--room-border);
  padding: 0 24px;
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 1100;   /* above the curtain overlay (z:1000) so back btn is always reachable */
}
.room-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(124,58,237,0.18);
  border: 1px solid rgba(124,58,237,0.45);
  color: #c4b5fd;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.room-back:hover {
  background: rgba(124,58,237,0.35);
  border-color: rgba(124,58,237,0.8);
  color: #fff;
}
@media (max-width: 860px) {
  .room-back { font-size: 11px; padding: 5px 10px; }
}
.room-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .04em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.room-title .b { color: #ff6b6b; }
.room-title .i { color: #ffd93d; }
.room-title .n { color: #6bcb77; }
.room-title .g { color: #4d96ff; }
.room-title .o { color: #c77dff; }
.room-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--room-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 2px 8px;
  background: var(--room-surface2);
  border: 1px solid var(--room-border);
  border-radius: 6px;
  margin-left: 4px;
}
.room-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--room-muted);
  font-weight: 600;
}
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--room-muted);
  transition: background .3s;
}
.live-dot.on  { background: var(--room-success); animation: pulse 1.4s infinite; }
.live-dot.off { background: var(--room-danger); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ── Main layout: column stack ── */
.room-layout {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* ── Top row: drum + call card side by side ── */
.room-top {
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  border-bottom: 1px solid var(--room-border);
  /* Stick below the topbar so the machine + call card stay visible while
     the user scrolls down to see their tickets. The announcer is
     position:fixed and positioned relative to the machine via
     getBoundingClientRect(), so keeping the machine at a stable viewport
     position (top:52px when stuck) ensures she never drifts. */
  position: sticky;
  top: 52px;       /* height of .room-topbar */
  z-index: 900;    /* below curtain (1000) but above ticket content */
  /* No solid background — studio-bg.jpg (position:fixed) must show through.
     A subtle tint is enough to prevent ticket content bleeding through on scroll. */
  background: rgba(8, 8, 18, 0.15);
}

.room-drum-col {
  flex: 1 1 auto;
  overflow: hidden;
  padding: 0 0 40px 16px;  /* 40px clearance at bottom so drum base sits there */
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* push draw-stage to the bottom of the column */
}

.room-callcard-col {
  flex: 0 0 var(--callcard-width);
  border-left: 1px solid var(--room-border);
  background: var(--room-surface);
  padding: 24px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}

/* ── Next-draw countdown panel ── */
.room-next-draw {
  position: absolute; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(8,8,18,.78); backdrop-filter: blur(6px);
  border-radius: 12px; text-align: center; gap: 8px;
}
.room-next-draw.hidden { display: none !important; }
.rnd-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(255,255,255,.5);
}
.rnd-title {
  font-size: 15px; font-weight: 800; color: #fff;
  line-height: 1.3;
}
.rnd-countdown {
  font-size: 48px; font-weight: 900; color: var(--room-accent);
  letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums;
}
.rnd-sub {
  font-size: 12px; color: rgba(255,255,255,.45);
}

/* ── Recent calls in callcard column: same grid as call board ── */
.room-callcard-col .cc-recent-row {
  display: grid !important;
  grid-template-columns: repeat(10, 1fr) !important;
  gap: 4px !important;
}
.room-callcard-col .cc-recent-chip {
  width: auto !important;
  height: auto !important;
  aspect-ratio: 1;
  font-size: clamp(0.55rem, 1.3vw, 0.78rem) !important;
}

/* ── Tickets section (below top row) ── */
.room-tickets-section {
  padding: 24px 28px 48px;
  background: var(--room-surface);
  border-top: 1px solid var(--room-border);
}
.room-tickets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--room-border);
  margin-bottom: 20px;
}
.room-card-title { font-size: 15px; font-weight: 800; color: var(--room-text); }
.room-card-draw  { font-size: 12px; color: var(--room-muted); }

/* ── No ticket ── */
.room-no-ticket {
  text-align: center;
  padding: 40px 16px;
  color: var(--room-muted);
  font-size: 14px;
}
.room-no-ticket-icon { font-size: 44px; margin-bottom: 12px; }
.room-no-ticket p    { margin-bottom: 16px; }
.btn-room-buy {
  display: inline-block;
  background: var(--room-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 8px;
  text-decoration: none;
}

/* ── Bingo card grid (3 rows × 9 cols) ── */
.room-card-grid-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 720px;
  table-layout: fixed;
  border: 2px solid #b0a898;
}
.room-card-grid-table td {
  border: 1px solid #c8bfb0;
  text-align: center;
  height: 42px;
  font-size: 15px;
  font-weight: 700;
  background: #f5f0e8;
  transition: background .2s, color .2s;
}
.room-card-grid-table td.blank   { background: #eee8dc; }
.room-card-grid-table td.num     { background: #f5f0e8; color: #1a3a8a; }
.room-card-grid-table td.called  {
  position: relative;
  background: #dbd4c8;
  color: #9a8f80;
  font-size: 13px;
}
.room-card-grid-table td.called:not(.line-win):not(.bingo-win)::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom right, transparent calc(50% - 2px), #cc0000 calc(50% - 2px), #cc0000 calc(50% + 2px), transparent calc(50% + 2px)),
    linear-gradient(to bottom left,  transparent calc(50% - 2px), #cc0000 calc(50% - 2px), #cc0000 calc(50% + 2px), transparent calc(50% + 2px));
  pointer-events: none;
}
.room-card-grid-table td.card-code-cell {
  background: #1e3a6e;
  color: #c8d8f8;
  font-size: 9px;
  font-weight: 800;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  width: 22px;
  min-width: 22px;
  padding: 4px 2px;
  letter-spacing: .06em;
  border: none;
  border-left: 2px solid #b0a898;
}
.room-card-grid-table td.line-win {
  background: rgba(16,185,129,.35);
  color: #065f46;
  font-weight: 900;
  text-decoration: none;
}
.room-card-grid-table td.bingo-win {
  background: rgba(124,58,237,.45);
  color: #3b0764;
  font-weight: 900;
  text-decoration: none;
}

/* ── No-draw overlay on drum ── */
.room-nodraw-overlay {
  position: absolute; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(8,8,18,.72); backdrop-filter: blur(6px);
  border-radius: 12px; text-align: center; gap: 10px;
}
.room-nodraw-overlay.hidden { display: none !important; }
.rno-title {
  font-size: 22px; font-weight: 900; color: #fff;
  letter-spacing: .02em;
}
.rno-sub {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,.5);
}

/* ── Waiting banner (mid-draw entry) ── */
.room-waiting-banner {
  display: flex; align-items: center; gap: 10px;
  background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.35);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 12px;
  font-size: 13px; font-weight: 600; color: #fcd34d;
}
.room-waiting-banner.hidden { display: none !important; }
.rwb-icon { font-size: 18px; flex-shrink: 0; }
.rwb-text { line-height: 1.4; }

/* Mid-draw rejoin banner */
.room-midraw-banner {
  display: flex; align-items: center; gap: 10px;
  background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.35);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 12px;
  font-size: 13px; font-weight: 600; color: #fca5a5;
}
.room-midraw-banner.hidden { display: none !important; }
.rmb-icon { font-size: 18px; flex-shrink: 0; }
.rmb-text { line-height: 1.4; }

/* ── Win banner ── */
.room-win-banner {
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .06em;
  margin-bottom: 20px;
  animation: popIn .35s cubic-bezier(.175,.885,.32,1.275);
}
.room-win-banner.line  { background: rgba(16,185,129,.2);  color: #34d399; border: 2px solid #34d399; }
.room-win-banner.bingo { background: rgba(124,58,237,.25); color: #c4b5fd; border: 2px solid #a78bfa; }
@keyframes popIn { from{transform:scale(.8);opacity:0} to{transform:scale(1);opacity:1} }

/* ── LINE! flash (step 1 of check ceremony) ── */
#line-flash {
  position: fixed;
  inset: 52px var(--callcard-width) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 96px;
  font-weight: 900;
  letter-spacing: .06em;
  color: #6ee7b7;
  text-shadow: 0 0 40px #10b981, 0 0 90px rgba(16,185,129,.5);
  background: rgba(3, 5, 20, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 150;
  pointer-events: none;
}

/* ── Line/Bingo check overlay ── */
#line-check-overlay {
  position: fixed;
  inset: 52px var(--callcard-width) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  /* solid fallback first so the overlay is never transparent/black
     if the background image is slow to load (black-screen guard) */
  background: rgba(3,5,20,0.88) url('/bingo-room/win-line.png') center/cover no-repeat;
  z-index: 1010;  /* above curtain (z=1000) so ceremony always stays visible */
  pointer-events: none;
}
#line-check-overlay.bingo-overlay {
  background: rgba(3,5,20,0.88) url('/bingo-room/win-bingo.png') center/cover no-repeat;
}
.lco-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.8);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.overlay-card-table {
  border-collapse: collapse;
  width: min(480px, 80%);
  table-layout: fixed;
}
.overlay-card-table td {
  border: 1px solid #2a2a4a;
  text-align: center;
  height: 54px;
  font-size: 22px;
  font-weight: 800;
  color: var(--room-text);
  transition: background .2s, color .2s;
}
.overlay-card-table td.blank   { background: #eee8dc; }
.overlay-card-table td.num     { background: #f5f0e8; color: #1a3a8a; }
.overlay-card-table td.called  { position: relative; background: #dbd4c8; color: #9a8f80; }
.overlay-card-table td.called:not(.line-win):not(.bingo-win)::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom right, transparent calc(50% - 2px), #cc0000 calc(50% - 2px), #cc0000 calc(50% + 2px), transparent calc(50% + 2px)),
    linear-gradient(to bottom left,  transparent calc(50% - 2px), #cc0000 calc(50% - 2px), #cc0000 calc(50% + 2px), transparent calc(50% + 2px));
  pointer-events: none;
}
.overlay-card-table td.line-win  { background: rgba(16,185,129,.35); color: #065f46; font-weight: 900; text-decoration: none; }
.overlay-card-table td.bingo-win { background: rgba(124,58,237,.45); color: #3b0764; font-weight: 900; text-decoration: none; }
.overlay-card-table td.checking  { animation: cellCheck 0.6s ease forwards; font-weight: 900; }

/* call card highlight during bingo check */
.cc-cell.cc-bingo-highlight {
  background: #00e676 !important;
  color: #003a1f !important;
  box-shadow: 0 0 14px #00e676;
  transform: scale(1.25);
  transition: background 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
  z-index: 2;
  position: relative;
}

/* permanent bright green once a bingo number is confirmed — stays until game-reset */
.cc-cell.cc-bingo-checked {
  background: #00c853 !important;
  color: #003a1f !important;
  box-shadow: 0 0 8px rgba(0, 200, 83, 0.65);
  font-weight: 800;
}

/* ── Bingo flash variant ── */
#line-flash.bingo-flash {
  font-size: 108px;
  color: #c4b5fd;
  text-shadow: 0 0 50px #7c3aed, 0 0 100px rgba(124,58,237,.6), 0 0 6px #fff;
  background: rgba(8, 4, 28, 0.8);
}

/* ── Next-draw countdown ── */
#bingo-next-draw {
  position: fixed;
  inset: 52px var(--callcard-width) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(3, 5, 20, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 150;
  pointer-events: none;
}
.bnd-label    { font-size: 13px; font-weight: 800; letter-spacing: .18em; color: var(--room-muted); text-transform: uppercase; }
.bnd-num      { font-size: 120px; font-weight: 900; color: #a78bfa; line-height: 1; letter-spacing: -.02em; }
.bnd-sublabel { font-size: 14px; font-weight: 700; letter-spacing: .1em; color: var(--room-muted); text-transform: uppercase; }

/* ── Line-check cell animation ── */
@keyframes cellCheck {
  0%   { transform: scale(1);    background: var(--room-surface2); color: var(--room-text); }
  25%  { transform: scale(1.22); background: #00e676; color: #003a1f; box-shadow: 0 0 22px #00e676, 0 0 8px #00e676; }
  65%  { transform: scale(1.10); background: rgba(0,230,118,.65); color: #fff; }
  100% { transform: scale(1);    background: rgba(0,230,118,.30); color: #6ee7b7; }
}
.room-card-grid-table td.checking {
  animation: cellCheck 0.6s ease forwards;
  font-weight: 900;
  position: relative;
  z-index: 2;
}

.hidden { display: none !important; }

/* ── Draw results card ── */
#draw-results-card {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(20,8,45,0.97) 0%, rgba(12,4,28,0.97) 100%);
  border: 1px solid rgba(167,139,250,0.35);
  border-radius: 16px;
  padding: 20px 32px 18px;
  min-width: 320px;
  max-width: 480px;
  z-index: 200;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(167,139,250,0.15);
}
.drc-title {
  font-size: 11px; font-weight: 800; letter-spacing: .2em;
  text-transform: uppercase; color: #a78bfa; margin-bottom: 4px;
}
.drc-draw {
  font-size: 18px; font-weight: 900; color: #fff;
  margin-bottom: 14px; letter-spacing: .02em;
}
.drc-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-top: 1px solid rgba(255,255,255,0.07);
  gap: 16px;
}
.drc-label {
  font-size: 11px; font-weight: 800; letter-spacing: .15em;
  text-transform: uppercase; color: #a78bfa; white-space: nowrap;
}
.drc-email {
  font-size: 14px; font-weight: 600; color: #e2d9f3;
  word-break: break-all; text-align: right;
}

/* ── Machine scaler wrapper (constrains the scaled .lottery-machine) ── */
.machine-scaler {
  position: relative;
  overflow: visible;
  /* width & height set dynamically by JS updateStageScale() */
}

/* ── Desktop: grid layout — drum | callcard as two columns ───────────────── */
@media (min-width: 861px) {
  .room-layout {
    display: grid;
    grid-template-columns: 1fr var(--callcard-width);
    align-items: start;
  }
  /* Lower machine (and announcer, which tracks it) 35px on desktop.
     Base padding-bottom is 40px; 40 - 35 = 5px. */
  .room-drum-col {
    padding-bottom: 5px;
  }
  /* Callcard: right column, spans drum row + tickets row, sticky */
  .room-callcard-col {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: 52px;
    max-height: calc(var(--real-vh, 100vh) - 52px);
    overflow-y: auto;
    flex: unset;
  }
  /* Tickets: left column, row 2 (auto) */
  .room-tickets-section {
    grid-column: 1;
  }
}

/* ── Mobile responsive layout ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  /* Keep room-top sticky on mobile — machine + announcer pin to screen,
     tickets scroll below, matching desktop behaviour. */
  .room-top {
    flex-direction: column;
  }

  /* Give the full width to the drum area; machine will auto-scale to fit height */
  .room-drum-col {
    padding: 8px 8px 0;
    justify-content: flex-start;
    overflow: visible;
  }
  .room-drum-col .app {
    margin-top: 0;
    padding-bottom: 0;
    align-items: flex-start;
  }
  .draw-stage {
    justify-content: flex-start;
  }

  /* Callcard becomes a strip below the drum — full grid visible, user scrolls */
  .room-callcard-col {
    flex: 0 0 auto;
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--room-border);
    padding: 10px 12px;
  }
  /* Keep call-card from stretching across the full phone width */
  .room-callcard-col .call-card {
    max-width: 340px;
    margin: 0 auto;
  }
  /* Tighter gap so the 9-row grid stays compact */
  .room-callcard-col .call-card-grid {
    gap: 3px;
  }

  /* Win overlays that reserved right-side space for the callcard */
  #line-flash,
  #line-check-overlay,
  #bingo-next-draw {
    right: 0;
  }

  /* Draw-results popup: full width on mobile */
  #draw-results-card {
    width: calc(100vw - 32px);
    min-width: 0;
    max-width: 100%;
    left: 16px;
    transform: none;
  }

  /* Tickets section: tighter padding */
  .room-tickets-section {
    padding: 16px 12px 32px;
  }

  /* Ticket table: smaller cells on mobile */
  .room-card-grid-table td {
    height: 30px;
    font-size: 11px;
  }
  .room-card-grid-table td.card-code-cell {
    font-size: 7px;
    width: 16px;
    min-width: 16px;
  }

  /* Topbar: smaller text and tighter on mobile */
  .room-title {
    font-size: 17px;
  }
  .room-back, .room-status {
    font-size: 11px;
  }
}

/* ── Portrait rotate overlay ── */
#rotate-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 10000;
  background: #04040e;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 28px;
}
@media screen and (orientation: portrait) and (max-width: 900px) {
  #rotate-overlay { display: flex; }
}
.ro-icon {
  width: 80px; height: 80px; color: #e2d9f3;
  animation: rotatePulse 2s ease-in-out infinite;
}
.ro-icon svg { width: 100%; height: 100%; }
.ro-text {
  font-size: 16px; font-weight: 600; color: #c4b5fd;
  text-align: center; max-width: 220px; line-height: 1.5;
  font-family: 'Inter', sans-serif;
}
@keyframes rotatePulse {
  0%   { transform: rotate(0deg) scale(1); }
  40%  { transform: rotate(90deg) scale(1.1); }
  60%  { transform: rotate(90deg) scale(1.1); }
  100% { transform: rotate(0deg) scale(1); }
}

/* ── Refresh overlay (bfcache restore) ─────────────────────────────────── */
.refresh-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(4, 4, 14, 0.92);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
}
.refresh-overlay.hidden { display: none; }
.refresh-card {
  background: linear-gradient(160deg, #12103a 0%, #0d0b2a 100%);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 24px;
  padding: 44px 40px 40px;
  text-align: center;
  max-width: 340px; width: 88%;
  box-shadow: 0 0 80px rgba(124, 58, 237, 0.25),
              0 24px 48px rgba(0, 0, 0, 0.6);
}
.refresh-icon {
  font-size: 52px; line-height: 1;
  animation: refresh-spin-idle 4s ease-in-out infinite;
  display: inline-block; margin-bottom: 18px;
}
@keyframes refresh-spin-idle {
  0%, 85%, 100% { transform: rotate(0deg); }
  90%           { transform: rotate(360deg); }
}
.refresh-title {
  font-size: 22px; font-weight: 800; color: #e2d9f3;
  letter-spacing: -.02em; margin-bottom: 10px;
}
.refresh-sub {
  font-size: 14px; color: #9b8ec4; line-height: 1.55;
  margin-bottom: 32px;
}
.refresh-btn {
  display: block; width: 100%;
  padding: 15px 24px; border-radius: 14px; border: none;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff; font-size: 16px; font-weight: 700;
  letter-spacing: .01em; cursor: pointer;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.45);
  transition: transform .12s, box-shadow .12s;
}
.refresh-btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(124,58,237,.55); }
.refresh-btn:active { transform: translateY(0); }
.refresh-countdown {
  margin-top: 14px; font-size: 12px; color: #6b5e9a;
}

