/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }

:root {
  --bg:        #0f0f1a;
  --bg2:       #1a1a2e;
  --bg3:       #252540;
  --surface:   #2a2a48;
  --border:    rgba(255,255,255,0.08);
  --text:      #e8e8f0;
  --text2:     #9090a8;
  --text3:     #5a5a78;
  --accent:    #7c6af7;
  --accent2:   #5b52c4;
  --gold:      #f5c842;
  --silver:    #b0b8c8;
  --bronze:    #c8894a;
  --success:   #3ecf8e;
  --danger:    #f56565;
  --radius:    12px;
  --radius-sm: 8px;
  --font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { font-size: 16px; }
body::before {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url('/static/dragons.png');
  background-size: cover;
  background-position: center center;
  opacity: var(--dragon-opacity, 0);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); /* room for bottom nav */
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Login ---- */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  padding-bottom: 2rem;
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
}

.login-icon { font-size: 3rem; margin-bottom: 1rem; }
.login-title { font-size: 1.6rem; font-weight: 600; margin-bottom: 0.3rem; }
.login-sub { color: var(--text2); font-size: 0.9rem; margin-bottom: 1.8rem; }

.login-error {
  background: rgba(245,101,101,0.15);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.login-form { display: flex; flex-direction: column; gap: 0.75rem; }

.login-input {
  width: 100%;
  height: 48px;
  padding: 0 1rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  text-align: center;
  letter-spacing: 0.15em;
}
.login-input:focus { outline: none; border-color: var(--accent); }

.login-btn {
  height: 48px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.login-btn:hover { background: var(--accent2); }
.login-btn:active { transform: scale(0.98); }

/* ---- App header ---- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: 52px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

.app-logo { font-size: 1rem; font-weight: 600; }

.nav { display: flex; gap: 1rem; align-items: center; }
.nav-link { color: var(--text2); font-size: 0.8rem; }
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-logout { color: var(--text3); }

/* ---- Bottom nav (mobile) ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0 10px;
  color: var(--text2);
  font-size: 0.7rem;
  text-decoration: none;
  transition: color 0.15s;
}
.bn-item:hover, .bn-item:focus { color: var(--accent); text-decoration: none; }
.bn-icon { font-size: 1.3rem; line-height: 1; }
.bn-label { line-height: 1; }
.bn-play .bn-icon {
  background: var(--accent);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-top: -16px;
  border: 3px solid var(--bg);
}

/* ---- Main layout ---- */
.main { max-width: 640px; margin: 0 auto; padding: 1.25rem 1rem; }

.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.page-title { font-size: 1.4rem; font-weight: 600; }
.page-sub { color: var(--text2); font-size: 0.9rem; margin-top: 0.2rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 40px;
  padding: 0 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent2); text-decoration: none; color: #fff; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg3); text-decoration: none; }
.btn-sm { height: 32px; padding: 0 0.8rem; font-size: 0.8rem; }
.btn-lg { height: 52px; font-size: 1rem; font-weight: 600; }
.btn-block { width: 100%; }

/* ---- Search bar ---- */
.search-bar { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.search-input {
  flex: 1;
  height: 44px;
  padding: 0 1rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
}
.search-input:focus { outline: none; border-color: var(--accent); }
.search-input::placeholder { color: var(--text3); }

/* ---- Section ---- */
.section { margin-bottom: 2rem; }
.section-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text2);
  margin-bottom: 0.75rem;
}

/* ---- Game grid ---- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.game-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.game-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.game-thumb-placeholder {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--bg3);
}

.game-name {
  padding: 0.5rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

/* ---- Game card delete overlay ---- */
.game-card-delete {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  padding: 0;
}

/* ---- BGG search result cards ---- */
.bgg-result-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.bgg-result-name { font-size: 0.85rem; font-weight: 500; line-height: 1.3; flex: 1; }

/* ---- Alert ---- */
.alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.alert-active {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

/* ---- Play - game picker ---- */
.play-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-label { font-size: 0.85rem; color: var(--text2); font-weight: 500; display: block; margin-bottom: 0.5rem; }

.game-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

/* game pick card selected */
.game-pick-card:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  position: relative;
  cursor: pointer;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}
.game-pick-card:hover { border-color: var(--accent); }
.game-pick-radio {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.game-pick-radio:checked + img,
.game-pick-radio:checked + .game-thumb-placeholder {
  outline: none;
}
.game-pick-radio:checked ~ .game-name { color: var(--accent); }
/* Highlight selected card */
.game-pick-card:has(input:checked) {
  border-color: var(--accent);
  background: rgba(124,106,247,0.1);
}

/* ---- Results form ---- */
.results-form { display: flex; flex-direction: column; gap: 0; }

.player-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.place-badge { font-size: 1.3rem; width: 2rem; text-align: center; flex-shrink: 0; }
.player-input {
  flex: 1;
  height: 44px;
  padding: 0 0.875rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
}
.player-input:focus { outline: none; border-color: var(--accent); }
.player-input::placeholder { color: var(--text3); }

/* ---- History ---- */
.history-list { display: flex; flex-direction: column; gap: 12px; }

.history-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.history-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  border-bottom: 1px solid var(--border);
}

.history-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.history-thumb-placeholder {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.history-game-name { font-weight: 600; font-size: 1rem; }
.history-date { font-size: 0.8rem; color: var(--text2); margin-top: 2px; }

.result-list { list-style: none; padding: 0.5rem 0; }
.result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.875rem;
}
.result-place { font-size: 1.2rem; width: 2rem; text-align: center; flex-shrink: 0; }
.result-name { font-size: 0.95rem; }

/* ---- Empty states ---- */
.empty-msg { color: var(--text2); font-size: 0.9rem; padding: 1rem 0; }
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.empty-icon { font-size: 3rem; }

/* ---- Responsive ---- */
@media (min-width: 600px) {
  .bottom-nav { display: none; }
  body { padding-bottom: 0; }
}

@media (max-width: 599px) {
  /* Hide top nav links that are already in the bottom nav */
  .nav-desktop { display: none; }
  /* Tighten up remaining top nav items */
  .nav { gap: 0.6rem; }

  /* History card: wrap results to second row so delete button stays visible */
  .history-card-header { flex-wrap: wrap; align-items: flex-start; }
  .history-card-info { flex: 1; }
  .history-results-inline {
    order: 3;
    width: 100%;
    margin-left: 0;
    margin-top: 0.5rem;
    flex-shrink: 1;
  }
}

/* ---- Clickable logo ---- */
.app-logo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.app-logo:hover { text-decoration: none; color: var(--accent); }

/* ---- Alert error ---- */
.alert-error {
  background: rgba(245,101,101,0.15);
  border: 1px solid var(--danger);
  color: var(--danger);
}

/* ---- Add player form ---- */
.add-player-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

/* ---- Player list ---- */
.player-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.player-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.875rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.player-list-name { font-size: 0.95rem; }

/* ---- Leaderboard ---- */
.leaderboard {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.lb-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.875rem;
  border-bottom: 1px solid var(--border);
}
.lb-row:last-child { border-bottom: none; }
.lb-rank { font-size: 1.2rem; width: 2rem; text-align: center; flex-shrink: 0; }
.lb-name { flex: 1; font-weight: 500; }
.lb-wins { font-size: 0.85rem; color: var(--text2); }

/* ---- Results drag UI ---- */
.player-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0.75rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 52px;
  margin-bottom: 0.75rem;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.1s;
}
.player-chip:active { transform: scale(0.97); }
.player-chip.selected {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--accent);
  transform: scale(1.05);
}

.add-custom-player {
  margin-top: 0.5rem;
}

.position-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: border-color 0.15s, background 0.15s;
  cursor: default;
}

/* position row ready-to-place */
.position-row.ready-to-place {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  cursor: pointer;
}

.pos-reorder {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
.pos-reorder-btn {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 0.65rem;
  padding: 0.15rem 0.25rem;
  border-radius: var(--radius-sm);
  line-height: 1;
  transition: color 0.15s;
}
.pos-reorder-btn:hover:not(:disabled) { color: var(--text); }
.pos-reorder-btn:disabled { opacity: 0.2; cursor: default; }

.pos-content { flex: 1; min-width: 0; }
.pos-label { font-size: 1.2rem; margin-bottom: 0.4rem; line-height: 1; }

.pos-players {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
}

.placed-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  background: var(--bg3);
  border: 1px solid var(--accent);
  color: var(--text);
  border-radius: 999px;
  font-size: 0.85rem;
}
.chip-remove {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
}
.chip-remove:hover { color: var(--danger); }

.pos-hint {
  font-size: 0.8rem;
  color: var(--text3);
  margin-top: 0.35rem;
  font-style: italic;
}

.pos-remove-btn {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.pos-remove-btn:hover { color: var(--danger); }

/* ---- Inline results in history card ---- */
.history-card-header { border-bottom: none; }

.history-results-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-left: auto;
  flex-shrink: 0;
}

.ri-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}
.ri-place { font-size: 1.1rem; line-height: 1; }
.ri-name  { font-size: 0.9rem; color: var(--text); }

/* ---- Feedback ---- */
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.feedback-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font);
  resize: vertical;
  line-height: 1.5;
}
.feedback-input:focus { outline: none; border-color: var(--accent); }
.feedback-input::placeholder { color: var(--text3); }

.feedback-list { display: flex; flex-direction: column; gap: 8px; }
.feedback-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
}
.feedback-text { font-size: 0.95rem; line-height: 1.5; white-space: pre-wrap; }
.feedback-date { font-size: 0.78rem; color: var(--text3); margin-top: 0.4rem; }

/* ---- Admin button ---- */
.nav-admin { color: var(--text3); }
.nav-admin:hover { color: var(--text); text-decoration: none; }
.nav-link.nav-admin-active { color: #f97316 !important; font-weight: 600; }
.nav-link.nav-admin-active:hover { color: #fb923c !important; text-decoration: none; }

/* ---- Admin cancel session button (active sessions) ---- */
.btn-cancel-session {
  background: #f97316;
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.btn-cancel-session:hover { background: #ea6c05; }

/* ---- Admin delete buttons ---- */
.btn-delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-sm);
  color: var(--text3);
  transition: color 0.15s, background 0.15s;
}
.btn-delete:hover { color: var(--danger); background: rgba(245,101,101,0.1); }

.btn-delete-full {
  width: 100%;
  background: transparent;
  color: var(--text3);
  border-color: transparent;
}
.btn-delete-full:hover { color: var(--danger); background: rgba(245,101,101,0.1); border-color: transparent; text-decoration: none; }

/* ---- Feedback toggle ---- */
.feedback-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.feedback-body { flex: 1; }
.feedback-toggle { flex-shrink: 0; }

.btn-check {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text3);
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}
.btn-check:hover { color: var(--success); }
.btn-check-done { color: var(--success); }
.btn-check-done:hover { color: var(--text3); }

.feedback-item-done .feedback-text {
  color: var(--text3);
  text-decoration: line-through;
}
.feedback-item-done .feedback-date { color: var(--text3); }

/* ---- Theme picker ---- */
.nav-theme-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  color: var(--text2);
  display: flex;
  align-items: center;
}
.nav-theme-btn:hover { color: var(--text); }

#theme-picker {
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: flex-start;
  justify-content: flex-end;
}

#theme-backdrop {
  position: absolute;
  inset: 0;
}

#theme-panel {
  position: relative;
  margin-top: 52px;
  margin-right: 0.75rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

#theme-swatches {
  display: grid;
  grid-template-columns: repeat(5, 28px);
  gap: 8px;
}

.gw-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  padding: 0;
}
.gw-swatch:hover { transform: scale(1.15); }
.gw-swatch-active {
  border-color: var(--text);
  transform: scale(1.1);
}

/* ---- Play page: game search ---- */
.game-search-wrap {
  position: relative;
  margin-bottom: 0.5rem;
}

.game-search-wrap .search-input {
  width: 100%;
  font-size: 1.05rem;
  height: 52px;
  padding: 0 1.1rem;
  border-radius: var(--radius);
}

.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  max-height: 320px;
  overflow-y: auto;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--bg3); }

/* search item active tap */
.search-item:active {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
}

.search-item-name {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.3;
}

.search-item-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(124,106,247,0.15);
  border: 1px solid rgba(124,106,247,0.3);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  flex-shrink: 0;
}

.search-item-empty {
  color: var(--text3);
  font-size: 0.9rem;
  cursor: default;
  font-style: italic;
}
.search-item-empty:hover { background: transparent; }

/* selected game display */
.selected-game-display {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.play-custom-hint {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text3);
}

img.emoji {
  height: 1em;
  width: 1em;
  vertical-align: -0.1em;
}

/* coop badge */
.coop-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  vertical-align: middle;
  margin-left: 0.35rem;
}

/* coop loss row in history */
.ri-coop-loss .ri-place,
.ri-coop-loss .ri-name {
  opacity: 0.55;
}

/* tabs */
.tabs-header {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  padding-bottom: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-header::-webkit-scrollbar { display: none; }

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text3);
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* stats list (shared by tijd/gespeeld/heavy) */
.stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.stats-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--text) 4%, transparent);
}
.stats-rank {
  min-width: 1.6rem;
  font-size: 0.85rem;
  color: var(--text3);
  text-align: center;
  flex-shrink: 0;
}
.stats-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}
.stats-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.stats-description {
  font-size: 0.8rem;
  color: var(--text3);
  margin-bottom: 0.75rem;
}
