.detail-app {
  padding-top: 18px;
}

.detail-banner {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-size: cover;
  background-position: top center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
}

.detail-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 9, 12, 0.9) 0%, rgba(9, 9, 12, 0.75) 45%, rgba(9, 9, 12, 0.3) 100%),
    linear-gradient(180deg, rgba(143, 124, 255, 0.08), transparent 28%, rgba(9, 9, 12, 0.92) 100%);
}

.detail-banner::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 186, 222, 0.18), transparent 70%);
  filter: blur(16px);
}

.detail-layout {
  position: relative;
  z-index: 1;
  min-height: inherit;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: end;
  padding: clamp(24px, 3.5vw, 38px);
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4.25;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  background: #11111a;
}

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

.detail-copy {
  max-width: 860px;
}

.detail-title {
  margin: 14px 0 14px;
  font-size: clamp(2.2rem, 4.2vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.detail-description {
  margin: 0;
  max-width: 760px;
  color: var(--text-soft);
  line-height: 1.8;
  font-size: 1rem;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.detail-content {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}

.content-card {
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(21, 21, 29, 0.96), rgba(17, 17, 24, 0.98));
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.content-card h3 {
  margin: 0 0 18px;
  font-size: 1.15rem;
}

.season-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.season-tab {
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.season-tab:hover {
  transform: translateY(-2px);
}

.season-tab.is-active {
  color: #fff;
  border-color: rgba(143, 124, 255, 0.38);
  background: linear-gradient(135deg, rgba(143, 124, 255, 0.22), rgba(255, 186, 222, 0.12));
  box-shadow: 0 0 24px rgba(143, 124, 255, 0.18);
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.episode-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.episode-card:hover {
  transform: translateY(-4px);
  border-color: rgba(143, 124, 255, 0.3);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
}

.episode-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.episode-card h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.episode-card p {
  margin: 0 0 14px;
  color: var(--text-soft);
  line-height: 1.65;
  font-size: 0.95rem;
}

.episode-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-sidebar {
  display: grid;
  gap: 18px;
  align-self: start;
  position: sticky;
  top: 96px;
}

.stat-list {
  display: grid;
  gap: 14px;
}

.stat-item {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.stat-item small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-item strong {
  font-size: 1rem;
  color: var(--text);
}

@media (max-width: 1080px) {
  .detail-content {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }
}

@media (max-width: 840px) {
  .detail-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .detail-poster {
    max-width: 280px;
  }

  .episode-grid {
    grid-template-columns: 1fr;
  }
}
