/* Same design language as list.iscor.me — tokens, bento grid, uppercase meta */
:root {
  --bg: #f0f0e8;
  --bg-card: #f0f0e8;
  --black: #111111;
  --white: #ffffff;
  --green: #b9ff66;
  --green-dark: #9de049;
  --border: #d0d0c8;
  --text: #111111;
  --text-muted: #777770;
  --overlay-light: rgba(0, 0, 0, 0.05);
  --overlay-lighter: rgba(0, 0, 0, 0.04);

  --status-done: #1a8f6e;
  --status-todo: #c4a035;
  --status-partial: #2d7abf;

  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  line-height: 1.4;
  color: var(--text);
  background-color: var(--bg);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e14;
    --bg-card: #13131c;
    --black: #f0f0f0;
    --white: #1a1a26;
    --border: #2a2a3a;
    --text: #e4e4ec;
    --text-muted: #7a7a90;
    --overlay-light: rgba(255, 255, 255, 0.06);
    --overlay-lighter: rgba(255, 255, 255, 0.04);

    --status-done: #34d399;
    --status-todo: #fbbf24;
    --status-partial: #60a5fa;
  }
}

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

body {
  min-height: 100vh;
  background: var(--bg);
}

#app {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

/* ─── Top nav ─── */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
}

.topnav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.topnav-logo::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 30%, transparent);
}

.topnav-stats {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.topnav-stat {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.topnav-stat strong {
  color: var(--text);
  font-weight: 700;
}

/* ─── Hero ─── */
.hero {
  padding: 3rem 2rem 2rem;
  border-bottom: 1px solid var(--border);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.hero-title .highlight {
  color: var(--green-dark);
}

.hero-sub {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─── Results bar ─── */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.5rem 2rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

/* ─── Bento grid ─── */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-left: 1px solid var(--border);
}

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

.card {
  --cat-color: var(--text-muted);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--cat-color) 5%, var(--bg-card));
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: background 0.2s;
  animation: card-in 0.3s ease both;
}

/* Big faint icon in the corner, like the list cards */
.card::after {
  content: attr(data-icon);
  position: absolute;
  right: -0.15rem;
  bottom: -0.4rem;
  font-size: 5rem;
  line-height: 1;
  opacity: 0.07;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  transform: rotate(-12deg);
}

/* Status stripe */
.card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  z-index: 1;
}

.card.status-done::before { background: var(--status-done); }
.card.status-todo::before { background: var(--status-todo); }
.card.status-partial::before { background: var(--status-partial); }

a.card:hover {
  background: color-mix(in srgb, var(--cat-color) 10%, var(--bg-card));
}

a.card:hover::after {
  opacity: 0.12;
  transform: rotate(-8deg) scale(1.05);
}

a.card:focus-visible {
  outline: 2px solid var(--green-dark);
  outline-offset: -2px;
}

.card-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--overlay-light);
}

.card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

a.card:hover .card-cover img {
  transform: scale(1.03);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
  padding: 1.25rem 1.4rem;
  padding-left: calc(1.4rem + 4px);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-id {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.card-badge.done { background: color-mix(in srgb, var(--status-done) 15%, transparent); color: var(--status-done); }
.card-badge.todo { background: color-mix(in srgb, var(--status-todo) 15%, transparent); color: var(--status-todo); }
.card-badge.partial { background: color-mix(in srgb, var(--status-partial) 15%, transparent); color: var(--status-partial); }

.card-title {
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.02em;
}

.card-text {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  max-width: 60ch;
}

.card-bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.4rem;
}

.card-cat,
.card-tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.card-cat {
  background: color-mix(in srgb, var(--cat-color) 14%, transparent);
  color: color-mix(in srgb, var(--cat-color) 55%, var(--text));
}

.card-tag {
  background: var(--overlay-light);
  color: var(--text-muted);
}

.card-play {
  margin-left: auto;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.2s, color 0.2s;
  position: relative;
  z-index: 1;
}

a.card:hover .card-play {
  background: var(--green);
  color: #111;
}

/* Newest game takes two columns, cover beside the text */
.card-featured {
  grid-column: span 2;
  flex-direction: row;
}

.card-featured .card-cover {
  flex: 0 0 58%;
  aspect-ratio: auto;
  min-height: 320px;
  border-bottom: 0;
  border-right: 1px solid var(--border);
}

.card-featured .card-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
}

/* Placeholder for the next game */
.card-next {
  background: repeating-linear-gradient(-45deg, transparent 0 10px, var(--overlay-lighter) 10px 20px), var(--bg-card);
  justify-content: flex-end;
}

.card-next .card-title,
.card-next .card-text {
  color: var(--text-muted);
}

/* ─── Footer ─── */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 2rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .card-cover img, .card::after { transition: none; }
}

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 2.2rem; }
  .card-featured { flex-direction: column; }
  .card-featured .card-cover {
    flex: none;
    aspect-ratio: 16 / 9;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .card-featured { grid-column: auto; }
  .topnav { padding: 0.75rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
  .topnav-stats { gap: 0.75rem; }
  .topnav-stat { font-size: 0.7rem; }
  .hero { padding: 2rem 1rem 1.5rem; }
  .results-bar { padding: 0.5rem 1rem; }
  .card-body { padding: 1rem 1rem 1rem calc(1rem + 4px); }
  .footer { padding: 1rem; flex-direction: column; }
}
