:root {
  --bg: #0f1115;
  --panel: #171a21;
  --border: #2a2e38;
  --text: #e8e9ec;
  --muted: #9aa0ab;
  --accent: #5b8cff;
  --yes: #3ddc84;
  --no: #ff6b6b;
  --sometimes: #ffc857;
  --unknown: #9aa0ab;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

h1 {
  margin: 0 0 0.4rem;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* A static (non-animated) version of .spinner-a, sized to sit inline with
   the h1 text in place of a literal "A". Centered via h1's flex layout
   rather than vertical-align, since vertical-align has no effect here. */
.title-a-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: #06260f;
  background: radial-gradient(circle at 32% 28%, #8af0a0, #1fae4c 60%, #137a35 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.5),
    inset 0 -4px 6px rgba(0, 0, 0, 0.35),
    4px 5px 10px rgba(0, 0, 0, 0.5);
}

.subtitle {
  color: var(--muted);
  margin: 0;
}

.search-box input {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 1.05rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}

.search-box input:focus {
  outline: 2px solid var(--accent);
}

.results {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.results li {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: border-color 0.15s;
}

.results li:hover {
  border-color: var(--accent);
}

.result-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.result-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results li .released {
  color: var(--muted);
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-left: 0.75rem;
}

.cover-thumb {
  width: 64px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #0b0d11;
}

.cover-thumb-placeholder {
  display: block;
}

.verdict-panel {
  margin-top: 1.5rem;
  perspective: 900px;
}

#verdict-content {
  transform-style: preserve-3d;
}

.reveal-line {
  opacity: 0;
  transition: opacity 0.28s ease-out;
}

.reveal-line.visible {
  opacity: 1;
}

.back-button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0;
  margin-bottom: 1rem;
  text-decoration: none;
  display: inline-block;
}

.verdict-header {
  position: relative;
  margin-bottom: 1rem;
}

.cover-hero {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  border: 1px solid var(--border);
}

.year-badge {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  background: rgba(15, 17, 21, 0.85);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

#verdict-game-name {
  margin: 0 0 1rem;
}

/* v1: the one thing the result card shows, besides the image/name. */
.verdict-answer {
  display: block;
  text-align: center;
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 1.5rem 0;
}

.verdict-answer.yes {
  color: var(--yes);
}
.verdict-answer.no {
  color: var(--no);
}
.verdict-answer.unknown {
  color: var(--unknown);
}

.loading,
.error {
  color: var(--muted);
  padding: 1rem 0;
}

.loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0 1rem;
}

.spinner-wrap {
  --press-duration: 1.1s;
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.spinner-a {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: #06260f;
  background: radial-gradient(circle at 32% 28%, #8af0a0, #1fae4c 60%, #137a35 100%);
  animation: press-a var(--press-duration) ease-in-out infinite;
}

/* Resting: a punchy, directional drop shadow (down-right) implies a light
   source and makes the button read as floating above the surface. Pressed:
   the button moves down 2px and shrinks slightly (scale 0.98), and the
   shadow's vertical offset shortens by that same 2px (8px -> 6px) — same
   color/blur, just shorter, since the button is now that much closer to
   the surface. The bevel (inset highlight/lowlight) stays constant throughout. */
@keyframes press-a {
  0%,
  40% {
    transform: translateY(0) scale(1);
    box-shadow:
      inset 0 2px 3px rgba(255, 255, 255, 0.5),
      inset 0 -4px 6px rgba(0, 0, 0, 0.35),
      6px 8px 14px rgba(0, 0, 0, 0.55);
  }
  50% {
    /* the "hit" moment */
    transform: translateY(2px) scale(0.98);
    box-shadow:
      inset 0 2px 3px rgba(255, 255, 255, 0.5),
      inset 0 -4px 6px rgba(0, 0, 0, 0.35),
      6px 6px 14px rgba(0, 0, 0, 0.55);
  }
  60%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow:
      inset 0 2px 3px rgba(255, 255, 255, 0.5),
      inset 0 -4px 6px rgba(0, 0, 0, 0.35),
      6px 8px 14px rgba(0, 0, 0, 0.55);
  }
}

.progress-message {
  color: var(--muted);
  min-height: 1.3em;
  margin: 0 0 1rem;
  text-align: center;
}

.progress-track {
  width: 100%;
  max-width: 320px;
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition-property: width;
  transition-timing-function: linear;
}
