/* styles.css (Steam-like theme) */
:root {
  color-scheme: dark;

  --bg: #1b2838;
  --card: #171a21;
  --card2: #405163e6;

  --text: #c7d5e0;
  --muted: rgba(199,213,224,.75);

  --border: rgba(255,255,255,.10);
  --border2: rgba(255,255,255,.14);

  --accent: #1a9fff;
  --accent2: #5c7e10;

  --shadow: 0 10px 34px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 22px 18px; }

h1 { margin: 0 0 8px; font-size: 28px; font-weight: 700; }
h2 { margin: 0 0 10px; font-size: 18px; font-weight: 700; }
h2 a { color: var(--text); }
h2 a:hover { color: #d9f0ff; text-decoration: none; }

.muted { color: var(--muted); font-size: 13px; }

.err {
  color: #ffb4b4;
  background: rgba(255,0,0,.12);
  border: 1px solid rgba(255,0,0,.20);
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

/* List spacing between games */
.list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 14px;
}

/* Base card */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
}

/* Nested cards inside the main game card */
.game-card .card {
  background: var(--card2);
  border-color: rgba(255,255,255,.10);
  box-shadow: none;
}

.section-title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .2px;
  margin-bottom: 10px;
  color: var(--text);
}

/* Main game card layout */
.game-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 14px;
  padding: 14px;
}
@media (max-width: 900px) {
  .game-card { grid-template-columns: 1fr; }
}

/* Game header image */
.game-header-img {
  border-radius: 10px;
  overflow: hidden;
  background: #0f141c;
  border: 1px solid var(--border2);
}
.game-header-img img {
  width: 100%;
  display: block;
}

/* Key/value grid */
.small-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 12px;
  font-size: 14px;
  margin-top: 8px;
}
.k { color: var(--muted); }

/* Genre line */
.genre-line {
  margin: 6px 0 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.genre-text {
  color: var(--text);
  font-weight: 600;
}

/* About text */
.desc { line-height: 1.5; color: var(--text); }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(26,159,255,.14);
  border: 1px solid rgba(26,159,255,.22);
  color: var(--text);
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 800px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } }

.shot {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border2);
  background: #0f141c;
}
.shot img { width: 100%; display: block; }

/* Reviews */
.review-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.review-score {
  display: inline-flex;
  align-self: flex-start;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(26,159,255,0.18);
  border: 1px solid rgba(26,159,255,0.35);
  color: #d9f0ff;
}

/* Custom section */
.custom {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.10);
}

/* --- Collapsible About section (NO overlay/fade) --- */
.about-card { position: relative; }
.about-body { line-height: 1.55; }

/* clamp when collapsed */
.about-card.is-collapsed .about-body {
  max-height: 320px; /* a bit bigger than before */
  overflow: hidden;
}

/* remove the fade entirely (this was your grey overlay) */
.about-fade { display: none !important; }

/* make room for button when collapsed */
.about-card.is-collapsed { padding-bottom: 50px; }

/* button bottom-right */
.about-toggle {
  position: absolute;
  right: 12px;
  bottom: 10px;
  border: 1px solid rgba(255,255,255,.15);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.about-toggle:hover { filter: brightness(1.05); }

/* --- YouTube embeds: ensure thumbnail/iframe fills box --- */
.yt {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;          /* modern + clean */
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: #0f141c;
}

/* Support older browsers if aspect-ratio is missing */
@supports not (aspect-ratio: 16 / 9) {
  .yt { padding-top: 56.25%; }
}

/* Whatever your lazy embed inserts (iframe/img/video/button), force it to fill */
.yt iframe,
.yt img,
.yt video,
.yt > div,
.yt > button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Make thumbnail look “in focus” */
.yt img,
.yt video {
  object-fit: cover;
  display: block;
}

/* Titles above embeds */
.yt-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #c7d5e0;
}

/* Trailers horizontal layout */
.yt-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .yt-grid { grid-template-columns: 1fr; }
}

.yt-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.review-score {
  text-decoration: none;
}

.review-score:hover {
  filter: brightness(1.05);
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 700px) {
  .class-grid { grid-template-columns: 1fr; }
}

.class-card {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  padding: 12px;
  background: rgba(15,20,28,.35);
}

.class-img {
  width: 100%;
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: #0f141c;
}

.class-title {
  margin-top: 10px;
  font-weight: 700;
  font-size: 14px;
}

.class-links {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}
