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


/**
 * =============================================================================
 * ===== FILE: styles.css — SELURUH GAYA UI ANT RACE =====
 * =============================================================================
 * Bagian utama (cari komentar section di bawah):
 *   1) CSS variables (tema dark/light)
 *   2) Reset + layout #app
 *   3) Menu (brand, panel, kartu peserta)
 *   4) Race HUD + countdown
 *   5) Results / podium
 *   6) Toast, boot splash
 *   7) Responsive mobile
 * =============================================================================
 */

/* ----- 1) Theme tokens ----- */
:root {
  --bg-deep: #0f1a12;
  --bg-mid: #1a2e1f;
  --bg-card: rgba(255, 255, 255, 0.08);
  --bg-card-solid: #1e3326;
  --border: rgba(255, 255, 255, 0.14);
  --text: #f4f7f2;
  --text-muted: #a8c0ae;
  --accent: #ff8c42;
  --accent-2: #ffd166;
  --accent-3: #06d6a0;
  --danger: #ef476f;
  --info: #4cc9f0;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --glass: blur(18px) saturate(140%);
  --font: 'Nunito', system-ui, sans-serif;
  --display: 'Fredoka', 'Nunito', sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme='light'] {
  --bg-deep: #e8f5e9;
  --bg-mid: #c8e6c9;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-card-solid: #ffffff;
  --border: rgba(20, 60, 30, 0.12);
  --text: #1b2e1f;
  --text-muted: #4a6b52;
  --shadow: 0 12px 40px rgba(30, 80, 40, 0.12);
}

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

html,
body {
  width: 100%;
  min-height: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto; /* izinkan scroll vertikal jika konten lebih tinggi dari layar */
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

/* Saat balapan: kunci scroll halaman agar canvas penuh */
body.page-lock {
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
}

button,
input,
select {
  font-family: inherit;
}

#app {
  position: relative;
  width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  height: auto;
  overflow: visible; /* konten menu/hasil boleh melebihi 1 layar */
}

body.page-lock #app {
  height: 100%;
  min-height: 100%;
  min-height: 100dvh;
  overflow: hidden;
}

/* ===== Background gradient ===== */
.ambient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(255, 140, 66, 0.18), transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(6, 214, 160, 0.12), transparent 50%),
    linear-gradient(160deg, var(--bg-deep), var(--bg-mid));
  z-index: 0;
  pointer-events: none;
}

/* ===== Screens ===== */
.screen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
}

/* ===== Menu ===== */
/* Menu aktif: alur dokumen + scroll — tidak terpotong di HP */
#menu-screen {
  padding: 16px;
  padding-bottom: calc(24px + var(--safe-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#menu-screen.active {
  position: relative;
  inset: auto;
  width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  height: auto;
  overflow: visible;
}

.menu-shell {
  width: min(1100px, 100%);
  min-height: min(100%, 100dvh);
  height: auto;
  margin: 0 auto;
  display: grid;
  /* brand | panel | footer — layout rows */
  grid-template-rows: auto;
  gap: 14px;
  padding-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(145deg, #ff8c42, #c45c26);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(255, 140, 66, 0.35);
  font-size: 28px;
  animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.brand h1 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--accent-2), var(--accent), #ff6b6b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}

.brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  transition: transform 0.15s, background 0.15s;
}

.icon-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
}

.icon-btn:active {
  transform: scale(0.96);
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: var(--glass);
  box-shadow: var(--shadow);
  overflow: visible;
  min-height: 0;
  display: flex;
  flex-direction: column;
  /* Panel peserta memanjang mengikuti isi — scroll di halaman, bukan kotak kecil */
  flex: 0 0 auto;
}

.panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.panel-header h2 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 700;
}

[data-theme='light'] .chip {
  background: rgba(255, 255, 255, 0.65);
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stepper button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  font-size: 1rem;
}

.stepper button:hover {
  background: rgba(255, 140, 66, 0.25);
}

.stepper span {
  min-width: 36px;
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

select.mode-select {
  appearance: none;
  padding: 8px 32px 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a8c0ae' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

[data-theme='light'] select.mode-select {
  background-color: rgba(255, 255, 255, 0.8);
}

.btn {
  border: none;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-secondary {
  background: linear-gradient(135deg, rgba(76, 201, 240, 0.25), rgba(6, 214, 160, 0.25));
  color: var(--text);
  border: 1px solid rgba(76, 201, 240, 0.35);
}

.btn-primary {
  background: linear-gradient(135deg, #ff8c42, #ff6b35);
  color: #1a0f0a;
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 28px rgba(255, 107, 53, 0.45);
}

.btn-danger {
  background: rgba(239, 71, 111, 0.18);
  color: #ff8fab;
  border: 1px solid rgba(239, 71, 111, 0.35);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: 16px;
}

.ant-list-wrap {
  flex: 0 0 auto;
  min-height: 0;
  /* Daftar peserta tampil penuh; halaman yang di-scroll */
  overflow: visible;
  max-height: none;
  padding: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 140, 66, 0.5) transparent;
}

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

.ant-card {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.15s;
  min-height: 92px;
}

[data-theme='light'] .ant-card {
  background: rgba(255, 255, 255, 0.55);
}

.ant-card:hover {
  border-color: rgba(255, 140, 66, 0.45);
  transform: translateY(-1px);
}

.ant-preview {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  background: linear-gradient(160deg, #3d2914, #2a1a0c);
  display: grid;
  place-items: center;
  overflow: visible;
  position: relative;
  flex-shrink: 0;
}

[data-theme='light'] .ant-preview {
  background: linear-gradient(160deg, #d7b899, #c4a574);
}

.ant-preview canvas {
  width: 72px;
  height: 72px;
  display: block;
}

.ant-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ant-meta input {
  width: 100%;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 10px;
  padding: 7px 10px;
  font-weight: 800;
  font-size: 0.95rem;
  outline: none;
}

.ant-meta input:focus {
  border-color: var(--accent);
  background: rgba(255, 140, 66, 0.1);
}

.ant-skin-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ant-card-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mini-btn {
  width: 36px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
}

.mini-btn:hover {
  background: rgba(255, 140, 66, 0.22);
}

.mini-btn-danger {
  border-color: rgba(239, 71, 111, 0.35);
  background: rgba(239, 71, 111, 0.12);
}

.mini-btn-danger:hover:not(:disabled) {
  background: rgba(239, 71, 111, 0.32);
  border-color: rgba(239, 71, 111, 0.55);
}

.mini-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px;
}

.footer-left,
.footer-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mode-hint {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  max-width: 420px;
}

/* ===== Race Screen ===== */
#race-screen {
  z-index: 5;
  overflow: hidden;
}

/* Race selalu fullscreen fixed agar tidak ikut scroll halaman */
#race-screen.active {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #2d4a1e;
}

.hud {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  padding-bottom: calc(12px + var(--safe-bottom));
}

.hud-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.hud-card {
  pointer-events: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
}

.hud-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
}

.hud-sub {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 2px;
}

.leaderboard-mini {
  min-width: 160px;
  max-width: 220px;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 0;
}

.lb-pos {
  width: 18px;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.lb-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hud-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.progress-wrap {
  flex: 1;
  min-width: 180px;
  max-width: 420px;
}

.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-3), var(--accent-2), var(--accent));
  transition: width 0.12s linear;
}

.hud-actions {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

/* Countdown */
.countdown-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.countdown-overlay.show {
  opacity: 1;
}

.countdown-text {
  font-family: var(--display);
  font-size: clamp(4rem, 18vw, 9rem);
  font-weight: 700;
  color: #fff;
  text-shadow:
    0 0 40px rgba(255, 140, 66, 0.8),
    0 8px 0 rgba(0, 0, 0, 0.25);
  transform: scale(0.5);
  opacity: 0;
}

/* Round banner */
.round-banner {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 25;
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass);
  padding: 12px 24px;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--shadow);
  white-space: nowrap;
}

/* ===== Results ===== */
#results-screen {
  z-index: 40;
  align-items: center;
  justify-content: flex-start;
  padding: 16px;
  padding-bottom: calc(24px + var(--safe-bottom));
  background: rgba(8, 14, 10, 0.55);
  backdrop-filter: blur(8px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#results-screen.active {
  position: relative;
  inset: auto;
  width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  height: auto;
  overflow: visible;
}

.results-card {
  width: min(640px, 100%);
  max-height: none; /* biar seluruh ranking + tombol terlihat (scroll halaman) */
  margin: 12px auto 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  backdrop-filter: var(--glass);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.results-header {
  text-align: center;
  padding: 22px 18px 10px;
  position: relative;
}

.results-header .trophy {
  font-size: 3rem;
  filter: drop-shadow(0 8px 16px rgba(255, 209, 102, 0.45));
  animation: trophy-pop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes trophy-pop {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

.results-header h2 {
  font-family: var(--display);
  font-size: 1.8rem;
  margin-top: 6px;
}

.results-header p {
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 4px;
}

.podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 10px;
  padding: 8px 18px 16px;
  align-items: end;
}

.podium-slot {
  text-align: center;
  padding: 14px 8px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.podium-slot.first {
  min-height: 150px;
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.28), rgba(0, 0, 0, 0.15));
  border-color: rgba(255, 209, 102, 0.45);
}

.podium-slot.second {
  background: linear-gradient(180deg, rgba(192, 192, 192, 0.22), rgba(0, 0, 0, 0.15));
}

.podium-slot.third {
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.22), rgba(0, 0, 0, 0.15));
}

.podium-place {
  font-size: 1.4rem;
  font-weight: 900;
}

.podium-name {
  font-weight: 800;
  font-size: 0.95rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
}

.podium-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  margin-bottom: 4px;
}

.full-rankings {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible; /* ranking penuh, scroll di halaman */
  max-height: none;
  padding: 0 14px 10px;
  scrollbar-width: thin;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
}

.rank-table th {
  text-align: left;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 8px;
  position: sticky;
  top: 0;
  background: rgba(15, 26, 18, 0.92);
  backdrop-filter: blur(8px);
}

[data-theme='light'] .rank-table th {
  background: rgba(255, 255, 255, 0.92);
}

.rank-table td {
  padding: 8px;
  border-top: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
}

.rank-table tr:nth-child(-n+3) td {
  color: var(--accent-2);
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 14px 18px 20px;
  border-top: 1px solid var(--border);
}

/* Confetti canvas */
#fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 100;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 800;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s;
  max-width: min(90vw, 360px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Loading */
#boot {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bg-deep);
  transition: opacity 0.4s;
}

#boot.hide {
  opacity: 0;
  pointer-events: none;
}

.boot-inner {
  text-align: center;
}

.boot-ant {
  font-size: 3.5rem;
  animation: bob 1s ease-in-out infinite;
}

.boot-inner h2 {
  font-family: var(--display);
  margin-top: 8px;
}

.boot-bar {
  width: 160px;
  height: 6px;
  margin: 14px auto 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.boot-bar span {
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: inherit;
  animation: load 1s ease-in-out infinite;
}

@keyframes load {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* Responsive */
@media (max-width: 720px) {
  #menu-screen {
    padding: 10px;
  }

  .menu-shell {
    gap: 10px;
  }

  .panel-header {
    padding: 12px;
  }

  .ant-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Larger participant cards on phone — full ant clearly visible */
  .ant-card {
    grid-template-columns: 96px 1fr;
    grid-template-rows: auto auto;
    gap: 10px 12px;
    padding: 14px;
    min-height: 118px;
  }

  .ant-preview {
    width: 96px;
    height: 96px;
    border-radius: 18px;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .ant-preview canvas {
    width: 90px;
    height: 90px;
  }

  .ant-meta {
    grid-column: 2;
    grid-row: 1;
  }

  .ant-meta input {
    font-size: 1.05rem;
    padding: 10px 12px;
  }

  .ant-skin-label {
    font-size: 0.85rem;
  }

  .ant-card-actions {
    grid-column: 2;
    grid-row: 2;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .mini-btn {
    width: 42px;
    height: 38px;
    font-size: 1.05rem;
    border-radius: 10px;
  }

  .footer-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-left,
  .footer-right {
    justify-content: stretch;
  }

  .footer-right .btn,
  .footer-left .btn {
    flex: 1;
  }

  .btn-lg {
    width: 100%;
  }

  .mode-hint {
    display: none;
  }

  .hud-card {
    padding: 8px 10px;
  }

  .leaderboard-mini {
    min-width: 130px;
    max-width: 150px;
  }

  .podium-name {
    font-size: 0.8rem;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .brand h1 {
    font-size: 1.3rem;
  }

  .logo-mark {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
}

/* =============================================================================
   SEO LANDING (antrace.zcore.id) — konten semantik di bawah #app
   Disembunyikan saat mode main / race fullscreen
   ============================================================================= */

.seo-landing,
.seo-main,
.seo-footer,
.seo-noscript {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 20px 16px;
  color: var(--text);
  user-select: text;
  -webkit-user-select: text;
}

.seo-landing {
  padding-top: 36px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), transparent);
}

.seo-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.seo-landing h1,
.seo-main h2,
.seo-main h3 {
  font-family: var(--display);
  line-height: 1.2;
  margin: 0 0 12px;
}

.seo-landing h1 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  background: linear-gradient(120deg, var(--accent-2), var(--accent), #ff6b6b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.seo-lead {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 18px;
}

.seo-main p,
.seo-main li {
  line-height: 1.65;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}

.seo-main article,
.seo-main section {
  margin-bottom: 28px;
}

.seo-main ul,
.seo-main ol {
  padding-left: 1.25rem;
  margin-bottom: 12px;
}

.seo-main a,
.seo-footer a {
  color: var(--accent);
  font-weight: 800;
}

.seo-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff8c42, #ff6b35);
  color: #1a0f0a !important;
  font-weight: 900;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.35);
}

.seo-play-btn:hover {
  filter: brightness(1.06);
}

.seo-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 18px;
}

.seo-nav a {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-card);
}

.seo-nav a:hover {
  color: var(--text);
  border-color: rgba(255, 140, 66, 0.45);
}

.seo-footer {
  text-align: center;
  padding-bottom: calc(28px + var(--safe-bottom));
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 700;
}

/* Sembunyikan blok SEO saat user main / race fullscreen */
html.seo-play-mode .seo-landing,
html.seo-play-mode .seo-main,
html.seo-play-mode .seo-footer,
body.page-lock .seo-landing,
body.page-lock .seo-main,
body.page-lock .seo-footer {
  display: none !important;
}

html.seo-play-mode,
html.seo-play-mode body,
body.page-lock {
  overflow: hidden;
  height: 100%;
}

html.seo-play-mode #app,
body.page-lock #app {
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
}
