:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --orange: #f97316;
  --green: #16a34a;
  --violet: #7c3aed;
  --pink: #db2777;
  --amber: #d97706;
  --slate: #1e293b;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #0f172a, #1e293b);
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.32);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: #0f172a;
  background: linear-gradient(135deg, #22d3ee, #60a5fa);
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.25);
}

.brand-text {
  background: linear-gradient(90deg, #67e8f9, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
}

.site-nav a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #67e8f9;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.mobile-nav a {
  display: block;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.86);
  border-radius: 12px;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 660px;
  color: #fff;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease;
  background-image: linear-gradient(115deg, rgba(8, 47, 73, 0.92), rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.98)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.28), transparent 30%),
    radial-gradient(circle at 80% 30%, rgba(37, 99, 235, 0.22), transparent 34%),
    linear-gradient(to top, rgba(2, 6, 23, 0.96), transparent 48%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  align-items: center;
  padding: 96px 0 80px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: #67e8f9;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.compact-actions {
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-tags,
.tag-row,
.detail-tags,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  padding: 7px 12px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.24);
  border: 1px solid rgba(103, 232, 249, 0.25);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  height: 470px;
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.55);
  transform: rotate(2deg);
}

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
  transform: translateY(-50%);
}

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

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

.hero-dots {
  position: absolute;
  right: 0;
  bottom: 30px;
  left: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots button.active {
  width: 30px;
  border-radius: 999px;
  background: #67e8f9;
}

.section-block {
  padding: 70px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head > a {
  color: var(--cyan);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  height: 270px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #155e75);
}

.poster-link img,
.related-card img,
.detail-poster img,
.hero-poster img,
.category-covers img {
  transition: transform 0.45s ease, opacity 0.2s ease;
}

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

.score-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.score-badge {
  top: 14px;
  right: 14px;
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.rank-badge {
  top: 14px;
  left: 14px;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
}

.movie-card-body {
  padding: 18px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.related-card h3 a:hover,
.mini-links a:hover {
  color: var(--cyan);
}

.movie-card p,
.related-card p,
.category-tile p,
.category-overview p,
.story-card p,
.footer-grid p {
  margin: 0;
  color: var(--muted);
}

.tag-row {
  margin-top: 14px;
}

.tag-row span {
  padding: 5px 9px;
  color: #475569;
  background: #f1f5f9;
}

.featured-grid .movie-card:first-child {
  grid-column: span 2;
}

.featured-grid .movie-card:first-child .poster-link {
  height: 360px;
}

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

.category-tile,
.category-overview {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  border-radius: 26px;
  padding: 24px;
  color: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.category-tile:before,
.category-overview:before,
.page-hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 15%, rgba(255, 255, 255, 0.22), transparent 30%);
  pointer-events: none;
}

.category-tile a,
.category-overview a {
  position: relative;
  z-index: 1;
  display: block;
}

.category-tile span,
.category-overview span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.category-tile h3,
.category-overview h2 {
  margin: 12px 0 10px;
  font-size: 26px;
  line-height: 1.1;
}

.category-tile p,
.category-overview p {
  color: rgba(255, 255, 255, 0.78);
}

.category-tile.cyan,
.category-overview.cyan,
.category-hero.cyan {
  background: linear-gradient(135deg, #0891b2, #1d4ed8);
}

.category-tile.violet,
.category-overview.violet,
.category-hero.violet {
  background: linear-gradient(135deg, #6d28d9, #312e81);
}

.category-tile.orange,
.category-overview.orange,
.category-hero.orange {
  background: linear-gradient(135deg, #f97316, #9a3412);
}

.category-tile.pink,
.category-overview.pink,
.category-hero.pink {
  background: linear-gradient(135deg, #db2777, #9f1239);
}

.category-tile.green,
.category-overview.green,
.category-hero.green {
  background: linear-gradient(135deg, #16a34a, #0f766e);
}

.category-tile.blue,
.category-overview.blue,
.category-hero.blue {
  background: linear-gradient(135deg, #2563eb, #155e75);
}

.category-tile.amber,
.category-overview.amber,
.category-hero.amber {
  background: linear-gradient(135deg, #d97706, #92400e);
}

.category-tile.slate,
.category-overview.slate,
.category-hero.slate {
  background: linear-gradient(135deg, #334155, #020617);
}

.mini-links {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 700;
}

.category-covers {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  height: 112px;
  margin-bottom: 18px;
}

.category-covers img {
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.18);
}

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

.compact-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
}

.compact-card .poster-link {
  height: 190px;
}

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

.search-panel {
  margin: -8px 0 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.search-panel label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 800;
}

.search-panel input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  outline: none;
}

.search-panel input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.filter-row {
  margin: 0 0 26px;
}

.filter-chip {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #334155;
  background: #fff;
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
}

.hidden-by-search {
  display: none !important;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1d4ed8 58%, #0891b2);
}

.page-hero .container {
  position: relative;
  z-index: 1;
  padding: 84px 0;
}

.small-hero .container {
  padding: 74px 0;
}

.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

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

.detail-hero {
  background: linear-gradient(135deg, #020617, #0f172a 46%, #155e75);
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 74px 0;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  height: 460px;
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.42);
  background: linear-gradient(135deg, #0f172a, #155e75);
}

.detail-poster span {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(90deg, #f97316, #dc2626);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.detail-meta-grid span {
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.08);
}

.detail-meta-grid strong {
  display: block;
  margin-bottom: 4px;
  color: #67e8f9;
  font-size: 12px;
}

.detail-tags {
  margin-top: 20px;
}

.detail-tags a {
  padding: 7px 12px;
  color: #cffafe;
  background: rgba(6, 182, 212, 0.18);
  border: 1px solid rgba(103, 232, 249, 0.18);
}

.player-section {
  padding-top: 54px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.22);
}

.movie-player {
  display: block;
  width: 100%;
  height: 560px;
  background: #020617;
  object-fit: contain;
}

.player-trigger {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.2));
  cursor: pointer;
}

.player-shell.is-started .player-trigger {
  opacity: 0;
  pointer-events: none;
}

.player-icon {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  padding-left: 6px;
  color: #fff;
  font-size: 32px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.36);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
}

.story-card {
  padding: 30px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.story-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.story-card p {
  font-size: 17px;
}

.accent-card {
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

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

.related-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.related-card > a {
  position: relative;
  display: block;
  height: 190px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #155e75);
}

.related-card > a span {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: var(--orange);
}

.related-card h3 {
  margin: 14px 14px 8px;
  font-size: 16px;
  line-height: 1.35;
}

.related-card p {
  margin: 0 14px 16px;
  font-size: 13px;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 58px 0 34px;
}

.footer-brand {
  margin-bottom: 12px;
  color: #fff;
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 18px;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.footer-grid a:hover {
  color: #67e8f9;
}

.footer-bottom {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 22px 16px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.image-missing {
  opacity: 0;
}

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

  .wide-ranking,
  .ranking-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 860px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .mobile-nav.is-open {
    display: block;
  }

  .hero-slider {
    min-height: 760px;
  }

  .hero-inner,
  .detail-layout,
  .content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 320px;
    height: 420px;
    margin: 0 auto;
  }

  .detail-poster {
    max-width: 320px;
    height: 440px;
  }

  .detail-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .featured-grid .movie-card:first-child {
    grid-column: auto;
  }

  .featured-grid .movie-card:first-child .poster-link,
  .poster-link {
    height: 250px;
  }

  .compact-card {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .compact-card .poster-link {
    height: 170px;
  }

  .player-shell,
  .movie-player {
    min-height: 360px;
    height: 360px;
  }
}

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

  .brand,
  .footer-brand {
    font-size: 20px;
  }

  .hero-slider {
    min-height: 820px;
  }

  .hero-inner {
    gap: 32px;
    padding: 64px 0 86px;
  }

  .hero-control {
    display: none;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .category-grid,
  .category-overview-grid,
  .ranking-list,
  .wide-ranking,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .page-hero .container,
  .detail-layout {
    padding: 54px 0;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
}
