:root {
  --page: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;
  --amber: #f59e0b;
  --white: #ffffff;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  color: var(--white);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
}

.header-inner,
.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--slate-900);
  background: linear-gradient(135deg, var(--teal-400), var(--teal-600));
  box-shadow: 0 12px 25px rgba(20, 184, 166, 0.28);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.logo-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-subtitle {
  color: #94a3b8;
  font-size: 12px;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 15px;
  color: #e2e8f0;
}

.nav-links a {
  transition: color 0.18s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--teal-400);
}

.nav-search {
  position: relative;
  width: min(260px, 28vw);
}

.nav-search input,
.filter-box input,
.filter-box select {
  width: 100%;
  border: 0;
  border-radius: 999px;
  outline: 0;
}

.nav-search input {
  background: #334155;
  color: var(--white);
  padding: 9px 42px 9px 16px;
}

.nav-search input::placeholder,
.filter-box input::placeholder {
  color: #94a3b8;
}

.nav-search button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  padding: 6px 8px;
}

.nav-search button:hover {
  color: var(--teal-400);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  padding: 14px 0 18px;
}

.mobile-panel.open {
  display: block;
}

.mobile-panel a {
  display: block;
  padding: 10px 0;
  color: #e2e8f0;
}

.mobile-panel .nav-search {
  width: 100%;
  margin-top: 10px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.54) 45%, rgba(0, 0, 0, 0.12));
}

.hero-copy {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  right: max(32px, calc((100vw - 1180px) / 2));
  bottom: 70px;
  z-index: 3;
  max-width: 790px;
  color: var(--white);
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.06em;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.movie-meta,
.card-meta,
.inline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(20, 184, 166, 0.16);
  color: var(--teal-700);
}

.hero .pill {
  background: var(--teal-500);
  color: var(--white);
}

.star {
  color: var(--amber);
  font-weight: 800;
}

.hero-actions,
.section-head,
.page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-actions {
  justify-content: flex-start;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 12px 22px;
  border: 0;
  cursor: pointer;
  background: var(--teal-500);
  color: var(--white);
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 14px 28px rgba(20, 184, 166, 0.2);
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--teal-600);
  box-shadow: 0 18px 36px rgba(20, 184, 166, 0.28);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  color: var(--white);
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  transition: background 0.18s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
}

.hero-dot.active {
  width: 30px;
  background: var(--teal-400);
}

.main-block {
  padding: 56px 0;
}

.section {
  margin-bottom: 64px;
}

.section-head {
  margin-bottom: 22px;
}

.section-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-link {
  color: var(--teal-600);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.movie-grid.large {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.movie-grid.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transform: translateY(0);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 36px rgba(15, 23, 42, 0.14);
}

.poster {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.movie-grid.large .poster {
  height: 260px;
}

.movie-grid.compact .poster {
  height: 190px;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.48s ease;
}

.movie-card:hover .poster img,
.related-link:hover img {
  transform: scale(1.1);
}

.duration {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 7px;
  padding: 3px 8px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-500), #0ea5e9);
  font-weight: 900;
}

.poster-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 14px 12px;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), transparent);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.movie-card:hover .poster-copy {
  opacity: 1;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 10px;
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  transition: color 0.18s ease;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card:hover .card-title {
  color: var(--teal-600);
}

.card-meta {
  justify-content: space-between;
  color: #64748b;
  font-size: 13px;
}

.card-text {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  min-height: 190px;
  border-radius: 20px;
  padding: 22px;
  color: var(--white);
  background: linear-gradient(135deg, #0f766e, #0f172a);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.16);
  transition: transform 0.18s ease;
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.page-hero {
  padding: 70px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-600), #0f172a);
}

.page-hero.blue {
  background: linear-gradient(135deg, #2563eb, #0891b2);
}

.page-hero.slate {
  background: linear-gradient(135deg, #0f172a, #334155);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.filter-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin: 30px 0 0;
}

.filter-box input,
.filter-box select {
  padding: 13px 18px;
  color: #0f172a;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.filter-box select {
  min-width: 180px;
}

.hidden-card {
  display: none !important;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  gap: 32px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--teal-600);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  box-shadow: 0 26px 54px rgba(15, 23, 42, 0.22);
}

.player-wrap video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

.play-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0f172a;
  background: var(--teal-400);
  box-shadow: 0 20px 40px rgba(45, 212, 191, 0.36);
  font-size: 28px;
}

.detail-title {
  margin: 26px 0 12px;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.content-card,
.sidebar-card {
  border-radius: 18px;
  background: var(--white);
  padding: 24px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.content-card + .content-card {
  margin-top: 22px;
}

.content-card h2,
.sidebar-card h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 22px;
}

.content-card p {
  margin: 0 0 12px;
  color: #334155;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.tag-list span {
  border-radius: 999px;
  padding: 6px 12px;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
}

.sidebar-card {
  position: sticky;
  top: 86px;
}

.cover-card {
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.cover-card img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.related-list {
  display: grid;
  gap: 16px;
}

.related-link {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-link .thumb {
  height: 76px;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.related-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.related-link h3 {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-link:hover h3 {
  color: var(--teal-600);
}

.related-link p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.site-footer {
  background: #020617;
  color: #94a3b8;
  padding: 42px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 30px;
}

.site-footer h2,
.site-footer h3 {
  color: var(--white);
  margin: 0 0 12px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #94a3b8;
}

.site-footer a:hover {
  color: var(--teal-400);
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
}

.empty-state {
  border-radius: 18px;
  padding: 40px;
  text-align: center;
  background: var(--white);
  color: #64748b;
}

@media (max-width: 1080px) {
  .movie-grid,
  .movie-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-links,
  .header-inner > .nav-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 72vh;
    min-height: 520px;
  }

  .hero-copy {
    left: 22px;
    right: 22px;
    bottom: 74px;
  }

  .hero-control {
    display: none;
  }

  .hero-actions,
  .section-head,
  .page-actions,
  .filter-box {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-box {
    display: flex;
  }

  .movie-grid,
  .movie-grid.large,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .poster,
  .movie-grid.large .poster,
  .movie-grid.compact .poster {
    height: 210px;
  }

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

@media (max-width: 520px) {
  .header-inner,
  .container {
    width: min(100% - 24px, 1180px);
  }

  .logo-title {
    font-size: 17px;
  }

  .logo-subtitle {
    font-size: 11px;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .movie-grid,
  .movie-grid.large,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .poster,
  .movie-grid.large .poster,
  .movie-grid.compact .poster {
    height: 260px;
  }

  .related-link {
    grid-template-columns: 104px minmax(0, 1fr);
  }
}
