:root {
  --primary: #f3ab3c;
  --primary-dark: #f19d36;
  --accent: #ff835c;
  --secondary-900: #102a43;
  --secondary-800: #243b53;
  --secondary-700: #334e68;
  --secondary-600: #486581;
  --secondary-500: #627d98;
  --secondary-100: #d9e2ec;
  --surface: #ffffff;
  --page: #f7fafc;
  --muted: #829ab1;
  --shadow-soft: 0 2px 15px rgba(0, 0, 0, 0.08);
  --shadow-strong: 0 8px 40px rgba(0, 0, 0, 0.16);
  --shadow-glow: 0 0 20px rgba(243, 171, 60, 0.3);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--secondary-800);
  background: var(--page);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.nav-wrap {
  max-width: 1180px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--secondary-800);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow-glow);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary-600);
}

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

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

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--secondary-700);
}

.hero {
  position: relative;
  background: var(--secondary-900);
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

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

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

.hero-slide > img,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 42, 67, 0.95) 0%, rgba(16, 42, 67, 0.72) 42%, rgba(16, 42, 67, 0.12) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  min-height: 620px;
  margin: 0 auto;
  padding: 90px 20px 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
}

.hero-line {
  max-width: 720px;
  margin: 0 0 18px;
  color: #d9e2ec;
  font-size: 20px;
}

.hero-meta {
  margin: 0 0 18px;
  color: #f8fafc;
  font-weight: 600;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

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

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow-glow);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
  width: 32px;
  background: var(--primary);
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 6;
  width: min(760px, calc(100% - 36px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-strong);
  transform: translateX(-50%);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  color: var(--secondary-800);
  outline: none;
}

.hero-search input {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
}

.hero-search button {
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 800;
  cursor: pointer;
}

.hero-cats {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 20px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-cats a {
  padding: 8px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.content-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 20px;
}

.white-section,
.category-section {
  max-width: none;
  padding-left: max(20px, calc((100vw - 1180px) / 2));
  padding-right: max(20px, calc((100vw - 1180px) / 2));
  background: #ffffff;
}

.split-section {
  background: var(--page);
}

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

.section-head h2,
.strip-title h3,
.story-card h2 {
  margin: 0;
  color: var(--secondary-800);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.section-link,
.strip-title a,
.text-link {
  color: var(--primary-dark);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster,
.detail-poster,
.ranking-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--secondary-100), #ffffff);
}

.poster {
  aspect-ratio: 3 / 4;
}

.poster img,
.detail-poster img,
.ranking-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge,
.card-rank {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.poster-badge {
  left: 10px;
  bottom: 10px;
  padding: 4px 9px;
  background: rgba(16, 42, 67, 0.78);
}

.card-rank {
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--accent);
}

.movie-info {
  padding: 14px;
}

.movie-info h3 {
  margin: 0 0 6px;
  color: var(--secondary-800);
  font-size: 16px;
  line-height: 1.35;
}

.meta-line {
  margin: 0 0 8px;
  color: var(--secondary-500);
  font-size: 13px;
}

.card-desc {
  margin: 0 0 12px;
  color: var(--secondary-600);
  font-size: 14px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-info .tag-row span {
  color: var(--secondary-700);
  background: #f1f5f9;
}

.movie-rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 2px 24px;
}

.rail-item {
  width: 248px;
  flex: 0 0 248px;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-row span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 900;
}

.rank-row em {
  color: var(--secondary-500);
  font-style: normal;
  font-size: 13px;
}

.category-strip + .category-strip {
  margin-top: 56px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: var(--secondary-900);
  color: #ffffff;
}

.small-hero {
  padding: 72px 20px;
}

.small-hero > div {
  max-width: 1180px;
  margin: 0 auto;
}

.small-hero h1,
.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.small-hero p:last-child {
  max-width: 760px;
  margin: 0;
  color: #d9e2ec;
}

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

.category-card-large {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.category-card-large h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-card-large p {
  color: var(--secondary-600);
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
}

.category-samples a {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--secondary-700);
  font-size: 13px;
  font-weight: 700;
}

.filter-panel {
  max-width: 1180px;
  margin: 28px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(150px, 0.55fr));
  gap: 12px;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
}

.ranking-list-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 46px 20px 70px;
  display: grid;
  gap: 18px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 22px;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.ranking-poster {
  aspect-ratio: 3 / 4;
  border-radius: 18px;
}

.ranking-poster span {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 900;
}

.ranking-card h2 {
  margin: 6px 0 10px;
}

.detail-hero {
  min-height: 560px;
}

.detail-wrap {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 20px 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  color: #d9e2ec;
  font-size: 14px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
}

.detail-copy {
  max-width: 780px;
}

.detail-line {
  margin: 0 0 18px;
  color: #e2e8f0;
  font-size: 20px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.detail-tags {
  margin-bottom: 26px;
}

.watch-section {
  max-width: 1180px;
  margin: -54px auto 0;
  padding: 0 20px 54px;
  position: relative;
  z-index: 4;
}

.watch-player {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow-strong);
  aspect-ratio: 16 / 9;
}

.watch-player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(16, 42, 67, 0.28), rgba(16, 42, 67, 0.78));
  cursor: pointer;
}

.play-layer.is-hidden {
  display: none;
}

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow-glow);
  font-size: 30px;
}

.play-layer strong {
  font-size: 28px;
}

.play-layer em {
  font-style: normal;
  color: #e2e8f0;
}

.detail-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.story-card {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.story-card p {
  margin-bottom: 0;
  color: var(--secondary-600);
}

.site-footer {
  color: #d9e2ec;
  background: var(--secondary-900);
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 20px 36px;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 32px;
}

.footer-brand {
  color: #ffffff;
  margin-bottom: 14px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 16px;
}

.site-footer p {
  color: #bcccdc;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 20px;
  text-align: center;
  color: #bcccdc;
}

[hidden] {
  display: none !important;
}

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

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
  }

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

  .nav-links a {
    padding: 14px 22px;
    border-top: 1px solid #f1f5f9;
  }

  .hero-slider,
  .hero-copy {
    min-height: 560px;
  }

  .hero-copy {
    padding-top: 70px;
    padding-bottom: 160px;
  }

  .hero-line {
    font-size: 17px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }

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

  .rank-list,
  .category-overview,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row em {
    grid-column: 2;
  }

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

  .detail-poster {
    max-width: 240px;
  }

  .ranking-card {
    grid-template-columns: 96px 1fr;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 18px;
  }

  .hero h1,
  .small-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

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

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .mini-grid,
  .full-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .movie-info {
    padding: 12px;
  }

  .card-desc,
  .movie-info .tag-row {
    display: none;
  }

  .watch-section {
    margin-top: -30px;
  }

  .watch-player {
    border-radius: 20px;
  }

  .play-icon {
    width: 58px;
    height: 58px;
    font-size: 22px;
  }

  .play-layer strong {
    padding: 0 18px;
    font-size: 20px;
    text-align: center;
  }
}
