:root {
  color-scheme: dark;
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface-strong: #252525;
  --text: #ffffff;
  --muted: #b0b0b0;
  --accent: #28d675;
  --accent-soft: rgba(0,136,255,.35);
  --border: rgba(255, 255, 255, 0.08);
  --blue: #0099FF;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
  line-height: 1.5;
}

button,
a {
  font: inherit;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 40px;
  background: linear-gradient(180deg, rgba(15, 15, 15, 0.98) 0%, rgba(15, 15, 15, 0.95) 100%);
  border-bottom: 1px solid rgba(0,136,255,.35);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  margin: 0 calc(-50vw + 50%);
  width: 100vw;
  border-radius: 0 0 20px 20px;
}

.brand {
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, #28d675 0%, #0099ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.search-form {
  display: flex;
  gap: 10px;
  flex: 1;
  max-width: 480px;
}

.search-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(0, 136, 255, 0.3);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(0, 119, 255, 0.12);
  color: var(--text);
}

.search-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-form input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 20px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #050505;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 60px rgba(40, 214, 117, 0.13);
}

.btn-secondary {
  background: rgba(0, 119, 255, 0.15);
  color: var(--blue);
  border: 1px solid rgba(0, 119, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(0, 119, 255, 0.25);
  border-color: var(--blue);
}

.hero-section {
  background: linear-gradient(135deg, rgba(0, 50, 120, 0.85) 0%, rgba(0, 30, 70, 0.8) 50%, rgba(15, 15, 15, 0.95) 100%);
  padding: 100px 0 120px;
  border-bottom: 2px solid rgba(0, 136, 255, 0.25);
  margin-bottom: 60px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 153, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #0099ff 0%, #28d675 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #b0d4ff;
  max-width: 700px;
  line-height: 1.8;
  font-weight: 300;
}
.films-grid {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: 10px 0 20px;
  width: 100%;
}

.films-grid::-webkit-scrollbar {
  height: 8px;
}

.films-grid::-webkit-scrollbar-track {
  background: rgba(255,255,255,.05);
  border-radius: 999px;
}

.films-grid::-webkit-scrollbar-thumb {
  background: rgba(0,136,255,.4);
  border-radius: 999px;
}

.films-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(0,136,255,.7);
}

.film-card {
  flex: 0 0 200px;
  width: 200px;

  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  overflow: hidden;

  display: flex;
  flex-direction: column;

  text-decoration: none;
  color: inherit;

  transition:
    transform .3s ease,
    box-shadow .3s ease,
    border-color .3s ease;

  backdrop-filter: blur(10px);
}

.film-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0,136,255,.35);
  box-shadow: 0 25px 60px rgba(0,136,255,.18);
}

.film-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--surface-strong);
}

.film-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.film-card:hover .film-cover img {
  transform: scale(1.06);
}

.film-title {
  padding: 16px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
  background: rgba(0,0,0,.35);
}
.site-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  text-align: center;
}

.detail-shell {
  padding-bottom: 64px;
}

.detail-main {
  margin-top: 16px;
}

.detail-hero {
  display: grid;
  gap: 28px;
  padding: 28px 0 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-meta {
  max-width: 920px;
}

.detail-meta h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.detail-meta .info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: var(--muted);
  margin: 16px 0;
  font-size: 0.95rem;
}

.detail-meta .overview {
  max-width: 840px;
  line-height: 1.8;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.9rem;
}

.embed-section {
  margin-top: 48px;
}

.video-player {
  margin-top: 18px;
  border-radius: 20px;
  overflow: hidden;
  border-color: rgba(0,136,255,.35);
  background: var(--surface-strong);
}

.episode-controls {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-outline {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.button-outline.active,
.button-outline:hover {
  background: rgba(0,136,255,.35);
  color: var(--accent);
}

.detail-grid {
  margin-top: 42px;
  display: grid;
  gap: 24px;
}

.detail-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  padding: 24px;
}

.detail-card h3 {
  margin-bottom: 18px;
}

.cast-list,
.review-list {
  display: grid;
  gap: 16px;
}

.detail-topbar {
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid rgba(0,136,255,.35);
}

.back-btn {
  color: var(--accent);
  background: rgba(0,136,255,.20);
 border-color: rgba(0,136,255,.35);
  border-radius: 999px;
  padding: 12px 20px;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.back-btn:hover {
  background: rgba(0,136,255,.50);
  transform: translateX(-2px);
}

.container {
  max-width: 1900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 50px;
  flex: 1;
}

.episode-selector {
  background: rgba(10, 10, 10, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin-bottom: 28px;
}

.selector-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.selector-group label {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.selector-group select {
  appearance: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 12px 14px;
  min-width: 150px;
}

.selector-group select:focus {
  outline: none;
  border-color: rgba(0,136,255,.35);
}

.episode-info {
  color: var(--muted);
  font-size: 0.95rem;
  min-width: 220px;
}

.player-wrapper {
  margin-bottom: 32px;
}

.player-container {
  background: var(--surface-strong);
  border: 1px solid rgba(0,136,255,.35);
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.player-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.film-info {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0,136,255,.35);
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 30px;
}

.film-info h3 {
  font-size: 1.9rem;
  margin-bottom: 20px;
}

.film-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.meta-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0,136,255,.35);
  border-radius: 18px;
  padding: 20px;
}

.meta-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
  font-weight: 700;
}

.meta-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}

.description-text {
  color: var(--muted);
  line-height: 1.8;
}

.cast-section,
.review-section {
  margin-bottom: 32px;
}

.cast-title {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 18px;
}

.cast-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.cast-member {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px;
}

.cast-member-name {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.cast-member-role {
  color: var(--muted);
  font-size: 0.95rem;
}

.review-list {
  display: grid;
  gap: 16px;
}

.review-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px;
}

.review-item strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
}

.review-item p {
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 860px) {
  .episode-selector {
    flex-direction: column;
    align-items: stretch;
  }

  .selector-group select {
    width: 100%;
  }
}

.cast-item,
.review-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 18px;
}

.cast-item p,
.review-item p {
  margin: 0;
}

.cast-item span {
  color: var(--muted);
  font-size: 0.95rem;
}

.review-item strong {
  display: block;
  margin-bottom: 6px;
}




.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

.main-content {
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-main .container {
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 1000px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}




@media (max-width: 900px) {
  .row {
    grid-auto-columns: minmax(220px, 1fr);
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 20px 18px 36px;
  }

  .topbar {
    flex-direction: column;
    align-items: center;
  }

  .section-header {
    flex-direction: column;
    align-items: center;
  }
}
