/* Vi Spiller Videospil — IMDB-inspired dark theme */

:root {
  --bg: #0e0e0e;
  --surface: #1a1a1a;
  --surface-2: #232323;
  --border: #333333;
  --text: #e8e8e8;
  --text-dim: #a3a3a3;
  --gold: #f5c518;
  --gold-dark: #b8930f;
  --historie: #5b9bd5;
  --aestetik: #d5735b;
  --mekanik: #7ec488;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3, .display {
  font-family: "Archivo Black", "Arial Black", sans-serif;
  letter-spacing: -0.01em;
  margin: 0;
}

a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */

.site-header {
  background: #000;
  border-bottom: 3px solid var(--gold);
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-header .logo {
  font-size: 1.35rem;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-header .logo::before {
  content: "▶";
  font-size: 0.9rem;
  background: var(--gold);
  color: #000;
  border-radius: 4px;
  padding: 0.25rem 0.4rem;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--surface);
  border-radius: 8px;
  padding: 0.25rem;
}

.tab-link {
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-dim);
  cursor: pointer;
  border: none;
  background: transparent;
}

.tab-link.active, .tab-link:hover {
  background: var(--gold);
  color: #000;
}

/* ---------- Layout ---------- */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ---------- Episode grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.15s ease, border-color 0.15s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.card .poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--surface-2);
  overflow: hidden;
}

.card .poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.grade-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #000;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: "Archivo Black", sans-serif;
  font-size: 0.95rem;
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  line-height: 1.2;
}

.grade-badge .max {
  font-size: 0.6rem;
  color: var(--text-dim);
  font-family: "Inter", sans-serif;
  font-weight: 400;
}

.scale-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--text-dim);
  color: var(--text-dim);
  font-family: "Inter", sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  line-height: 1.4;
}

.card .card-body {
  padding: 0.7rem 0.8rem 0.9rem;
}

.card .card-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.card .card-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Joe's Corner cards (no grade badge, link-count pill instead) */
.jc-pill {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #000;
  border: 1px solid var(--gold-dark);
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

/* ---------- Episode detail page ---------- */

.episode-hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 700px) {
  .episode-hero { grid-template-columns: 1fr; }
}

.episode-hero .poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.episode-meta-row {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0.4rem 0 1rem;
}

.episode-meta-row span:not(:last-child)::after {
  content: "•";
  margin: 0 0.5rem;
  color: var(--border);
}

.verdict {
  background: var(--surface);
  border-left: 3px solid var(--gold);
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin: 1.25rem 0;
  font-style: italic;
  color: var(--text-dim);
}

audio {
  width: 100%;
  margin: 1rem 0;
}

/* ---------- Ratings table ---------- */

.ratings-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}

.overall-grade {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.overall-grade .num {
  font-family: "Archivo Black", sans-serif;
  font-size: 2.6rem;
  color: var(--gold);
}

.overall-grade .label {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.cat-bars { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }

.cat-bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 3rem;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.cat-bar-track {
  background: var(--surface-2);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.cat-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.cat-bar-fill.historie { background: var(--historie); }
.cat-bar-fill.aestetik { background: var(--aestetik); }
.cat-bar-fill.mekanik { background: var(--mekanik); }

table.host-ratings {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

table.host-ratings th, table.host-ratings td {
  text-align: center;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
}

table.host-ratings th:first-child, table.host-ratings td:first-child {
  text-align: left;
}

table.host-ratings thead th {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

table.host-ratings tfoot td {
  font-weight: 700;
  color: var(--gold);
  border-bottom: none;
  border-top: 2px solid var(--border);
}

/* ---------- Joe's Corner links ---------- */

.links-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1.5rem;
}

.link-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.link-embed .link-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.link-embed a.plain-link {
  color: var(--gold);
  word-break: break-all;
}

.empty-state {
  color: var(--text-dim);
  padding: 3rem 0;
  text-align: center;
}

/* ---------- Nav: mindre "Rangering"-fane inde i fane-gruppen ---------- */
.tab-link-minor {
  font-size: 0.78rem;
  padding: 0.5rem 0.8rem;
  opacity: 0.65;
}

.tab-link-minor.active, .tab-link-minor:hover {
  opacity: 1;
}

/* ---------- Rangering: rolig, ensartet rank-tal i card-body (Rotten Tomatoes-agtig) ---------- */
.card-body-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.rank-num {
  flex-shrink: 0;
  background: #000;
  border: 1px solid var(--gold-dark);
  color: var(--gold);
  font-family: "Archivo Black", sans-serif;
  font-size: 1.15rem;
  border-radius: 5px;
  padding: 0.3rem 0.6rem;
  line-height: 1;
}
