:root {
  --font-ui: "Geist", sans-serif;
  --font-display: "Instrument Serif", serif;
  --bg-color: #0a0a0a;
  --container-bg: #141414;
  --text-main: #f3f3f3;
  --text-muted: #a0a0a0;
  --accent: #be0732;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-ui);
  background-color: var(--bg-color);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 16px;
  overscroll-behavior-y: contain;
}

/* ─── Container ─── */

.container {
  background-color: var(--container-bg);
  padding: 1.7rem;
  border-radius: 32px;
  width: 100%;
  max-width: 490px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

/* ─── Typography ─── */

h1 {
  font-family: var(--font-display);
  font-weight: normal;
  font-style: italic;
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 2.5rem;
}

/* ─── Divider ─── */

.divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 1.5rem 0;
}

/* ─── Input & Player List ─── */

.input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 0;
  margin-top: 12px;
}

input[type="text"] {
  flex: 1;
  padding: 0 20px;
  height: 56px;
  font-family: var(--font-ui);
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #000;
  color: #fff;
  border-radius: 12px;
  outline: none;
}

#player-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  margin-bottom: 24px;
}

#player-list li {
  background: rgba(255, 255, 255, 0.07);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─── Buttons ─── */

button {
  width: 100%;
  padding: 0 20px;
  height: 56px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

button:active {
  opacity: 0.9;
  transform: scale(0.97);
}

.btn-add {
  width: 56px;
  min-width: 56px;
  height: 56px;
  padding: 0;
  background: #f3f3f3;
  color: #000;
  border-radius: 12px;
  font-size: 26px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  margin-top: 10px;
}

.btn-home {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  transition: all 0.2s;
}

.btn-home:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.btn-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

.btn-icon:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-next {
  flex: 1;
  margin-top: 0;
}

/* ─── Category Toggle ─── */

.category-group {
  display: flex;
  background: #000;
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.category-btn {
  flex: 1;
  height: 44px;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  width: auto;
}

.category-btn.active {
  background: #ffffff;
  color: #000;
  border-color: transparent;
}

/* ─── Game Screen ─── */

#game-screen {
  display: none;
}

.game-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

#current-category-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  flex: 1;
  text-align: center;
}

.top-bar-spacer {
  width: 40px;
  height: 40px;
  min-width: 40px;
}

#question-display {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  line-height: 1.2;
  margin: 2rem 0 3rem;
  text-align: center;
  display: block;
  word-wrap: break-word;
  min-height: 160px;
}

.name-highlight {
  color: var(--accent);
  font-style: italic;
  display: inline-block;
}

.game-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

/* ─── Error ─── */

.error {
  color: var(--accent);
  font-size: 0.85rem;
  margin-top: 10px;
  margin-bottom: 0;
  display: none;
}