:root {
  --bg: #0a0705;
  --bg-panel: #14100c;
  --bg-panel-2: #1c1712;
  --border: #33281c;
  --gold: #c9a227;
  --gold-bright: #e8c766;
  --red: #7a1414;
  --red-bright: #a81f1f;
  --text: #ece4d6;
  --text-dim: #a89c88;
  --font-display: "Cinzel", "Georgia", serif;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--gold-bright);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 7, 5, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 1px;
  color: var(--gold-bright);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.main-nav {
  display: flex;
  gap: 24px;
}

.main-nav a {
  color: var(--text-dim);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--gold-bright);
  text-decoration: none;
}

/* Hero */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center 20%;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 7, 5, 0.15) 0%,
    rgba(10, 7, 5, 0.55) 55%,
    rgba(10, 7, 5, 0.97) 100%
  );
}

.hero-inner {
  position: relative;
  padding: 60px 20px 50px;
  width: 100%;
}

.hero-eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin: 0 0 16px;
  color: var(--text);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.hero p.lede {
  max-width: 680px;
  color: var(--text-dim);
  font-size: 1.05rem;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 2px;
  font-family: var(--font-display);
  letter-spacing: 1px;
  font-size: 0.95rem;
  border: 1px solid var(--gold);
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--red-bright);
  border-color: var(--red-bright);
  color: #fff;
}

.btn-primary:hover {
  background: var(--red);
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--gold-bright);
}

.btn-secondary:hover {
  background: var(--gold);
  color: #100c08;
  text-decoration: none;
}

/* Sections */
section {
  padding: 60px 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--gold-bright);
  margin: 0 0 8px;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 auto 40px;
}

/* Season cards */
.season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
}

.season-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

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

.season-card a.card-link {
  display: block;
  color: inherit;
}

.season-card a.card-link:hover {
  text-decoration: none;
}

.season-card-image {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
}

.season-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.season-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 7, 5, 0) 40%, rgba(10, 7, 5, 0.9) 100%);
}

.season-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--red-bright);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 2px;
  z-index: 1;
}

.season-card-body {
  padding: 18px 20px 22px;
}

.season-card-body h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: var(--text);
}

.season-card-body p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.season-card-meta {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--gold);
  letter-spacing: 0.5px;
}

/* Watch legally box */
.legal-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: 28px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.legal-box h3 {
  font-family: var(--font-display);
  margin: 0 0 6px;
  color: var(--gold-bright);
}

.legal-box p {
  margin: 0;
  color: var(--text-dim);
  max-width: 520px;
}

.legal-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Episode tiles: квадратные плитки по 3 в ряд, с местом под видео с YouTube */
.episode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 860px) {
  .episode-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.episode-tile {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.episode-tile-current {
  border-color: var(--gold-bright);
}

.watch-note {
  margin: 20px 0 0;
  padding: 14px 18px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
}

.episode-tile:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
}

.episode-tile a.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.episode-tile a.card-link:hover {
  text-decoration: none;
}

/* Квадратная область под вставку видео (YouTube iframe) */
.episode-tile-video {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-panel-2);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.episode-tile-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.episode-tile-video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.8rem;
  text-align: center;
  padding: 0 14px;
}

.episode-tile-video-placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.45;
}

.episode-tile-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 18px 18px;
}

.episode-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.episode-num {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
}

.episode-tile-body h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text);
}

.episode-tile-body .ep-orig {
  color: var(--text-dim);
  font-weight: normal;
  font-size: 0.85em;
}

.episode-tile-body p {
  margin: 0 0 10px;
  color: var(--text-dim);
  font-size: 0.88rem;
  flex: 1;
}

.episode-date {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.episode-status {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 2px;
}

.status-aired {
  background: rgba(201, 162, 39, 0.15);
  color: var(--gold-bright);
}

.status-upcoming {
  background: rgba(168, 31, 31, 0.2);
  color: #e2867e;
}

/* Episode page (отдельная страница серии) */
.ep-orig-lede {
  font-style: italic;
  color: var(--text-dim);
}

.episode-page-video {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  margin: 0 0 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.episode-page-video .episode-tile-video-placeholder svg {
  width: 48px;
  height: 48px;
}

.episode-page-video .episode-tile-video-placeholder span {
  font-size: 1rem;
}

.episode-page-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.episode-page-descr {
  color: var(--text-dim);
  font-size: 1rem;
  margin: 0 0 20px;
}

.episode-nav-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 24px 0 0;
}

/* Актёры: каталог */
.actor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 22px;
}

.actor-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

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

.actor-card a.card-link {
  display: block;
  color: inherit;
}

.actor-card a.card-link:hover {
  text-decoration: none;
}

.actor-card-photo {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-panel-2);
}

.actor-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.actor-photo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold);
  background: var(--bg-panel-2);
}

.actor-card-body {
  padding: 14px 16px 18px;
}

.actor-card-body h3 {
  font-family: var(--font-display);
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--text);
}

.actor-card-body p {
  margin: 0;
  color: var(--gold);
  font-size: 0.85rem;
}

/* Актёры: персональная страница */
.actor-page-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: start;
}

@media (max-width: 700px) {
  .actor-page-layout { grid-template-columns: 1fr; }
}

.actor-page-photo {
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-panel-2);
}

.actor-page-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.actor-page-body p {
  color: var(--text-dim);
  margin: 0 0 16px;
}

.actor-page-fact {
  color: var(--gold) !important;
  font-size: 0.9rem;
}

/* Новости */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 820px;
  margin: 0 auto;
}

.news-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: 18px 22px;
}

@media (max-width: 560px) {
  .news-item { grid-template-columns: 1fr; gap: 6px; }
}

.news-date {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 0.9rem;
  white-space: nowrap;
}

.news-item h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--text);
}

.news-item p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* Season page hero */
.season-hero {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
}

.season-hero .breadcrumb {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.season-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 14px;
  color: var(--gold-bright);
}

.season-hero .lede {
  max-width: 760px;
  color: var(--text-dim);
}

.season-meta-row {
  display: flex;
  gap: 24px;
  margin-top: 18px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.season-meta-row strong {
  color: var(--gold);
  font-weight: 600;
}

/* FAQ / info blocks */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.info-card {
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 22px;
}

.info-card h3 {
  font-family: var(--font-display);
  color: var(--gold-bright);
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.info-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a {
  color: var(--text-dim);
}

.site-footer .disclaimer {
  max-width: 640px;
  color: #6e6355;
  font-size: 0.78rem;
  margin-top: 18px;
}

@media (max-width: 640px) {
  .site-header .container {
    flex-direction: column;
    gap: 10px;
  }
  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Двухколоночная раскладка: основной контент + сайдбар */
.page-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

@media (max-width: 860px) {
  .page-with-sidebar {
    grid-template-columns: 1fr;
  }
}

.page-main {
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar-bookmark-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: var(--gold);
  color: #100c08;
  border: none;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.2s;
}

.sidebar-bookmark-btn:hover {
  background: var(--gold-bright);
}

.sidebar-bookmark-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.sidebar-block {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px 18px 18px;
}

.sidebar-block-title {
  font-family: var(--font-display);
  color: var(--gold-bright);
  font-size: 1rem;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sidebar-list a {
  color: var(--text-dim);
  font-size: 0.88rem;
}

.sidebar-list a:hover {
  color: var(--gold-bright);
}

.sidebar-list .sidebar-more {
  color: var(--gold);
  font-weight: 600;
}

.sidebar-actor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.sidebar-actor-grid a {
  display: block;
  text-align: center;
  color: inherit;
}

.sidebar-actor-grid a:hover {
  text-decoration: none;
}

.sidebar-actor-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bg-panel-2);
  transition: border-color 0.2s;
}

.sidebar-actor-grid a:hover .sidebar-actor-photo {
  border-color: var(--gold);
}

.sidebar-actor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-actor-photo .actor-photo-fallback {
  font-size: 0.9rem;
}

.sidebar-actor-name {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.25;
}

.sidebar-season-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sidebar-season-grid a {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.sidebar-season-grid a:hover {
  border-color: var(--gold);
}

.sidebar-season-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-season-grid span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3px 0;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.68rem;
  text-align: center;
}

.show-article {
  margin-top: 46px;
}

.show-article h3 {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.2rem;
  margin: 30px 0 12px;
}

.show-article h3:first-of-type {
  margin-top: 0;
}

.show-article p {
  margin: 0 0 15px;
  line-height: 1.75;
  color: var(--text-dim);
}

.show-article p:last-child {
  margin-bottom: 0;
}

.season-info-panel {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  margin: 28px 0 8px;
}

@media (max-width: 700px) {
  .season-info-panel {
    grid-template-columns: 1fr;
  }
}

.season-info-poster {
  aspect-ratio: 2 / 3;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.season-info-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.season-info-row {
  margin: 0 0 14px;
}

.season-info-row dt {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.season-info-row dd {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.season-info-row dd a {
  color: var(--text);
}

.season-info-row dd a:hover {
  color: var(--gold-bright);
}

/* Production polish: clear keyboard focus, stable embedded-player sizing and legal notice. */
:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 3px;
}

.episode-page-video > ins {
  display: block;
  width: 100%;
  min-height: 370px;
}

.legal-notice {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.55;
}

@media (max-width: 700px) {
  .episode-page-video > ins {
    min-height: 260px;
  }
}