/* Name That Car — scoped to .ucg-game so it doesn't fight the theme. */
.ucg-game {
  --ucg-bg: #15171a;
  --ucg-panel: #1f2226;
  --ucg-line: #33373d;
  --ucg-text: #f2f2f0;
  --ucg-dim: #a3a7ad;
  --ucg-accent: #f5b301;
  --ucg-accent-ink: #1a1400;
  --ucg-good: #3ecf6e;
  --ucg-mid: #f0a020;
  --ucg-bad: #ef5350;
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: 16px;
  background: var(--ucg-bg);
  color: var(--ucg-text);
  border-radius: 14px;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.ucg-game *, .ucg-game *::before, .ucg-game *::after { box-sizing: border-box; }
.ucg-game button { font: inherit; cursor: pointer; }
.ucg-game img { max-width: 100%; }
.ucg-game p { margin: 8px 0; }

.ucg-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 14px; }
.ucg-logo { background: none; border: 0; padding: 0; color: var(--ucg-text); }
.ucg-logo-mark { font-weight: 900; font-size: 26px; letter-spacing: -0.5px; text-transform: uppercase; font-style: italic; }
.ucg-logo-mark::after { content: ""; display: block; height: 4px; width: 60%; background: var(--ucg-accent); border-radius: 2px; margin-top: 2px; }
.ucg-sub { color: var(--ucg-dim); font-size: 14px; }

.ucg-home { display: grid; gap: 12px; }
@media (min-width: 640px) { .ucg-home { grid-template-columns: repeat(3, 1fr); } }
.ucg-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; min-height: 120px;
  padding: 18px; background: var(--ucg-panel); border: 1px solid var(--ucg-line); border-radius: 12px; color: var(--ucg-text); }
.ucg-tile strong { font-size: 22px; }
.ucg-tile span { color: var(--ucg-dim); font-size: 14px; }
.ucg-tile:hover, .ucg-tile:focus-visible { border-color: var(--ucg-accent); outline: none; }

.ucg-label { display: block; margin: 16px 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ucg-dim); }
.ucg-input { width: 100%; padding: 12px 14px; font-size: 17px; color: var(--ucg-text); background: #0f1113; border: 1px solid var(--ucg-line); border-radius: 10px; }
.ucg-input:focus { outline: 2px solid var(--ucg-accent); outline-offset: 1px; border-color: transparent; }
.ucg-code-input { text-transform: uppercase; letter-spacing: 0.3em; font-size: 28px; font-weight: 800; max-width: 220px; text-align: center; }

.ucg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ucg-chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--ucg-line); background: var(--ucg-panel); color: var(--ucg-text); }
.ucg-chip small { color: var(--ucg-dim); }
.ucg-chip.is-on { background: var(--ucg-accent); color: var(--ucg-accent-ink); border-color: var(--ucg-accent); }
.ucg-chip.is-on small { color: var(--ucg-accent-ink); }

.ucg-levels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 640px) { .ucg-levels { grid-template-columns: repeat(4, 1fr); } }
.ucg-level { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px; border-radius: 10px; border: 1px solid var(--ucg-line); background: var(--ucg-panel); color: var(--ucg-text); }
.ucg-level span { font-size: 13px; color: var(--ucg-dim); }
.ucg-level.is-on { border-color: var(--ucg-accent); box-shadow: inset 0 0 0 1px var(--ucg-accent); }
.ucg-level-ultra strong { color: var(--ucg-bad); }

.ucg-seg { display: inline-flex; border: 1px solid var(--ucg-line); border-radius: 10px; overflow: hidden; }
.ucg-seg button { padding: 10px 16px; background: var(--ucg-panel); color: var(--ucg-text); border: 0; border-right: 1px solid var(--ucg-line); }
.ucg-seg button:last-child { border-right: 0; }
.ucg-seg button.is-on { background: var(--ucg-accent); color: var(--ucg-accent-ink); font-weight: 700; }
.ucg-check { display: flex; gap: 8px; align-items: center; margin-top: 14px; color: var(--ucg-dim); font-size: 14px; }

.ucg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 18px; border-radius: 10px; border: 0;
  background: var(--ucg-accent); color: var(--ucg-accent-ink); font-weight: 800; }
.ucg-btn:disabled { opacity: 0.5; cursor: default; }
.ucg-btn-big { width: 100%; margin-top: 18px; padding: 16px; font-size: 19px; }
.ucg-btn-small { padding: 8px 12px; font-size: 14px; }
.ucg-btn-ghost { background: transparent; color: var(--ucg-text); border: 1px solid var(--ucg-line); }
.ucg-link { display: block; margin: 18px auto 0; background: none; border: 0; color: var(--ucg-dim); text-decoration: underline; font-size: 14px; }
.ucg-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ucg-row .ucg-btn { flex: 1 1 200px; margin-top: 0; }

.ucg-progress { color: var(--ucg-dim); font-size: 14px; margin-bottom: 8px; }
.ucg-photo { position: relative; aspect-ratio: 16 / 10; max-height: 62vh; margin: 0 auto; background: #000; border-radius: 12px; overflow: hidden; user-select: none; -webkit-user-select: none; }
.ucg-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; }

.ucg-timer { position: relative; height: 26px; margin: 10px 0; background: #0f1113; border-radius: 999px; overflow: hidden; }
.ucg-timer-fill { height: 100%; background: var(--ucg-accent); transition: width 0.1s linear; }
.ucg-timer.is-low .ucg-timer-fill { background: var(--ucg-bad); }
.ucg-timer-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #fff; text-shadow: 0 1px 2px #000; }

.ucg-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ucg-choice { min-height: 58px; padding: 10px; border-radius: 10px; border: 1px solid var(--ucg-line); background: var(--ucg-panel); color: var(--ucg-text); font-weight: 700; }
.ucg-choice:hover:not(:disabled) { border-color: var(--ucg-accent); }
.ucg-choice.is-picked { background: var(--ucg-accent); color: var(--ucg-accent-ink); }
.ucg-answer.is-locked .ucg-choice:not(.is-picked) { opacity: 0.45; }

.ucg-guess-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ucg-guess-wrap { position: relative; flex: 1 1 260px; }
.ucg-year { flex: 0 0 96px; text-align: center; }
.ucg-guess-row .ucg-btn { flex: 1 0 100%; }
@media (min-width: 640px) { .ucg-guess-row .ucg-btn { flex: 0 0 auto; } }
.ucg-suggest { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 0; list-style: none; background: #0f1113; border: 1px solid var(--ucg-line); border-radius: 10px; overflow: hidden; }
.ucg-suggest:empty { display: none; }
.ucg-suggest li { padding: 10px 14px; cursor: pointer; }
.ucg-suggest li:hover, .ucg-suggest li.is-hi { background: var(--ucg-panel); color: var(--ucg-accent); }

.ucg-banner { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 10px; margin-bottom: 10px; font-size: 20px; }
.ucg-banner.is-full { background: rgba(62, 207, 110, 0.16); color: var(--ucg-good); }
.ucg-banner.is-make { background: rgba(240, 160, 32, 0.16); color: var(--ucg-mid); }
.ucg-banner.is-wrong { background: rgba(239, 83, 80, 0.16); color: var(--ucg-bad); }
.ucg-banner span { font-weight: 900; }
.ucg-answer-label { margin-top: 10px; font-size: 24px; font-weight: 900; }
.ucg-years { color: var(--ucg-accent); }
.ucg-credit { margin-top: 4px; font-size: 12px; color: var(--ucg-dim); }
.ucg-credit a { color: var(--ucg-dim); }

.ucg-card { padding: 18px; background: var(--ucg-panel); border: 1px solid var(--ucg-line); border-radius: 12px; text-align: center; }
.ucg-meta { color: var(--ucg-dim); font-size: 14px; }
.ucg-big { font-size: 24px; font-weight: 900; }
.ucg-huge { font-size: 48px; font-weight: 900; color: var(--ucg-accent); line-height: 1.1; margin: 4px 0; }
.ucg-room-code { font-size: 64px; font-weight: 900; letter-spacing: 0.15em; color: var(--ucg-accent); line-height: 1.1; margin: 4px 0 8px; }
.ucg-copy { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ucg-copy-input { flex: 1 1 220px; padding: 8px 10px; font-size: 14px; color: var(--ucg-dim); background: #0f1113; border: 1px solid var(--ucg-line); border-radius: 8px; }
.ucg-wait { text-align: center; color: var(--ucg-dim); margin-top: 16px; }

.ucg-standings { list-style: none; margin: 0; padding: 0; }
.ucg-standings li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--ucg-line); }
.ucg-standings li.is-me { background: rgba(245, 179, 1, 0.08); }
.ucg-standings li.is-first .ucg-rank { background: var(--ucg-accent); color: var(--ucg-accent-ink); }
.ucg-standings-big li { font-size: 20px; padding: 14px 12px; }
.ucg-rank { flex: 0 0 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--ucg-panel); font-weight: 800; font-size: 14px; }
.ucg-name { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ucg-score { font-weight: 900; font-variant-numeric: tabular-nums; }
.ucg-tick { color: var(--ucg-good); }
.ucg-empty { color: var(--ucg-dim); justify-content: center; }

.ucg-answered { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ucg-pchip { padding: 4px 10px; border-radius: 999px; font-size: 13px; background: var(--ucg-panel); color: var(--ucg-dim); border: 1px solid var(--ucg-line); }
.ucg-pchip.is-in { color: var(--ucg-good); border-color: var(--ucg-good); }
.ucg-pchip.is-in::before { content: "✓ "; }

.ucg-results { list-style: none; margin: 0; padding: 0; }
.ucg-results li { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-bottom: 1px solid var(--ucg-line); }
.ucg-results .ucg-name { flex: 0 1 auto; max-width: 42%; }
.ucg-guessed { flex: 1 1 0; min-width: 0; color: var(--ucg-dim); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ucg-results li.r-full .ucg-score { color: var(--ucg-good); }
.ucg-results li.r-make .ucg-score { color: var(--ucg-mid); }
.ucg-results li.r-wrong .ucg-score, .ucg-results li.r-none .ucg-score, .ucg-results li.r-timeout .ucg-score { color: var(--ucg-bad); }

.ucg-game:fullscreen { max-width: none; width: 100vw; height: 100vh; overflow: auto; border-radius: 0; padding: 24px max(24px, 6vw); }
.ucg-game:fullscreen .ucg-photo { max-height: 58vh; }
.ucg-host-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding: 10px 12px; border: 1px dashed var(--ucg-line); border-radius: 10px; }
.ucg-host-tag { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ucg-accent); }
.ucg-last { margin-top: 16px; }
.ucg-last summary { cursor: pointer; color: var(--ucg-dim); }

.ucg-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 99999; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 10px; background: #000; color: #fff; border: 1px solid var(--ucg-accent); font-size: 15px; }
.ucg-row-tight { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
