/* ----------------------------------------
   GAMES PAGE (hub: stats, highlights, now playing, timeline, library)
   Built on the theme tokens in style.css, so light and dark both work.
----------------------------------------- */

.hb-games {
  padding-top: 120px;
  --hb-np-grad: linear-gradient(135deg, #60a5fa 0%, #6366f1 100%);
  --hb-plat-pc: #60a5fa;
  --hb-plat-switch: #fb7185;
  --hb-plat-psp: #a78bfa;
  --hb-plat-mobile: #14b8a6;
}

.hb-plat-pc     { background: var(--hb-plat-pc); }
.hb-plat-switch { background: var(--hb-plat-switch); }
.hb-plat-psp    { background: var(--hb-plat-psp); }
.hb-plat-mobile { background: var(--hb-plat-mobile); }

/* Hero, matching the other page titles */
.hb-games-hero {
  text-align: center;
  padding: clamp(48px, 8vw, 84px) 20px clamp(28px, 4vw, 40px);
}

.hb-games-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(48px, 6.5vw, 70px);
  font-weight: 300;
  letter-spacing: -0.05em;
  line-height: 1;
  text-transform: uppercase;
  background: var(--hb-np-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hb-games-subtitle {
  margin-top: 14px;
  font-size: 15px;
  color: var(--hb-text-2-alt);
  letter-spacing: 0.02em;
}

/* Sections */
.hb-games-section {
  padding: clamp(44px, 6vw, 80px) clamp(20px, 6vw, 96px);
  background: var(--hb-bg);
}

.hb-games-section--alt { background: var(--hb-bg-alt); }

.hb-games-section > * {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.hb-games-h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--hb-text);
  margin-bottom: 22px;
}

/* Placeholder slots: dashed and quiet, so empty structure reads as empty */
.is-placeholder { opacity: 0.62; }
.is-placeholder :is(.hb-hl-title, .hb-np-title, .hb-gt-title, .hb-game-title, .hb-game-comment) {
  font-style: italic;
}

/* ── Highlights ── */
.hb-hl-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.hb-hl {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-radius: 16px;
  background: rgb(var(--hb-glass) / 0.72);
  border: 1px solid rgb(var(--hb-line) / 0.06);
}

.hb-hl.is-placeholder { border-style: dashed; border-color: rgb(var(--hb-line) / 0.18); }

.hb-hl-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(129, 140, 248, 0.18));
  color: #f59e0b;
}

.hb-hl-icon svg, .hb-game-ach svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hb-hl-title { font-weight: 600; color: var(--hb-text); }
.hb-hl-meta  { margin-top: 3px; font-size: 13px; color: var(--hb-text-3); }
.hb-hl-note  { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--hb-text-2); }

/* ── Now playing ── */
.hb-np-row {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.hb-np {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgb(var(--hb-glass) / 0.8);
  border: 1px solid rgb(var(--hb-line) / 0.06);
}

.hb-np.is-placeholder { border-style: dashed; border-color: rgb(var(--hb-line) / 0.18); }

.hb-np-cover {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--hb-text-3);
  background: var(--hb-fill-tint) center / cover no-repeat;
}

.hb-np-text { min-width: 0; display: flex; flex-direction: column; }
.hb-np-title { font-weight: 600; color: var(--hb-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-np-meta  { font-size: 13px; color: var(--hb-text-3); }

/* ── Timeline ── */
.hb-gt, .hb-gt-rows { list-style: none; padding: 0; }

.hb-gt-year {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid rgb(var(--hb-line) / 0.06);
}

.hb-gt-year:first-child { border-top: 0; }

.hb-gt-label {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: var(--hb-np-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hb-gt-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
}

.hb-gt-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}

.hb-gt-title { color: var(--hb-text); font-weight: 500; }
.hb-gt-plat  { font-size: 13px; color: var(--hb-text-3); }
.hb-gt-date  { font-size: 13px; color: var(--hb-text-3-cool); min-width: 9.5em; text-align: right; }

/* ── Library ── */
.hb-games-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.hb-gchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--hb-border-cool);
  background: var(--hb-bg);
  color: var(--hb-text-2-cool);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.hb-gchip:hover { border-color: var(--hb-border-strong); }
.hb-gchip.is-on { color: var(--hb-text-alt); border-color: var(--hb-indigo-line); background: var(--hb-tint); }
.hb-gchip:focus-visible { outline: 2px solid #818cf8; outline-offset: 2px; }

.hb-game-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.hb-game {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: rgb(var(--hb-glass) / 0.85);
  border: 1px solid rgb(var(--hb-line) / 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hb-game:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08); }
.hb-game[hidden] { display: none; }
.hb-game.is-placeholder { border-style: dashed; border-color: rgb(var(--hb-line) / 0.18); }

.hb-game-cover {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: var(--hb-fill-tint) center / cover no-repeat;
}

.hb-game-cover-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hb-text-3);
}

.hb-game-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }

.hb-game-badges { display: flex; flex-wrap: wrap; gap: 6px; }

.hb-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--hb-text-2);
  background: rgb(var(--hb-line) / 0.05);
}

.hb-badge .hb-gt-dot { width: 7px; height: 7px; }
.hb-st-playing   { color: #6366f1; background: rgba(99, 102, 241, 0.12); }
.hb-st-finished  { color: #0d9488; background: rgba(20, 184, 166, 0.12); }
.hb-st-completed { color: #b45309; background: rgba(245, 158, 11, 0.16); }
.hb-st-dropped   { color: var(--hb-text-3); }

:root[data-theme="dark"] .hb-st-playing   { color: #a5b4fc; }
:root[data-theme="dark"] .hb-st-finished  { color: #5eead4; }
:root[data-theme="dark"] .hb-st-completed { color: #fcd34d; }

.hb-game-title { font-size: 17px; font-weight: 600; color: var(--hb-text); letter-spacing: -0.01em; }
.hb-game-meta  { font-size: 13px; color: var(--hb-text-3); }
.hb-game-rating { color: #f59e0b; letter-spacing: 1px; }
.hb-star-off { color: var(--hb-hairline); }

.hb-game-comment {
  font-size: 14px;
  line-height: 1.55;
  color: var(--hb-text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hb-game-ach {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #f59e0b;
}

.hb-game-ach svg { width: 16px; height: 16px; }

@media (max-width: 600px) {
  .hb-gt-year { grid-template-columns: 1fr; gap: 6px; }
  .hb-gt-row { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .hb-gt-plat { display: none; }
  .hb-gt-date { min-width: 0; }
}
