/* show-common.css — shared styles for the individual show page
   (show.html) and the cast-member page (person.html). Kept in its own
   file (rather than duplicated <style> blocks in both pages) so a
   future tweak only needs to happen once. */

.detail-wrap { max-width: 900px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }

.detail-back {
  display: inline-block;
  margin-bottom: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--maroon);
  text-decoration: none;
}
.detail-back:hover { text-decoration: underline; }

/* The whole content area sits in a card, same visual language as the
   index page's .about-card (paper-colored panel, hairline border) -
   gives the detail page a defined edge against the page background
   instead of everything floating loose. */
.detail-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 2px 10px rgba(27, 31, 42, 0.06);
  padding: 1.75rem;
}

.show-head { display: flex; gap: 1.75rem; flex-wrap: wrap; margin-bottom: 1.75rem; }

.show-poster {
  width: 190px;
  height: 268px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--paper-lo);
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(27, 31, 42, 0.22);
}

.show-titles h1 {
  font-family: var(--font-display);
  font-size: 1.95rem;
  margin: 0 0 0.25rem;
  color: var(--ink);
}
.show-alt-name { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.7rem; }
.show-en { font-family: var(--font-serif); font-size: 1.2rem; color: var(--ink); margin-bottom: 0.2rem; }
.show-cn { font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 0.75rem; }
.show-air-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 0.7rem; }

.show-meta-pills { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.show-meta-pills span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.show-meta-pills span a { color: inherit; text-decoration: none; }
.show-meta-pills span a:hover, .show-meta-pills span a:focus-visible { color: var(--maroon); text-decoration: underline; }

.detail-section { margin-bottom: 2rem; }
.detail-section:last-child { margin-bottom: 0; }
.detail-section h2 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--maroon);
  border-left: 3px solid var(--maroon);
  padding-left: 0.6rem;
  margin: 0 0 0.9rem;
}

.show-synopsis { font-family: var(--font-serif); line-height: 1.65; color: var(--ink); }

/* Cast: name (+ character, if known) in a clickable card that links to
   person.html for that actor's other credits. */
.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.7rem; }
.cast-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
}
.cast-card:hover, .cast-card:focus-visible {
  border-color: var(--maroon);
  box-shadow: 0 4px 12px rgba(27, 31, 42, 0.12);
  transform: translateY(-1px);
}
.cast-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--line-lo);
}
.cast-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--paper);
  background: var(--maroon);
}
.cast-card-text { min-width: 0; display: block; }
.cast-card .person { font-weight: 600; font-size: 0.9rem; color: var(--ink); display: block; }
.cast-card .person-secondary { font-size: 0.78rem; color: var(--ink-soft); display: block; }
.cast-card .character { color: var(--ink-soft); font-size: 0.8rem; display: block; margin-top: 0.15rem; }

.ep-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.ep-table th, .ep-table td { text-align: left; padding: 0.4rem 0.65rem; border-bottom: 1px solid var(--line); }
.ep-table tr:last-child td { border-bottom: none; }
.ep-table th { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; color: var(--ink-soft); }

.related-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.related-list a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.88rem;
  transition: border-color 0.1s ease, color 0.1s ease, transform 0.1s ease;
}
.related-list a:hover, .related-list a:focus-visible {
  border-color: var(--maroon);
  color: var(--maroon);
  transform: translateY(-1px);
}

/* Person page: same card list, but with the show's poster as a small
   thumbnail on each entry since person.json carries the poster field. */
.credit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.9rem; }
.credit-card {
  display: flex;
  gap: 0.8rem;
  padding: 0.6rem;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
}
.credit-card:hover, .credit-card:focus-visible {
  border-color: var(--maroon);
  box-shadow: 0 4px 12px rgba(27, 31, 42, 0.12);
  transform: translateY(-1px);
}
.credit-poster {
  width: 56px;
  height: 79px;
  object-fit: cover;
  border-radius: 2px;
  background: var(--paper-lo);
  flex-shrink: 0;
}
.credit-card-text { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.credit-card .credit-vn { font-weight: 600; color: var(--ink); font-size: 0.92rem; }
.credit-card .credit-en { color: var(--ink-soft); font-size: 0.82rem; margin-top: 0.15rem; }
.credit-card .credit-character { color: var(--ink-soft); font-size: 0.78rem; font-style: italic; margin-top: 0.25rem; }

.person-title { display: flex; align-items: center; gap: 1rem; }
.person-title h1 { font-family: var(--font-display); font-size: 1.7rem; margin: 0 0 0.3rem; color: var(--ink); }
.person-secondary-name { font-family: var(--font-serif); font-size: 1rem; color: var(--ink-soft); margin-bottom: 0.3rem; }
.person-count { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 1.5rem; }
.person-photo {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--line-lo);
}
.person-photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--paper);
  background: var(--maroon);
}

/* Actors / franchises browse pages (actors.html, franchises.html) */
.browse-head { margin-bottom: 1.5rem; }
.browse-head h1 { font-family: var(--font-display); font-size: 1.7rem; margin: 0 0 0.8rem; color: var(--ink); }
.browse-head input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
}
.browse-count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.5rem; }
.browse-letter-heading {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--maroon);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.25rem;
  margin: 1.4rem 0 0.7rem;
}
.browse-letter-heading:first-child { margin-top: 0; }
.actor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.7rem; margin-bottom: 0.3rem; }
.cast-card .credit-count { color: var(--ink-soft); font-size: 0.78rem; display: block; margin-top: 0.15rem; }

.detail-error, .detail-loading { padding: 3rem 1rem; text-align: center; color: var(--ink-soft); font-family: var(--font-mono); }

@media (max-width: 560px) {
  .detail-card { padding: 1.2rem; }
  .show-poster { width: 140px; height: 197px; }
}
