@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

:root {
  --coral: #E8735A;
  --coral-soft: #F09E8C;
  --coral-pale: #FFF0EC;

  --ocean: #2B6CB0;
  --ocean-soft: #4A9BD9;
  --ocean-pale: #EBF4FF;

  --sun: #D69E2E;
  --sun-soft: #ECC94B;
  --sun-pale: #FFFFF0;

  --sage: #48834A;
  --sage-soft: #68A86A;
  --sage-pale: #F0FFF0;

  --sand: #F7F3EE;
  --sand-warm: #EDE5D8;
  --sand-deep: #D4C5B0;

  --ink: #2D3748;
  --ink-soft: #4A5568;
  --ink-muted: #A0AEC0;
  --ink-faint: #CBD5E0;

  --white: #FFFFFF;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 20px rgba(45, 55, 72, 0.08);
  --shadow-lg: 0 8px 40px rgba(45, 55, 72, 0.12);
}

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

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--sand);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

.screen { min-height: 100vh; }
.hidden { display: none !important; }

/* ===== TYPOGRAPHY ===== */
.join-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.join-title span {
  color: var(--coral);
  font-style: italic;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--coral);
  border: none;
  border-radius: var(--radius);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}

.btn-primary:hover { background: var(--coral-soft); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary:active { transform: translateY(0); }

.btn-large { padding: 18px 48px; font-size: 1.15rem; width: auto; }

.btn-ghost {
  display: inline-block;
  padding: 12px 28px;
  background: transparent;
  border: 1.5px solid var(--ink-faint);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-ghost:hover { border-color: var(--coral); color: var(--coral); }

.btn-danger-outline {
  padding: 14px 36px;
  background: transparent;
  border: 2px solid var(--coral);
  border-radius: var(--radius);
  color: var(--coral);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger-outline:hover { background: var(--coral); color: var(--white); }

.btn-danger {
  display: block;
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 1.5px solid var(--coral-soft);
  border-radius: var(--radius);
  color: var(--coral);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
}

/* ===== JOIN SCREEN ===== */
.join-container {
  max-width: 420px;
  margin: 0 auto;
  padding: 40px 24px;
  text-align: center;
}

.join-header { margin-bottom: 36px; }

.join-icon {
  color: var(--coral);
  margin-bottom: 16px;
}

.join-sub {
  font-size: 0.9rem;
  color: var(--ink-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 8px;
  font-weight: 500;
}

.join-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  text-align: left;
}

.join-field {
  margin-bottom: 16px;
}

.join-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.join-field input {
  width: 100%;
  padding: 14px 16px;
  background: var(--sand);
  border: 1.5px solid transparent;
  border-radius: 10px;
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.join-field input::placeholder { color: var(--ink-faint); }
.join-field input:focus { border-color: var(--coral-soft); box-shadow: 0 0 0 3px var(--coral-pale); }

#codeInput {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 6px;
  text-transform: uppercase;
}

.join-error {
  color: var(--coral);
  font-size: 0.85rem;
  margin-top: 12px;
  min-height: 20px;
  text-align: center;
}

.join-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  color: var(--ink-faint);
  font-size: 0.85rem;
}

.join-divider::before, .join-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--ink-faint);
}

/* ===== WAIT ===== */
.wait-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 30px;
  text-align: center;
}

.wait-circles {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 30px;
}

.wait-circle {
  position: absolute;
  border-radius: 50%;
  animation: breathe 3s ease-in-out infinite;
}

.c1 { width: 80px; height: 80px; background: var(--coral-pale); top: 0; left: 0; }
.c2 { width: 60px; height: 60px; background: var(--ocean-pale); top: 10px; left: 10px; animation-delay: 0.5s; }
.c3 { width: 40px; height: 40px; background: var(--sun-pale); top: 20px; left: 20px; animation-delay: 1s; }

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.1); opacity: 1; }
}

.wait-country { color: var(--ink-muted); margin: 8px 0 20px; }
.wait-msg { color: var(--ink-muted); font-size: 0.95rem; }

/* ===== BINGO CARD ===== */
#cardScreen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px;
  background: linear-gradient(180deg, var(--sand) 0%, var(--white) 30%);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 12px;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--ink);
}

.card-stats {
  background: var(--coral);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
}

.card-stats .stat { display: inline; }

.card-instruction {
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-align: center;
  padding: 0 8px 12px;
  line-height: 1.4;
}

.bingo-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 6px;
  max-height: calc(100vh - 180px);
  max-height: calc(100dvh - 180px);
}

.bingo-cell {
  background: var(--white);
  border: 2px solid var(--sand-warm);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.bingo-cell:active { transform: scale(0.97); }

.bingo-cell .cell-text {
  font-size: 0.7rem;
  line-height: 1.3;
  color: var(--ink-soft);
  font-weight: 500;
}

.bingo-cell.marked {
  background: var(--coral-pale);
  border-color: var(--coral-soft);
}

.bingo-cell.marked .cell-text { color: var(--coral); font-weight: 600; }

.bingo-cell.marked .cell-matched {
  font-size: 0.65rem;
  color: var(--coral);
  font-weight: 700;
  margin-top: 4px;
  opacity: 0.8;
}

.bingo-cell.marked::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: var(--coral);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bingo-cell.marked::before {
  content: '\2713';
  position: absolute;
  top: 5px;
  right: 7px;
  font-size: 10px;
  color: white;
  font-weight: 700;
  z-index: 1;
}

/* Color alternation for visual variety */
.bingo-cell:nth-child(4n+1) { border-color: var(--coral-pale); }
.bingo-cell:nth-child(4n+2) { border-color: var(--ocean-pale); }
.bingo-cell:nth-child(4n+3) { border-color: var(--sun-pale); }
.bingo-cell:nth-child(4n+4) { border-color: var(--sage-pale); }

.bingo-cell:nth-child(4n+1).marked { background: var(--coral-pale); border-color: var(--coral-soft); }
.bingo-cell:nth-child(4n+2).marked { background: var(--ocean-pale); border-color: var(--ocean-soft); }
.bingo-cell:nth-child(4n+3).marked { background: var(--sun-pale); border-color: var(--sun-soft); }
.bingo-cell:nth-child(4n+4).marked { background: var(--sage-pale); border-color: var(--sage-soft); }

.bingo-cell:nth-child(4n+2).marked .cell-text { color: var(--ocean); }
.bingo-cell:nth-child(4n+3).marked .cell-text { color: var(--sun); }
.bingo-cell:nth-child(4n+4).marked .cell-text { color: var(--sage); }

.bingo-cell:nth-child(4n+2).marked::after { background: var(--ocean); }
.bingo-cell:nth-child(4n+3).marked::after { background: var(--sun); }
.bingo-cell:nth-child(4n+4).marked::after { background: var(--sage); }

.bingo-cell:nth-child(4n+2).marked .cell-matched { color: var(--ocean); }
.bingo-cell:nth-child(4n+3).marked .cell-matched { color: var(--sun); }
.bingo-cell:nth-child(4n+4).marked .cell-matched { color: var(--sage); }

.card-footer { padding: 12px 0 8px; }

.progress-bar {
  height: 6px;
  background: var(--sand-warm);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--ocean), var(--sage));
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(45, 55, 72, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--ink-muted);
  cursor: pointer;
}

.modal-prompt {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 20px;
  line-height: 1.5;
  padding-right: 20px;
}

.modal-field { margin-bottom: 16px; }

.modal-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.modal-field input {
  width: 100%;
  padding: 14px 16px;
  background: var(--sand);
  border: 1.5px solid transparent;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
}

.modal-field input:focus {
  border-color: var(--coral-soft);
  box-shadow: 0 0 0 3px var(--coral-pale);
}

/* ===== BINGO CELEBRATION ===== */
.bingo-celebration {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 30px;
  text-align: center;
  background: linear-gradient(135deg, var(--coral-pale), var(--ocean-pale), var(--sun-pale));
  position: relative;
  overflow: hidden;
}

.bingo-text {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  font-weight: 700;
  color: var(--coral);
  animation: bingoPopIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bingoPopIn {
  0% { transform: scale(0) rotate(-10deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.bingo-sub {
  font-size: 1.3rem;
  color: var(--ink);
  margin: 16px 0 24px;
  font-weight: 500;
}

.bingo-msg {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 300px;
  line-height: 1.6;
}

.bingo-stars {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}

.star-particle {
  position: absolute;
  font-size: 20px;
  animation: starFloat 3s ease-out forwards;
  pointer-events: none;
}

@keyframes starFloat {
  0% { opacity: 1; transform: translateY(0) rotate(0); }
  100% { opacity: 0; transform: translateY(-200px) rotate(360deg); }
}

/* ===== FINAL (PLAYER) ===== */
#finalScreen {
  background: linear-gradient(135deg, var(--coral-pale), var(--ocean-pale), var(--sun-pale));
}

.final-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 40px 24px;
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.final-icon {
  font-size: 3.5rem;
  color: var(--coral);
  margin-bottom: 12px;
  animation: bingoPopIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.final-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin-bottom: 28px;
  color: var(--ink);
}

.final-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin-bottom: 28px;
}

.final-stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 12px;
  box-shadow: var(--shadow);
}

.final-stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--coral);
  line-height: 1;
  margin-bottom: 4px;
}

.final-stat-card:nth-child(2) .final-stat-num { color: var(--ocean); }
.final-stat-card:nth-child(3) .final-stat-num { color: var(--sage); }
.final-stat-card:nth-child(4) .final-stat-num { color: var(--sun); }

.final-stat-label {
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.final-message {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 320px;
  line-height: 1.6;
}

/* ==============================
   HOST STYLES
   ============================== */
/* ===== HOST AUTH ===== */
.host-auth {
  max-width: 400px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}

.host-auth-sub {
  font-size: 0.9rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 8px;
  margin-bottom: 36px;
  font-weight: 500;
}

.host-auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  text-align: left;
}

.host-auth-card .join-field { margin-bottom: 16px; }

.host-body { background: var(--white); }

.host-lobby {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hl-header {
  padding: 24px 40px;
  border-bottom: 1px solid var(--sand-warm);
}

.hl-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 40px;
}

.hl-code-area { text-align: center; }

.hl-label {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.hl-label strong { color: var(--coral); }

.hl-qr {
  margin-bottom: 24px;
}

.hl-qr svg {
  width: 220px;
  height: 220px;
}

.hl-code-inline {
  font-family: 'DM Sans', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 10px;
  color: var(--coral);
}

.hl-code {
  font-family: 'DM Sans', sans-serif;
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: 12px;
  color: var(--coral);
  animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.hl-count {
  margin-top: 16px;
  font-size: 1rem;
  color: var(--ink-muted);
}

.hl-count span {
  font-weight: 700;
  color: var(--coral);
  font-size: 1.2rem;
}

.hl-players {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 800px;
}

.hl-player {
  background: var(--sand);
  border-radius: 20px;
  padding: 8px 18px;
  font-weight: 500;
  font-size: 0.9rem;
  animation: slideUp 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hl-player .country-flag {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hl-footer {
  padding: 24px 40px;
  text-align: center;
  border-top: 1px solid var(--sand-warm);
}

/* ===== HOST ACTIVE ===== */
.host-active {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 40px;
}

.ha-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--sand-warm);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.ha-title { font-size: 1.4rem; }

.ha-stats { display: flex; gap: 32px; }

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

.ha-stat-num {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--coral);
  line-height: 1;
}

.ha-stat-timer .ha-stat-num {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.ha-stat-label {
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.ha-players-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  align-content: start;
  overflow-y: auto;
}

.ha-player-card {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.3s;
}

.ha-player-card.has-bingo {
  background: linear-gradient(135deg, var(--coral-pale), var(--sun-pale));
  border: 2px solid var(--coral-soft);
}

.ha-pc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.ha-pc-kick {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

.ha-pc-kick:hover {
  color: var(--coral);
}

.ha-pc-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.ha-pc-country {
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.ha-pc-progress {
  height: 6px;
  background: var(--sand-warm);
  border-radius: 3px;
  overflow: hidden;
}

.ha-pc-progress-fill {
  height: 100%;
  background: var(--coral);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.ha-pc-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.ha-footer {
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid var(--sand-warm);
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ha-join-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ha-join-qr svg {
  width: 64px;
  height: 64px;
}

.ha-join-info {
  text-align: left;
}

.ha-join-code {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--coral);
}

.ha-join-url {
  font-size: 0.7rem;
  color: var(--ink-muted);
}

/* ===== BINGO ALERT (HOST) ===== */
.bingo-alert {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(232, 115, 90, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: alertIn 0.3s ease-out;
}

@keyframes alertIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ba-content { text-align: center; color: var(--white); }

.ba-star {
  font-size: 80px;
  animation: bingoPopIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ba-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  margin: 16px 0;
}

.ba-content p { font-size: 1.3rem; opacity: 0.9; }

/* ===== HOST FINAL ===== */
#hostFinal {
  background: linear-gradient(135deg, var(--sand) 0%, var(--white) 40%, var(--coral-pale) 100%);
  position: relative;
  overflow: hidden;
}

.hf-confetti {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  top: -20px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.host-final-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 50px 40px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hf-header-block {
  margin-bottom: 40px;
}

.hf-icon {
  font-size: 4rem;
  color: var(--coral);
  animation: bingoPopIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-bottom: 8px;
}

.hf-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  color: var(--coral);
  margin-bottom: 8px;
  animation: fadeSlideUp 0.6s ease-out 0.3s both;
}

.hf-subtitle {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-soft);
  animation: fadeSlideUp 0.6s ease-out 0.5s both;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hf-players-section {
  margin-bottom: 32px;
  text-align: left;
}

.hf-players-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--coral-pale);
}

.hf-players-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hf-player-chip {
  background: var(--sand);
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hf-player-chip:hover {
  background: var(--coral-pale);
  transform: translateY(-1px);
}

.hf-player-chip.has-bingo {
  background: linear-gradient(135deg, var(--coral-pale), var(--sun-pale));
  border: 1px solid var(--coral-soft);
}

.hf-chip-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
}

.hf-chip-country {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.hf-closing {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 400px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hf-curiosities-section {
  margin-bottom: 32px;
  text-align: left;
}

.hf-curiosities-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--coral-pale);
  text-align: left;
}

.hf-curiosity {
  background: var(--white);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
  border-left: 3px solid var(--coral);
  text-align: left;
}

.hf-curiosity-prompt {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.hf-curiosity-people {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.hf-stats-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 40px;
}

.hf-stat-box {
  text-align: center;
}

.hf-stat-num {
  font-size: 3rem;
  font-weight: 800;
  color: var(--ink);
  animation: fadeSlideUp 0.6s ease-out 0.7s both;
}

.hf-stat-label {
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hf-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
  text-align: left;
}

.hf-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--coral-pale);
}

.hf-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--sand);
  border-radius: 10px;
  margin-bottom: 8px;
}

.hf-list-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--coral);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.hf-list-item:nth-child(2) .hf-list-rank { background: var(--ocean); }
.hf-list-item:nth-child(3) .hf-list-rank { background: var(--sage); }
.hf-list-item:nth-child(n+4) .hf-list-rank { background: var(--ink-muted); }

.hf-list-name { font-weight: 600; flex: 1; }
.hf-list-detail { font-size: 0.8rem; color: var(--ink-muted); }

/* ===== HOST PLAYER DETAIL MODAL ===== */
.modal-wide {
  max-width: 600px;
}

.pd-header {
  margin-bottom: 16px;
  padding-right: 24px;
}

.pd-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--ink);
}

.pd-country {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.pd-grid {
  display: grid;
  gap: 6px;
}

.pd-cell {
  background: var(--sand);
  border: 1.5px solid var(--sand-warm);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}

.pd-cell.pd-marked {
  background: var(--coral-pale);
  border-color: var(--coral-soft);
}

.pd-prompt {
  font-size: 0.7rem;
  line-height: 1.3;
  color: var(--ink-soft);
  font-weight: 500;
}

.pd-marked .pd-prompt {
  color: var(--coral);
  font-weight: 600;
}

.pd-match {
  font-size: 0.65rem;
  color: var(--coral);
  font-weight: 700;
  margin-top: 4px;
  opacity: 0.85;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hl-code { font-size: 3rem; letter-spacing: 8px; }
  .ha-stats { gap: 20px; }
  .ha-stat-num { font-size: 1.8rem; }
  .hf-sections { grid-template-columns: 1fr; }
  .hf-stats-row { gap: 24px; }
  .hf-stat-num { font-size: 2rem; }
}
