/* CrunchyFlix Daily.
 *
 * Loaded after /panel.css and adds only what the game needs - the palette,
 * masthead, nav, footer and .notice come from there, so the game reads as the
 * same site and a token change lands in both places at once. */

/* ---------------------------------------------------------------- tracks */

.tracks { display: flex; gap: 8px; margin: 8px 0 22px; }

.tracks__tab {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-dim);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  font-family: inherit;
}
.tracks__tab:hover { color: var(--ink); }
.tracks__tab--on {
  background: var(--panel-2);
  border-color: color-mix(in srgb, var(--amber) 50%, transparent);
  color: var(--amber);
}
.tracks__tab:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ------------------------------------------------------------------ game */

.game { max-width: 640px; margin: 0 auto; }

.game__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.game__title { font-size: 20px; font-weight: 650; margin: 0; letter-spacing: -0.01em; }
.game__num { color: var(--ink-dim); font-size: 13px; font-variant-numeric: tabular-nums; }

/* Every reveal renders to the same 960x540 box server-side, so this frame never
   resizes as the picture opens. A jumping layout would be miserable to play,
   and style-src 'self' leaves no inline style to patch it with. */
.reveal {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-2);
  aspect-ratio: 16 / 9;
}
.reveal__img { width: 100%; height: 100%; object-fit: cover; }

.reveal__bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(0,0,0,.55);
}
.reveal__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--amber);
  transition: width .35s ease;
}

/* ----------------------------------------------------------------- hints */

.hints { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }

.hints__row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  font-size: 14px;
}
.hints__kind {
  color: var(--ink-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  min-width: 62px;
}

/* ----------------------------------------------------------------- guess */

.guess { position: relative; margin-top: 18px; }
.guess__label { display: block; font-size: 12px; color: var(--ink-dim); margin-bottom: 6px; }

.guess__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}
.guess__input:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-color: transparent;
}
.guess__input:disabled { opacity: .5; }

.guess__count {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.suggest {
  position: absolute;
  z-index: 5;
  left: 0; right: 0;
  margin: 6px 0 0;
  padding: 4px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
  max-height: 280px;
  overflow-y: auto;
}

.suggest__row {
  padding: 9px 11px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.suggest__row:hover,
.suggest__row--on { background: var(--panel); color: var(--amber); }
.suggest__year { color: var(--ink-dim); font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------------- tries */

.tries { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 6px; }

.tries__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 8px;
  background: var(--panel);
  font-size: 14px;
}
.tries__row--miss { border-left-color: var(--red); }
.tries__row--hit  { border-left-color: var(--green); }
.tries__seq { color: var(--ink-dim); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- result */

.result {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
}
.result__line { margin: 0 0 6px; font-size: 17px; font-weight: 650; }
.result__line--win  { color: var(--green); }
.result__line--lose { color: var(--red); }
.result__answer { margin: 0; font-size: 15px; }
.result__streak { margin: 10px 0 0; font-size: 13px; color: var(--ink-dim); }

/* ----------------------------------------------------------------- board */

.board { margin-top: 26px; }
.board__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 10px;
}
.board__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

.board__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.board__score { color: var(--green); font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
  .hints__kind { min-width: 52px; }
  .game__head { flex-direction: column; align-items: flex-start; gap: 2px; }
}
