/* ===== Base layout ===== */

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #111;
  color: #f5f5f5;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

h1, h2, h3 {
  text-align: center;
}

.intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 1.5em;
  color: #ccc;
}

/* ===== Generic UI elements ===== */

.panel {
  background: #181818;
  border: 1px solid #333;
  padding: 16px;
  margin-top: 16px;
  border-radius: 10px;
}

.hidden {
  display: none !important;
}

button {
  cursor: pointer;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  background: #007acc;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.05s ease;
}

button:hover {
  background: #0091ff;
}

button:active {
  transform: scale(0.97);
}

.badge {
  display: inline-block;
  min-width: 60px;
  text-align: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #222;
  border: 1px solid #444;
  font-family: monospace;
}

.hint {
  margin-top: 8px;
  font-size: 13px;
  color: #bbb;
  text-align: center;
}

/* ===== Bingo card table (player + admin check) ===== */

.card-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

table.bingo-card {
  border-collapse: collapse;
  background: #000;
  color: #f5f5f5;
  box-shadow: 0 0 10px rgba(0,0,0,0.6);
}

table.bingo-card th,
table.bingo-card td {
  border: 1px solid #444;
  width: 60px;
  height: 60px;
  text-align: center;
  vertical-align: middle;
  font-size: 20px;
  user-select: none;
}

table.bingo-card th {
  background: #202020;
  font-size: 22px;
  letter-spacing: 3px;
}

table.bingo-card td {
  cursor: pointer;
}

table.bingo-card td.free {
  background: #333;
  font-weight: 700;
  font-size: 16px;
}

table.bingo-card td.marked {
  background: #0f5132;
  box-shadow: inset 0 0 0 2px #198754;
}

table.bingo-card td.called {
  background: #3f1b1b;
}

/* ===== Admin: number calling ===== */

.caller-controls {
  text-align: center;
  margin-bottom: 12px;
}

.called-numbers-block {
  margin-top: 10px;
}

.called-numbers {
  min-height: 40px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #151515;
  font-family: monospace;
  font-size: 13px;
}

/* ===== Admin: check result ===== */

.check-result {
  text-align: center;
  font-weight: 600;
  margin-top: 10px;
}

.check-result.ok {
  color: #5cd65c;
}

.check-result.fail {
  color: #ff6666;
}

/* ===== Admin: password overlay ===== */

.lock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lock-box {
  background: #181818;
  border-radius: 10px;
  border: 1px solid #333;
  padding: 20px 24px;
  max-width: 320px;
  width: 100%;
  text-align: center;
}

.lock-box input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #000;
  color: #f5f5f5;
  margin: 10px 0;
}

.lock-message {
  margin-top: 8px;
  font-size: 13px;
  color: #ff6666;
}

/* ===== Admin: 20-line card ID manager ===== */

.card-list-wrapper {
  max-height: 400px;
  overflow-y: auto;
  margin-top: 10px;
}

table.card-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.card-list-table th,
table.card-list-table td {
  border: 1px solid #333;
  padding: 6px 8px;
  text-align: left;
}

table.card-list-table th {
  background: #202020;
  font-weight: 600;
}

table.card-list-table td input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid #444;
  background: #000;
  color: #f5f5f5;
  font-size: 13px;
}

table.card-list-table td a {
  color: #61dafb;
  text-decoration: underline;
  font-size: 13px;
}

table.card-list-table td button {
  padding: 4px 8px;
  font-size: 12px;
}
