:root {
  --page-bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --cyan: #06b6d4;
  --dark: #020617;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page-bg);
  color: var(--text);
  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;
  max-width: 100%;
}

img.is-hidden {
  opacity: 0;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.24);
}

.brand-mark svg path:first-child {
  fill: currentColor;
  opacity: 0.95;
}

.brand-mark svg path:last-child {
  fill: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 15px;
  font-weight: 700;
  color: #334155;
}

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

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

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

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

.hero {
  position: relative;
  height: 590px;
  overflow: hidden;
  background: #020617;
}

.hero-stage,
.hero-slide,
.hero-slide img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 22% 25%, rgba(59, 130, 246, 0.8), transparent 26%), linear-gradient(135deg, #111827, #0f172a 50%, #1d4ed8);
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.64) 48%, rgba(15, 23, 42, 0.12));
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
  height: 100%;
  margin: 0 auto;
  padding: 0 22px;
  color: #ffffff;
}

.hero-kicker {
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 6px 14px;
  background: var(--primary);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-line {
  max-width: 680px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: 19px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
  color: #cbd5e1;
}

.hero-meta span,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 13px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.ghost-button,
.section-more,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.24);
}

.primary-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

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

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.52);
  border-radius: 999px;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 18px;
  height: 5px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.intro-strip,
.content-section,
.detail-hero,
.player-section,
.detail-content,
.detail-nav,
.breadcrumb {
  max-width: 1180px;
  margin: 0 auto;
  padding-right: 22px;
  padding-left: 22px;
}

.intro-strip {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 24px;
  align-items: center;
  padding-top: 34px;
  padding-bottom: 34px;
}

.intro-strip h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
  margin: 0;
  color: var(--text);
  line-height: 1.15;
}

.intro-strip h2,
.section-head h2 {
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.intro-strip p,
.section-head p,
.page-hero p,
.detail-line,
.detail-content p {
  margin: 8px 0 0;
  color: var(--muted);
}

.quick-search {
  display: flex;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  color: #0f172a;
  background: #ffffff;
  border-radius: 12px;
  outline: none;
}

.quick-search input {
  border: 0;
  padding: 0 14px;
}

.quick-search button {
  min-width: 86px;
  border: 0;
  color: #ffffff;
  background: var(--primary);
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}

.content-section {
  padding-top: 58px;
  padding-bottom: 58px;
}

.soft-section {
  max-width: none;
  padding-right: max(22px, calc((100vw - 1180px) / 2 + 22px));
  padding-left: max(22px, calc((100vw - 1180px) / 2 + 22px));
  background: var(--surface-soft);
}

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

.section-more,
.text-link {
  min-height: 38px;
  color: var(--primary);
  background: #dbeafe;
}

.section-more:hover,
.text-link:hover {
  color: #ffffff;
  background: var(--primary);
}

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

.horizontal-scroll {
  display: grid;
  grid-auto-columns: minmax(250px, 300px);
  grid-auto-flow: column;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
}

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: radial-gradient(circle at 20% 18%, rgba(6, 182, 212, 0.8), transparent 28%), linear-gradient(135deg, #1e293b, #0f172a 55%, #2563eb);
}

.movie-card-large .poster-frame {
  aspect-ratio: 4 / 5;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.2s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 9px;
  color: #ffffff;
  background: var(--primary);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgba(2, 6, 23, 0.46);
  font-size: 38px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.play-hover::before {
  content: "";
  position: absolute;
  width: 68px;
  height: 68px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
}

.play-hover {
  isolation: isolate;
}

.play-hover::before {
  z-index: -1;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

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

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.movie-card .movie-tags span,
.detail-tags span {
  color: var(--primary);
  background: #eff6ff;
  border-color: #bfdbfe;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 52px;
  margin: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card h3 a:hover {
  color: var(--primary);
}

.movie-card p {
  display: -webkit-box;
  min-height: 44px;
  margin: 9px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
  color: var(--muted-2);
  font-size: 12px;
}

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

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

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #0f172a 68%);
  border-radius: var(--radius);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.16);
}

.category-tile strong {
  position: relative;
  display: block;
  font-size: 24px;
  line-height: 1.2;
}

.category-tile p,
.category-tile em {
  position: relative;
  display: block;
  margin: 10px 0 0;
  color: #dbeafe;
  font-style: normal;
}

.category-glow {
  position: absolute;
  right: -28px;
  bottom: -28px;
  width: 100px;
  height: 100px;
  background: rgba(6, 182, 212, 0.72);
  border-radius: 999px;
  filter: blur(18px);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 48px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-cover {
  overflow: hidden;
  width: 72px;
  height: 96px;
  background: linear-gradient(135deg, #1e293b, #2563eb);
  border-radius: 12px;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-number {
  color: var(--primary);
  font-size: 26px;
  font-weight: 900;
}

.rank-info h3 {
  margin: 0;
  font-size: 18px;
}

.rank-info p {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero {
  color: #ffffff;
  background: radial-gradient(circle at 18% 22%, rgba(6, 182, 212, 0.6), transparent 28%), linear-gradient(135deg, #020617, #1d4ed8);
}

.page-hero > div {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 22px;
}

.small-hero > div,
.category-hero > div {
  padding-top: 78px;
  padding-bottom: 78px;
}

.page-hero span {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 12px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-weight: 800;
}

.page-hero h1 {
  color: #ffffff;
  font-size: clamp(36px, 6vw, 58px);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 720px;
  color: #dbeafe;
  font-size: 18px;
}

.filter-section {
  padding-top: 38px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 18px;
  margin-bottom: 26px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-bar label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-bar input,
.filter-bar select {
  padding: 0 12px;
}

.link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.link-cloud a {
  padding: 10px 14px;
  color: var(--primary);
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 24px;
  padding-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 330px) 1fr;
  gap: 34px;
  align-items: center;
  padding-top: 22px;
  padding-bottom: 52px;
}

.detail-poster {
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin-top: 8px;
  font-size: clamp(34px, 6vw, 58px);
  letter-spacing: -0.05em;
}

.detail-line {
  max-width: 790px;
  font-size: 18px;
}

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

.detail-meta div {
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.detail-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-meta dd {
  margin: 4px 0 0;
  color: #0f172a;
  font-weight: 900;
}

.player-section {
  padding-top: 18px;
  padding-bottom: 48px;
}

.video-player {
  position: relative;
  overflow: hidden;
  background: #020617;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.video-play-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--primary);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.58));
  cursor: pointer;
}

.video-play-button span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding-left: 5px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  font-size: 38px;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.34);
}

.video-player.is-playing .video-play-button {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 10px;
  padding-bottom: 58px;
}

.detail-content article {
  padding: 26px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.detail-content h2 {
  font-size: 24px;
}

.detail-content p {
  font-size: 16px;
}

.detail-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 0;
  padding-bottom: 58px;
}

.detail-nav a {
  flex: 1;
  padding: 16px;
  color: var(--primary);
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  font-weight: 800;
}

.site-footer {
  color: #cbd5e1;
  background: #020617;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 22px;
}

.footer-logo {
  color: #ffffff;
}

.footer-brand p {
  max-width: 620px;
  color: #94a3b8;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

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

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

[hidden] {
  display: none !important;
}

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

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

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

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

@media (max-width: 760px) {
  .site-nav {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 0 16px;
  }

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

  .nav-links a {
    padding: 11px 0;
    border-top: 1px solid var(--line);
  }

  .hero {
    height: 620px;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 92px;
  }

  .hero-arrow {
    display: none;
  }

  .intro-strip,
  .filter-bar,
  .detail-hero,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

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

  .rank-item {
    grid-template-columns: 58px 38px 1fr;
  }

  .rank-cover {
    width: 58px;
    height: 78px;
  }

  .rank-item .text-link {
    grid-column: 3;
    justify-self: start;
  }

  .detail-nav {
    flex-direction: column;
  }
}

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

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

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

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

  .hero-actions,
  .detail-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-search {
    flex-direction: column;
    gap: 8px;
  }

  .quick-search button {
    min-height: 44px;
  }

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