:root {
  --page-bg: #f9fafb;
  --card-bg: #ffffff;
  --text-main: #111827;
  --text-soft: #4b5563;
  --text-muted: #6b7280;
  --line: #e5e7eb;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --blue: #2563eb;
  --sky: #38bdf8;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text-main);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.86);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 12px 24px rgba(13, 148, 136, 0.28);
}

.brand-name {
  font-size: 24px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--teal);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.inline-filter input,
.search-panel input {
  width: 230px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--text-main);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.inline-filter input:focus,
.search-panel input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.14);
}

.header-search button,
.search-panel button,
.primary-button,
.text-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.20);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.search-panel button:hover,
.primary-button:hover,
.text-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.26);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  padding: 12px 22px 20px;
  border-top: 1px solid #eef2f7;
  background: #ffffff;
}

.mobile-nav.is-open {
  display: grid;
  gap: 12px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-backdrop,
.category-hero::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(6, 15, 28, 0.92), rgba(6, 15, 28, 0.72), rgba(6, 15, 28, 0.35)),
    var(--hero-image);
  background-position: center;
  background-size: cover;
  filter: saturate(1.08);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(20, 184, 166, 0.32), transparent 36%),
    linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.38));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  min-height: 620px;
  margin: 0 auto;
  padding: 88px 22px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.55fr);
  align-items: center;
  gap: 50px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  border-radius: 999px;
  padding: 7px 13px;
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.16);
  border: 1px solid rgba(153, 246, 228, 0.32);
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-info p {
  max-width: 760px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-list,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.tag-list span,
.detail-tags a {
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--teal-dark);
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 700;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
}

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

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

.hero-dot.is-active {
  width: 30px;
  background: #ffffff;
}

.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 58px 22px;
}

.soft-panel {
  max-width: none;
  margin: 0;
  padding-left: max(22px, calc((100% - 1240px) / 2 + 22px));
  padding-right: max(22px, calc((100% - 1240px) / 2 + 22px));
  background: linear-gradient(135deg, #ecfeff, #eff6ff 55%, #ffffff);
}

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

.section-heading.stackable {
  align-items: center;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.7;
}

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

.horizontal-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 220px);
  gap: 18px;
  overflow-x: auto;
  padding: 8px 4px 20px;
  scroll-snap-type: x mandatory;
}

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

.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  scroll-snap-align: start;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(20, 184, 166, 0.42);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #ccfbf1);
}

.poster-link img {
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.play-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(13, 148, 136, 0.92);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 6px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 50px;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list {
  margin-top: 12px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transition: transform 0.35s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.88));
}

.category-card span,
.category-card small {
  position: relative;
  z-index: 1;
}

.category-card span {
  font-size: 24px;
  font-weight: 900;
}

.category-card small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.category-card:hover img {
  transform: scale(1.08);
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 10px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.rank-number {
  color: var(--teal-dark);
  font-size: 20px;
  font-weight: 900;
}

.rank-item img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-title {
  display: block;
  overflow: hidden;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item small {
  grid-column: 3;
  color: var(--text-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-hero {
  position: relative;
  max-width: 1240px;
  margin: 34px auto 0;
  overflow: hidden;
  border-radius: 32px;
  padding: 68px 36px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  box-shadow: var(--shadow);
}

.compact-hero {
  background:
    radial-gradient(circle at 10% 0%, rgba(45, 212, 191, 0.36), transparent 35%),
    linear-gradient(135deg, #0f172a, #0f766e 48%, #2563eb);
}

.category-hero::before {
  content: "";
  opacity: 0.42;
}

.page-hero > div {
  position: relative;
  z-index: 1;
}

.overview-list {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.category-cover-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 22px;
  background: #e5e7eb;
}

.category-cover-strip img {
  height: 170px;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 4px 0 10px;
  font-size: 26px;
  font-weight: 900;
}

.category-overview-card p {
  color: var(--text-soft);
  line-height: 1.8;
}

.text-button {
  display: inline-flex;
  width: fit-content;
  margin-top: 16px;
}

.breadcrumb {
  max-width: 1240px;
  margin: 24px auto 0;
  padding: 0 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--text-muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--teal-dark);
  font-weight: 700;
}

.detail-hero {
  max-width: 1240px;
  margin: 26px auto 0;
  padding: 34px 22px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #e0f2fe, #ccfbf1);
}

.detail-poster img {
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
}

.detail-info {
  border-radius: 32px;
  padding: 34px;
  color: #ffffff;
  background:
    radial-gradient(circle at 0% 0%, rgba(45, 212, 191, 0.34), transparent 34%),
    linear-gradient(135deg, #0f172a, #115e59 55%, #1d4ed8);
  box-shadow: var(--shadow);
}

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

.detail-meta div {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.10);
}

.detail-meta dt {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
}

.detail-meta dd {
  margin: 0;
  font-weight: 800;
}

.player-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 22px 42px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.30);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(15, 118, 110, 0.28), rgba(2, 6, 23, 0.78));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  color: #0f766e;
  background: #ffffff;
  font-size: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.30);
}

.player-overlay strong {
  max-width: 80%;
  font-size: clamp(20px, 4vw, 32px);
  text-align: center;
}

.detail-copy {
  max-width: 900px;
  padding-top: 18px;
}

.detail-copy h2 {
  margin: 28px 0 12px;
  font-size: 28px;
  font-weight: 900;
}

.detail-copy p {
  margin: 0 0 16px;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.9;
}

.search-panel {
  display: flex;
  gap: 10px;
  max-width: 640px;
  margin-top: 26px;
}

.search-panel input {
  flex: 1;
  width: auto;
}

.is-filtered-out {
  display: none !important;
}

.site-footer {
  margin-top: 50px;
  color: #d1d5db;
  background: #0f172a;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 22px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand {
  color: #ffffff;
  font-size: 24px;
}

.footer-inner p {
  max-width: 580px;
  margin: 12px 0 0;
  color: #9ca3af;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 22px;
  color: #9ca3af;
  text-align: center;
}

@media (max-width: 960px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-content,
  .detail-hero,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .hero-content {
    gap: 28px;
    padding-top: 64px;
  }

  .hero-poster {
    max-width: 280px;
    margin: 0 auto;
  }

  .detail-poster {
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 62px;
    padding: 0 16px;
  }

  .brand-name {
    font-size: 20px;
  }

  .hero-carousel,
  .hero-content {
    min-height: 680px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-info p {
    font-size: 16px;
  }

  .content-section,
  .soft-panel {
    padding: 42px 16px;
  }

  .section-heading,
  .section-heading.stackable,
  .footer-inner,
  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-filter input {
    width: 100%;
  }

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

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

  .page-hero {
    margin: 18px 16px 0;
    padding: 42px 22px;
    border-radius: 24px;
  }

  .detail-info {
    padding: 24px;
  }

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

  .player-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .video-shell {
    border-radius: 20px;
  }

  .category-cover-strip img {
    height: 122px;
  }

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