*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #111827;
  background: #f3f4f6;
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #ffffff;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  box-shadow: 0 12px 30px rgba(29, 78, 216, 0.24);
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand {
  font-size: 22px;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #2563eb;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.main-nav a,
.nav-dropdown > a {
  font-weight: 650;
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav .is-active {
  color: #dbeafe;
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 14px);
  min-width: 190px;
  padding: 8px;
  color: #1f2937;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  color: #374151;
}

.dropdown-menu a:hover {
  color: #2563eb;
  background: #eff6ff;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-search {
  position: relative;
  margin-left: auto;
  flex: 1;
  max-width: 420px;
}

.header-search input {
  width: 100%;
  height: 40px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  color: #ffffff;
  padding: 0 46px 0 18px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.header-search input::placeholder {
  color: rgba(219, 234, 254, 0.95);
}

.header-search button {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: #2563eb;
  background: #ffffff;
  cursor: pointer;
  transform: translateY(-50%);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  padding: 8px 11px;
  cursor: pointer;
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.hero-slider,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 20%, rgba(59, 130, 246, 0.36), transparent 38%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.72) 43%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.82), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  align-content: center;
  max-width: 1180px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
  background: #dc2626;
  box-shadow: 0 10px 26px rgba(220, 38, 38, 0.35);
}

.hero h1,
.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 670px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
}

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

.btn-primary {
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.34);
}

.btn-light {
  color: #1d4ed8;
  background: #ffffff;
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  right: min(48px, 5vw);
  bottom: 38px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: 0.2s ease;
}

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

.section {
  padding: 56px 0;
}

.section-white {
  background: #ffffff;
}

.section-gray {
  background: #f3f4f6;
}

.section-warm {
  color: #ffffff;
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.section-green {
  color: #ffffff;
  background: linear-gradient(135deg, #22c55e, #0d9488);
}

.section-blue {
  color: #ffffff;
  background: linear-gradient(90deg, #2563eb, #0891b2);
}

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

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-subtitle {
  max-width: 720px;
  margin: 8px 0 0;
  color: #6b7280;
}

.section-warm .section-subtitle,
.section-green .section-subtitle,
.section-blue .section-subtitle {
  color: rgba(255, 255, 255, 0.82);
}

.scroller-wrap {
  position: relative;
}

.scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.scroll-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: 0.2s ease;
}

.scroll-button:hover {
  background: rgba(255, 255, 255, 0.34);
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card,
.list-card,
.category-card,
.info-panel,
.rank-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover,
.list-card:hover,
.category-card:hover,
.rank-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.poster-link img,
.list-poster img,
.detail-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  max-width: calc(100% - 24px);
  padding: 5px 10px;
  border-radius: 999px;
  color: #1d4ed8;
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

.card-body {
  padding: 16px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.meta-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  color: #4b5563;
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 700;
}

.movie-card h3,
.list-card h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.list-card h3 a:hover {
  color: #2563eb;
}

.movie-card p,
.list-card p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.genre-line {
  margin-top: 12px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 750;
}

.compact-card {
  scroll-snap-align: start;
}

.section-warm .movie-card,
.section-green .movie-card {
  background: rgba(255, 255, 255, 0.96);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.filter-bar button {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: #374151;
  background: #ffffff;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.filter-bar button.is-active {
  color: #ffffff;
  background: #2563eb;
}

.list-stack {
  display: grid;
  gap: 18px;
}

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

.list-poster {
  display: block;
  min-height: 180px;
  overflow: hidden;
}

.list-body {
  padding: 22px;
}

.text-link {
  margin-top: 14px;
  color: #2563eb;
}

.page-hero {
  padding: 58px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 85% 0%, rgba(34, 211, 238, 0.28), transparent 34%),
    linear-gradient(135deg, #1d4ed8, #111827);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  min-height: 220px;
}

.category-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 24px;
  color: #111827;
}

.category-card p {
  margin: 0 0 22px;
  color: #6b7280;
}

.category-card .btn {
  margin-top: auto;
  width: fit-content;
}

.tool-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.local-filter {
  width: min(100%, 430px);
  height: 44px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  outline: 0;
  padding: 0 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.empty-note {
  display: none;
  padding: 24px;
  border-radius: 18px;
  color: #4b5563;
  background: #ffffff;
}

.empty-note.is-visible {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: #2563eb;
}

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

.player-section {
  padding: 30px 0 0;
  background: #111827;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.35);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(37, 99, 235, 0.3), rgba(2, 6, 23, 0.42)),
    rgba(2, 6, 23, 0.26);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  font-size: 34px;
  color: #2563eb;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.4);
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.detail-main {
  padding: 34px 0 58px;
}

.content-panel {
  padding: 28px;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.content-panel h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
}

.content-panel h2 {
  margin: 30px 0 12px;
  font-size: 24px;
}

.content-panel p {
  color: #4b5563;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
}

.tag-cloud span {
  padding: 6px 11px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 13px;
  font-weight: 750;
}

.info-panel {
  padding: 18px;
}

.detail-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #dbeafe;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f3f4f6;
  color: #4b5563;
  font-size: 14px;
}

.info-list strong {
  color: #111827;
  white-space: nowrap;
}

.related-grid {
  margin-top: 24px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 82px 92px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px;
}

.rank-number {
  color: #ef4444;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-card img {
  height: 112px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-card h3 {
  margin: 0 0 6px;
}

.rank-card p {
  margin: 0;
  color: #6b7280;
}

.search-panel {
  padding: 26px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.search-panel form {
  display: flex;
  gap: 12px;
}

.search-panel input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 0 18px;
  outline: 0;
}

.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: #ffffff;
  background: #2563eb;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 980px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 0 14px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 8px;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a,
  .nav-dropdown > a {
    padding: 10px 0;
  }

  .dropdown-menu {
    position: static;
    display: grid;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    margin: 8px 0;
  }

  .header-search {
    order: 4;
    max-width: none;
    flex-basis: 100%;
    margin-left: 0;
  }

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

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

  .info-panel {
    order: -1;
  }
}

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

  .hero {
    height: 520px;
  }

  .hero-copy {
    padding-top: 30px;
  }

  .hero-dots {
    left: 18px;
    right: auto;
    bottom: 24px;
  }

  .section {
    padding: 42px 0;
  }

  .section-head,
  .tool-row {
    align-items: stretch;
    flex-direction: column;
  }

  .grid-5,
  .grid-4,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .list-card {
    grid-template-columns: 1fr;
  }

  .list-poster {
    aspect-ratio: 16 / 9;
  }

  .rank-card {
    grid-template-columns: 52px 72px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-card img {
    height: 92px;
  }

  .search-panel form {
    flex-direction: column;
  }
}
