@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Warm plum-tinted darks instead of flat neutral black | kills the grayscale feel */
  --bg-void:       #0e0a12;
  --bg-surface:    #170f1d;
  --bg-card:       #1e1626;
  --bg-card-hover: #271b33;

  --pink-deep:    #d4789a;
  --pink-primary: #f9a8c9;
  --pink-bright:  #fbc8dc;
  --pink-soft:    #fde8f1;
  --pink-muted:   rgba(249, 168, 201, 0.12);
  --pink-glow:    rgba(249, 168, 201, 0.25);
  --violet:       #a87fd0;

  --text-primary:   #f7eef3;
  --text-secondary: #b8a1b0;
  --text-muted:     #7c6574;

  --success:  #4ade80;
  --error:    #f87171;
  --warning:  #fbbf24;

  --glow-sm:  0 0 10px rgba(249, 168, 201, 0.3);
  --glow-md:  0 0 22px rgba(249, 168, 201, 0.25);
  --glow-lg:  0 0 42px rgba(249, 168, 201, 0.18);
  --glow-btn: 0 0 14px rgba(249, 168, 201, 0.4), 0 4px 18px rgba(0, 0, 0, 0.35);

  /* --border was referenced throughout admin + hub but never defined → borderless/"chopped". Defined now. */
  --border:        rgba(249, 168, 201, 0.16);
  --border-subtle: 1px solid rgba(249, 168, 201, 0.14);
  --border-active: 1px solid rgba(249, 168, 201, 0.38);
  --border-strong: 1px solid rgba(249, 168, 201, 0.55);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --transition-fast:   150ms ease;
  --transition-normal: 260ms ease;
  --transition-slow:   420ms ease;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  /* Layered radial glows give the page depth and warmth instead of flat black */
  background:
    radial-gradient(1100px 620px at 50% -8%, rgba(249, 168, 201, 0.10), transparent 60%),
    radial-gradient(900px 520px at 100% 2%, rgba(168, 127, 208, 0.09), transparent 55%),
    radial-gradient(820px 600px at 0% 32%, rgba(212, 120, 154, 0.07), transparent 52%),
    var(--bg-void);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font);
  min-height: 100svh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--pink-deep); border-radius: 3px; }

a {
  color: var(--pink-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--pink-bright); }

/* ─── Layout ─────────────────────────────── */

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.page--wide {
  max-width: 1200px;
}

/* ─── Header ─────────────────────────────── */

.site-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1.25rem 0;
  max-width: 960px;
  margin: 0 auto;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.site-header__title {
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink-primary), var(--pink-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-header__back {
  margin-left: auto;
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--transition-fast);
}
.site-header__back:hover { color: var(--pink-primary); }

/* ─── Cards ──────────────────────────────── */

.card {
  background: linear-gradient(160deg, var(--bg-card), var(--bg-surface));
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.22);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), background var(--transition-normal);
}

.card--hover:hover {
  border-color: rgba(232, 121, 160, 0.28);
  box-shadow: var(--glow-sm);
  background: var(--bg-card-hover);
}

.card--glow {
  border: var(--border-active);
  box-shadow: var(--glow-sm);
}

/* ─── Buttons ────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.72rem 1.6rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  min-height: 44px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pink-primary), var(--pink-bright));
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: var(--glow-btn);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--pink-primary);
  border: var(--border-active);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--pink-muted);
  box-shadow: var(--glow-sm);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: var(--error);
  border: 1px solid rgba(248, 113, 113, 0.25);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.2);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  min-height: 34px;
}

/* ─── Inputs ─────────────────────────────── */

.input {
  width: 100%;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.input:focus {
  border-color: var(--pink-primary);
  box-shadow: var(--glow-sm);
}
.input::placeholder { color: var(--text-muted); }

textarea.input { resize: vertical; min-height: 90px; }

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.input-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Toast ──────────────────────────────── */

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  max-width: 320px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  pointer-events: none;
}
.toast--visible {
  opacity: 1;
  transform: translateX(0);
}
.toast--success { border-color: rgba(74, 222, 128, 0.4); color: var(--success); }
.toast--error   { border-color: rgba(248, 113, 113, 0.4); color: var(--error); }
.toast--info    { border-color: var(--border-subtle); color: var(--text-primary); }

/* ─── Modal ──────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: var(--border-active);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.96);
  transition: transform var(--transition-normal);
  box-shadow: var(--glow-md);
}
.modal-backdrop.open .modal { transform: scale(1); }

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.modal__title {
  font-size: 1.15rem;
  font-weight: 700;
}
.modal__close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.modal__close:hover { color: var(--text-primary); background: var(--pink-muted); }

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ─── Page Hero (key entry) ──────────────── */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  text-align: center;
  padding: 2rem 1.25rem;
}

.hero__lotus {
  margin-bottom: 1.5rem;
  animation: lotus-pulse 3.2s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(255, 110, 180, 0.7));
}

.hero__title {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink-soft), var(--pink-bright), var(--pink-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

.hero__subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  max-width: 400px;
}

.key-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 420px;
}

.key-input-wrapper {
  position: relative;
}

.key-input {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding-right: 3rem;
}

/* ─── Hub ────────────────────────────────── */

.hub-header {
  text-align: center;
  padding: 2.5rem 1.25rem 0;
}

.hub-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink-soft), var(--pink-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.hub-subtitle {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.session-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--pink-muted);
  border: var(--border-subtle);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  color: var(--pink-soft);
  margin-bottom: 2.5rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.game-card__icon {
  font-size: 2.2rem;
  line-height: 1;
}

.game-card__name {
  font-size: 1.1rem;
  font-weight: 700;
}

.game-card__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex: 1;
}

/* ─── Game Page ──────────────────────────── */

.game-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.game-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  background: linear-gradient(135deg, var(--pink-primary), var(--pink-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.clue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.clue-item {
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.clue-item__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--pink-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.clue-item__value {
  font-size: 1rem;
  font-weight: 600;
}

.guess-form {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.answer-reveal {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  display: none;
}

.answer-reveal.correct {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: var(--success);
  display: block;
}

.answer-reveal.wrong {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--error);
  display: block;
}

/* ─── Guess the Map ──────────────────────── */

.map-image-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: var(--border-subtle);
  margin-bottom: 1.5rem;
  aspect-ratio: 16/9;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.choices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.choice-btn {
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
  text-align: center;
  min-height: 52px;
}

.choice-btn:hover:not(:disabled) {
  border-color: rgba(232, 121, 160, 0.35);
  background: var(--bg-card-hover);
}

.choice-btn--correct {
  border-color: rgba(74, 222, 128, 0.6) !important;
  background: rgba(74, 222, 128, 0.1) !important;
  color: var(--success) !important;
}

.choice-btn--wrong {
  border-color: rgba(248, 113, 113, 0.6) !important;
  background: rgba(248, 113, 113, 0.1) !important;
  color: var(--error) !important;
}

/* ─── Clue list (Guess the Clan) ─────────── */

.clue-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.clue-list li {
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-left: 3px solid var(--pink-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  animation: fade-in-up 0.3s ease both;
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Higher or Lower ────────────────────── */

.hl-arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.75rem;
}

.hl-player {
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
}

.hl-player__name {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.hl-player__tier {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink-primary), var(--pink-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hl-vs {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9rem;
}

.hl-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.hl-score {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.hl-score span {
  color: var(--pink-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ─── Draft Team ─────────────────────────── */

.draft-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.budget-display {
  display: flex;
  gap: 1.5rem;
}

.budget-stat {
  text-align: center;
}

.budget-stat__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.budget-stat__value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--pink-primary);
}

.budget-stat__value.danger { color: var(--error); }

.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.player-card {
  cursor: pointer;
  text-align: center;
  padding: 1rem 0.75rem;
  user-select: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.player-card:hover {
  border-color: rgba(232, 121, 160, 0.3);
}

.player-card--selected {
  border: var(--border-strong) !important;
  background: rgba(232, 121, 160, 0.08) !important;
  box-shadow: var(--glow-sm) !important;
}

.player-card__name {
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
}

.player-card__points {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--pink-primary);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%  { transform: translateX(-6px); }
  40%  { transform: translateX(6px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
}

.player-card--shake { animation: shake 0.35s ease; }

/* ─── Admin ───────────────────────────────── */

.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100svh;
  gap: 0;
}

@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { border-right: none; border-bottom: var(--border-subtle); }
}

.admin-sidebar {
  background: var(--bg-surface);
  border-right: var(--border-subtle);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-sidebar__title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 0.2rem;
}

.admin-nav-btn {
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  text-align: left;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: background var(--transition-fast), color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.admin-nav-btn:hover { background: var(--pink-muted); color: var(--text-primary); }
.admin-nav-btn.active { background: var(--pink-muted); color: var(--pink-primary); font-weight: 600; }

.admin-main {
  padding: 2rem 1.5rem;
  overflow-x: auto;
}

.admin-section {
  display: none;
}
.admin-section.active { display: block; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
}

/* ─── Table ──────────────────────────────── */

.table-wrapper {
  overflow-x: auto;
  border: var(--border-subtle);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead th {
  background: var(--bg-surface);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: var(--border-subtle);
  white-space: nowrap;
}

tbody td {
  padding: 0.8rem 1rem;
  border-bottom: var(--border-subtle);
  vertical-align: middle;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-card-hover); }

.table-actions {
  display: flex;
  gap: 0.4rem;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge--used   { background: rgba(74, 222, 128, 0.1); color: var(--success); border: 1px solid rgba(74, 222, 128, 0.3); }
.badge--unused { background: rgba(232, 121, 160, 0.1); color: var(--pink-primary); border: var(--border-subtle); }

/* ─── Login overlay ──────────────────────── */

.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-void);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 200;
}

.login-box {
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.login-box__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.login-box__title {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink-primary), var(--pink-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.login-error {
  color: var(--error);
  font-size: 0.85rem;
  display: none;
}

/* ─── Spinners / Loading ─────────────────── */

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--pink-muted);
  border-top-color: var(--pink-primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 2rem auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
}

/* ─── Misc helpers ───────────────────────── */

.text-pink { color: var(--pink-primary); }
.text-muted { color: var(--text-secondary); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }

.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 1.5rem 0;
  border: none;
}

/* ─── Mobile ─────────────────────────────── */

@media (max-width: 600px) {
  .hl-arena { grid-template-columns: 1fr; }
  .hl-vs { display: none; }
  .choices-grid { grid-template-columns: 1fr; }
  .guess-form { flex-direction: column; }
  .budget-display { gap: 1rem; }
}

/* ══════════════════════════════════════════
   HUB REDESIGN
══════════════════════════════════════════ */

.hub-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
}

.hub-hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
  position: relative;
  overflow: hidden;
}
.hub-hero::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 500px;
  background: radial-gradient(ellipse at center, rgba(249,168,201,0.09) 0%, transparent 68%);
  pointer-events: none;
}
.hub-hero > * { position: relative; }

.hub-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--pink-primary);
  background: var(--pink-muted);
  border: var(--border-subtle);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1.25rem;
}

.hub-hero__title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}
.hub-hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--pink-primary), var(--pink-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hub-hero__sub {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.hub-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: 999px;
  padding: 0.35rem 1rem 0.35rem 0.6rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.hub-user-chip strong { color: var(--pink-primary); }
.hub-user-dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.4); }
  50%      { box-shadow: 0 0 0 5px rgba(74,222,128,0); }
}

.hub-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.games-grid-v2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.game-card-v2 {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(165deg, var(--bg-card), var(--bg-surface));
  border: var(--border-subtle);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.26);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}
.game-card-v2:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.35), 0 0 16px rgba(249,168,201,0.12);
  border-color: rgba(249,168,201,0.28);
}

.game-card-v2__banner {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  position: relative;
  overflow: hidden;
}
.game-card-v2__banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--bg-card));
}

.game-card-v2__body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.game-card-v2__name {
  font-size: 1.05rem;
  font-weight: 700;
}
.game-card-v2__desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  flex: 1;
  line-height: 1.5;
}
.game-card-v2__cta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pink-primary);
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.game-card-v2--disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.4);
}

.game-card-v2--done {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
  filter: grayscale(0.3);
}
.game-card-v2--done .game-card-v2__cta {
  color: var(--text-muted);
}

.good-game-screen {
  margin-top: 1rem;
  text-align: center;
}
.good-game-inner {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
}
.good-game-check {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--pink-muted);
  color: var(--pink-primary);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.good-game-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.good-game-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 340px;
  margin: 0 auto;
}

.suggestion-card {
  margin-top: 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.suggestion-card__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}
.suggestion-row {
  display: flex;
  gap: 0.5rem;
}
.suggestion-row .input { flex: 1; }

.hub-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ══════════════════════════════════════════
   GAME PAGE REDESIGN
══════════════════════════════════════════ */

.gp-wrap {
  max-width: 660px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 5rem;
}

.gp-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.gp-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.gp-meta { flex: 1; }
.gp-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
}
.gp-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.gp-counter {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}

/* Round progress stepper | numbered circles with connectors */
.round-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: nowrap;
  max-width: 560px;
  margin: 0 auto 1.85rem;
  padding: 0 0.25rem;
}

.round-dot {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.round-dot--done {
  background: linear-gradient(135deg, var(--pink-deep), var(--pink-primary));
  border-color: transparent;
  color: #2a0f1c;
}

.round-dot--current {
  border-color: var(--pink-primary);
  color: var(--pink-primary);
  background: var(--pink-muted);
  transform: scale(1.22);
  animation: round-pulse 1.7s ease-in-out infinite;
}

@keyframes round-pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--pink-muted), 0 0 8px rgba(249, 168, 201, 0.35); }
  50%      { box-shadow: 0 0 0 6px transparent, 0 0 16px rgba(249, 168, 201, 0.6); }
}

.round-conn {
  flex: 1 1 auto;
  min-width: 4px;
  max-width: 30px;
  height: 2px;
  background: var(--border);
  transition: background 0.3s ease;
}
.round-conn--done {
  background: linear-gradient(90deg, var(--pink-deep), var(--pink-primary));
}

@media (max-width: 520px) {
  .round-dot { width: 23px; height: 23px; font-size: 0.64rem; }
  .round-track { margin-bottom: 1.4rem; }
}

/* Stat card grid (Guess the Player clues) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pink-primary), var(--pink-bright));
  opacity: 0.5;
}
.stat-card__label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pink-primary);
  margin-bottom: 0.4rem;
}
.stat-card__value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

/* Fact card (full width) */
.fact-card {
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-left: 3px solid var(--pink-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Input row */
.gp-input-row {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.gp-input-row .input { flex: 1; }

/* Autocomplete (Guess the Player typeahead) */
.autocomplete { position: relative; flex: 1; }
.autocomplete .input { width: 100%; }
.autocomplete__list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-sm);
  max-height: 244px;
  overflow-y: auto;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.autocomplete__item {
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.autocomplete__item:last-child { border-bottom: none; }
.autocomplete__item:hover,
.autocomplete__item.active {
  background: var(--pink-muted);
  color: var(--pink-primary);
}

/* Locked-in feedback (neutral, no right/wrong) */
.locked-in-banner {
  display: none;
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  text-align: center;
}
.locked-in-banner.show { display: block; }

/* Choice buttons (map game) */
.choice-btn-v2 {
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  min-height: 54px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.choice-btn-v2:hover:not(:disabled) {
  border-color: rgba(249,168,201,0.35);
  background: var(--bg-card-hover);
}
.choice-btn-v2:disabled { opacity: 0.5; cursor: not-allowed; }
.choice-btn-v2.locked { opacity: 0.55; }

/* HL redesign */
.hl-card {
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  text-align: center;
  flex: 1;
}
.hl-card__label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.hl-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.hl-card__tier {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink-primary), var(--pink-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hl-card__tier.hidden-tier {
  background: none;
  -webkit-text-fill-color: var(--text-muted);
  color: var(--text-muted);
  font-size: 2rem;
  letter-spacing: 0.2em;
}

.hl-arena-v2 {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.hl-vs-v2 {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0 0.25rem;
}

.hl-btns {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.hl-streak-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 1.5rem;
}
.hl-streak-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--pink-primary);
}

/* Clue list (Guess the Clan) */
.clue-list-v2 {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.clue-list-v2 li {
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-left: 3px solid var(--pink-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  animation: fade-in-up 0.25s ease both;
}

/* Results page */
.results-locked {
  text-align: center;
  padding: 5rem 2rem;
}
.results-locked__icon { font-size: 3rem; margin-bottom: 1rem; }
.results-locked__title { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.5rem; }

.leaderboard { display: flex; flex-direction: column; gap: 0.5rem; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.25rem;
  transition: border-color var(--transition-fast);
}
.lb-row:hover { border-color: rgba(249,168,201,0.25); }
.lb-rank {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-muted);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.lb-rank.gold   { color: #fbbf24; }
.lb-rank.silver { color: #94a3b8; }
.lb-rank.bronze { color: #cd7f32; }
.lb-name { flex: 1; font-weight: 600; }
.lb-score {
  font-weight: 700;
  color: var(--pink-primary);
  font-size: 0.9rem;
}
.lb-breakdown {
  font-size: 0.75rem;
  color: var(--text-muted);
}
