* {
  box-sizing: border-box;
}

:root {
  --bg: #05070f;
  --panel: #0f1424;
  --panel-2: #141d35;
  --text: #f5f7ff;
  --muted: #b9c0d8;
  --line: #253255;
  --accent: #f4c63d;
  --accent-2: #1f4fff;
  --accent-3: #e53b2d;
  --good: #1fcd8b;
  --warn: #f59e0b;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(31, 79, 255, 0.25), transparent 25%),
    radial-gradient(circle at top left, rgba(229, 59, 45, 0.22), transparent 28%),
    linear-gradient(180deg, #06101d, #04070d 55%);
  color: var(--text);
}

code {
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 8px;
}

.site-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hero-card {
  width: min(940px, 100%);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 36px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.36);
}

.hero-card.branded {
  text-align: center;
}

.hero-logo {
  width: min(420px, 80%);
  display: block;
  margin: 0 auto 18px;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.page-logo {
  width: 160px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

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

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 2px;
  margin: 0 0 8px;
  font-weight: 700;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
}

h2 {
  margin-top: 0;
  color: #fff2b2;
}

.lede, .subtext, .helper, .small-note {
  color: var(--muted);
  line-height: 1.5;
}

.small-note {
  margin-top: 18px;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 26px;
  text-align: left;
}

.landing-button {
  display: block;
  text-decoration: none;
  color: white;
  background: linear-gradient(180deg, #131b31, #0b1222);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 22px;
  transition: 0.2s ease;
}

.landing-button:hover {
  transform: translateY(-2px);
  border-color: #4d6dd8;
}

.landing-button.primary {
  background: linear-gradient(135deg, rgba(229,59,45,0.95), rgba(31,79,255,0.95));
  border: none;
}

.landing-title {
  display: block;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.landing-copy {
  display: block;
  color: #ececec;
  line-height: 1.45;
}

.app-shell {
  max-width: 1450px;
  margin: 0 auto;
  padding: 24px;
}

.player-shell {
  max-width: 1150px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  max-width: 620px;
}

.room-strip {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.room-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
}

.join-line {
  display: flex;
  gap: 10px;
  align-items: center;
}

.join-line input {
  flex: 1;
}

input[type="text"], input[type="email"], textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #08101f;
  color: var(--text);
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 15px;
}

textarea {
  min-height: 340px;
  resize: vertical;
}

.btn {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #18233e, #10182c);
  color: white;
  padding: 13px 18px;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: #6f89e7;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
  border: none;
}

.grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
}

.stack {
  display: grid;
  gap: 24px;
}

.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.inline-status, .row, .section-head, .form-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.form-grid > * {
  flex: 1 1 200px;
}

.inline-status {
  margin: 14px 0;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: #1b2743;
  border: 1px solid #37508c;
  font-size: 13px;
}

.badge.ready {
  background: rgba(31, 205, 139, 0.12);
  border-color: rgba(31, 205, 139, 0.45);
  color: #a7f3d0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  min-height: 118px;
}

.stat-card.glow {
  box-shadow: 0 0 0 1px rgba(244, 198, 61, 0.18), 0 0 32px rgba(31, 79, 255, 0.16);
}

.label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.1;
  word-break: break-word;
}

.board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.cell {
  min-height: 96px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #08101f;
  color: white;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: 0.18s ease;
  word-break: break-word;
}

.cell:hover {
  border-color: #6f89e7;
}

.cell.marked {
  background: rgba(31, 205, 139, 0.18);
  border-color: rgba(31, 205, 139, 0.65);
  box-shadow: inset 0 0 0 1px rgba(31, 205, 139, 0.3);
}

.cell.free {
  background: linear-gradient(135deg, rgba(229,59,45,0.2), rgba(31,79,255,0.22));
}

.called-list,
.player-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.called-list.empty,
.player-list.empty {
  color: var(--muted);
}

.called-pill,
.player-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: #16213e;
  border: 1px solid #35518e;
  font-size: 14px;
}

.status-box {
  margin-top: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  padding: 14px 16px;
  border-radius: 18px;
  color: #e6e6e6;
}

.player-pill.claim {
  border-color: rgba(31,205,139,0.55);
  background: rgba(31,205,139,0.12);
}

@media (max-width: 1100px) {
  .grid,
  .room-strip {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .brand-lockup {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .landing-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .app-shell {
    padding: 16px;
  }

  .board {
    gap: 8px;
  }

  .cell {
    min-height: 82px;
    font-size: 13px;
    border-radius: 16px;
  }

  .join-line {
    flex-direction: column;
    align-items: stretch;
  }

  .page-logo {
    width: 120px;
  }
}


.select-control {
  border: 1px solid var(--line);
  background: #08101f;
  color: var(--text);
  border-radius: 18px;
  padding: 13px 16px;
  font-size: 15px;
  min-width: 180px;
}


.cell.bingo-flash {
  animation: bingoFlash 0.8s ease-in-out infinite;
  box-shadow:
    0 0 0 2px rgba(244, 198, 61, 0.85),
    0 0 18px rgba(244, 198, 61, 0.75),
    0 0 34px rgba(31, 79, 255, 0.55),
    0 0 52px rgba(229, 59, 45, 0.45);
}

.cell.free img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

@keyframes bingoFlash {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.05);
    filter: brightness(1.2);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}


.view-mode-wrap {
  display: inline-flex;
  gap: 8px;
}

.card-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 16px;
}

.cards-container.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.single-card-wrap {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
}

.single-card-title {
  font-weight: 800;
  margin-bottom: 12px;
  color: #fff2b2;
}

.hidden {
  display: none !important;
}


.player-limit-list {
  display: grid;
  gap: 12px;
}

.player-limit-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
}

.player-limit-info {
  display: grid;
  gap: 4px;
}

.player-limit-info span {
  color: var(--muted);
  font-size: 14px;
}

.player-limit-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

@media (max-width: 760px) {
  .player-limit-row {
    grid-template-columns: 1fr;
  }

  .player-limit-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}


.host-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.projector-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.projector-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(31, 79, 255, 0.22), transparent 28%),
    radial-gradient(circle at top left, rgba(229, 59, 45, 0.18), transparent 32%),
    linear-gradient(180deg, #03060d, #02040a 55%);
}

.projector-shell {
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px;
}

.projector-header {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-bottom: 24px;
}

.projector-logo {
  width: 180px;
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.28);
}

.projector-join-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.projector-join-box > div,
.projector-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
}

.projector-main {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
}

.projector-big-number {
  font-size: clamp(68px, 12vw, 150px);
  font-weight: 800;
  line-height: 1;
  color: #fff2b2;
}

.projector-called-list-wrap .called-list {
  gap: 14px;
}

.projector-called-list-wrap .called-pill {
  font-size: 24px;
  padding: 14px 18px;
}

.projector-winner {
  margin-bottom: 24px;
  padding: 24px;
  border-radius: 28px;
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, rgba(229,59,45,0.95), rgba(31,79,255,0.95));
  box-shadow: 0 0 24px rgba(244,198,61,0.35);
}

@media (max-width: 1100px) {
  .host-tools-grid,
  .projector-join-box,
  .projector-main {
    grid-template-columns: 1fr;
  }
}


textarea#nameList {
  position: relative !important;
  z-index: 5 !important;
  pointer-events: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
}


.print-preview.empty-preview {
  color: var(--muted);
}

.print-preview {
  display: grid;
  gap: 18px;
}

.print-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #fff2b2;
  font-weight: 700;
}

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

.print-cell {
  min-height: 86px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #08101f;
  color: var(--text);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.print-cell.free {
  background: linear-gradient(135deg, rgba(229,59,45,0.2), rgba(31,79,255,0.22));
}

.print-free-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

@media print {
  body {
    background: white !important;
    color: black !important;
  }

  .topbar {
    display: none !important;
  }

  .grid {
    display: block !important;
  }

  .panel {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .print-preview {
    display: block !important;
  }

  .print-card {
    width: 48%;
    display: inline-block;
    vertical-align: top;
    margin: 0 1% 18px 1%;
    border: 1px solid #bbb !important;
    border-radius: 12px !important;
    background: white !important;
    color: black !important;
  }

  .print-card:nth-child(2n) {
    page-break-after: always;
  }

  .print-card-header {
    color: black !important;
  }

  .print-cell {
    background: white !important;
    color: black !important;
    border-color: #999 !important;
  }

  .print-cell.free {
    background: white !important;
  }
}


.access-control-box {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
}

.access-control-box h3 {
  margin: 0 0 8px;
  color: #fff2b2;
}

.access-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.access-control-row input {
  flex: 1 1 240px;
}

#passwordNotice {
  border-color: rgba(244, 198, 61, 0.45);
  background: rgba(244, 198, 61, 0.08);
}


.bingo-claim-alert {
  margin: 16px 0;
  padding: 18px 22px;
  border-radius: 22px;
  border: 2px solid rgba(244, 198, 61, 0.95);
  background: linear-gradient(135deg, rgba(229, 59, 45, 0.95), rgba(31, 79, 255, 0.95));
  color: #fff;
  font-weight: 900;
  font-size: clamp(20px, 4vw, 38px);
  text-align: center;
  box-shadow: 0 0 32px rgba(244, 198, 61, 0.55);
  animation: hostBingoFlash 0.8s ease-in-out infinite;
}

@keyframes hostBingoFlash {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.02); filter: brightness(1.28); }
}

.claim-verify-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
}

.winner-card-panel {
  border-color: rgba(244, 198, 61, 0.65) !important;
  box-shadow: 0 0 24px rgba(244, 198, 61, 0.14);
}

.winner-card-details {
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}

.verify-good {
  color: #70ff9e;
  font-weight: 900;
}

.verify-bad {
  color: #ff6b6b;
  font-weight: 900;
}

.winner-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(70px, 1fr));
  gap: 8px;
}

.winner-card-cell {
  min-height: 82px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #08101f;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  word-break: break-word;
}

.winner-card-cell.marked {
  background: linear-gradient(135deg, rgba(244, 198, 61, 0.32), rgba(31, 79, 255, 0.28));
  border-color: rgba(244, 198, 61, 0.85);
  box-shadow: inset 0 0 0 2px rgba(244, 198, 61, 0.25);
}

.winner-card-cell.free img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

@media (max-width: 700px) {
  .winner-card-grid {
    grid-template-columns: repeat(5, minmax(48px, 1fr));
    gap: 5px;
  }

  .winner-card-cell {
    min-height: 58px;
    font-size: 9px;
    padding: 4px;
  }
}


.live-room-notice {
  margin-bottom: 14px;
  border-color: rgba(244, 198, 61, 0.45);
  background: rgba(244, 198, 61, 0.08);
}


.export-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}


.claim-time {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(244,198,61,.08);
  border: 1px solid rgba(244,198,61,.18);
  color: #fff2b2;
  font-size: 14px;
  font-weight: 700;
}
