/* Tangled Trivia Second Screen — shared styles (tangledtrivia.com palette) */
:root {
  --bg: #101010;
  --surface: #16171A;
  --text: #F5F8FC;
  --muted: #A3AFBF;
  --accent: #7B16FF;
  --primary: #4e148c;
  --yellow: #eeee22;
  --success: #0ebb10;
  --warn: #FDCB6E;
  --error: #fd2c56;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.container { max-width: 480px; margin: 0 auto; padding: 1rem; }
.container.wide { max-width: 720px; }

h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.2rem; margin: 0 0 0.5rem; }
.muted { color: var(--muted); }

input, button, select {
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--muted);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
}
input { width: 100%; }
button {
  cursor: pointer;
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--primary);
  font-weight: 600;
}
button:hover { opacity: 0.9; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.secondary {
  background: transparent;
  color: var(--yellow);
  border-color: var(--muted);
}

/* Link styled as button */
a.btn-link {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  color: var(--primary);
  background: var(--yellow);
  border: 1px solid var(--yellow);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  text-decoration: none;
}
a.btn-link:hover { opacity: 0.9; }
a.btn-link.secondary {
  background: transparent;
  color: var(--yellow);
  border-color: var(--muted);
}

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.25rem; color: var(--muted); font-size: 0.9rem; }

.alert { padding: 0.6rem; border-radius: 8px; margin-bottom: 1rem; }
.alert.error { background: rgba(253, 44, 86, 0.2); color: var(--error); }
.alert.success { background: rgba(14, 187, 16, 0.2); color: var(--success); }
.alert.info { background: rgba(123, 22, 255, 0.2); color: var(--accent); }

.card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.flex { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.mt { margin-top: 1rem; }
.mb { margin-bottom: 0.5rem; }

/* Top nav */
.topnav {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--muted);
  margin-bottom: 1rem;
}
.topnav a {
  color: var(--yellow);
  text-decoration: none;
  font-size: 0.9rem;
}
.topnav a:hover { text-decoration: underline; color: var(--text); }
.topnav a:first-child { font-weight: 600; color: var(--text); }

/* Player: bingo / Lotería board */
.bingo-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  max-width: 280px;
  margin: 0 auto 1rem;
}
.bingo-board.loteria-board {
  grid-template-columns: repeat(4, 1fr);
}
.bingo-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--muted);
  border-radius: 4px;
  font-weight: 600;
}
.bingo-cell.marked { background: var(--yellow); color: var(--primary); }

/* Trivia options */
.trivia-options { display: flex; flex-direction: column; gap: 0.5rem; }
.trivia-option {
  padding: 0.8rem;
  background: var(--surface);
  border: 2px solid var(--muted);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}
.trivia-option:hover { border-color: var(--yellow); }
.trivia-option.selected { border-color: var(--yellow); background: rgba(238, 238, 34, 0.15); }
.trivia-option.correct { border-color: var(--success); background: rgba(14, 187, 16, 0.2); }
.trivia-option.wrong { border-color: var(--error); background: rgba(253, 44, 86, 0.2); }

/* Host dashboard */
.players-list { list-style: none; padding: 0; margin: 0; }
.players-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  border-bottom: 1px solid var(--muted);
}
.claims-queue { margin-top: 1rem; }
.claim-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }

@media (min-width: 600px) {
  .container.wide { padding: 1.5rem; }
}
