:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #06b6d4;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --white: #ffffff;
  --footer: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  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: var(--ink);
  background: #f9fafb;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-text {
  white-space: nowrap;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #374151;
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--blue);
  background: #eff6ff;
}

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

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--blue);
  border-radius: 10px;
}

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

.hero-stage,
.hero-slide,
.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.58) 46%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 690px;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 12px;
  color: var(--white);
  background: var(--blue);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 19px;
  max-width: 620px;
}

.hero-meta,
.ranking-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #d1d5db;
  font-size: 14px;
}

.hero-meta span,
.ranking-meta span,
.card-meta span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

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

.primary-button,
.ghost-button,
.section-link,
.ranking-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 24px;
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.3);
}

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

.ghost-button {
  min-height: 46px;
  padding: 0 22px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

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

.ghost-button.light {
  color: var(--blue);
  background: #eff6ff;
  border-color: #dbeafe;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.45);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.7);
}

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

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

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

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

.hero-dots button.is-active {
  width: 38px;
  background: var(--white);
}

.content-section {
  padding: 54px 0;
}

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

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

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

.section-link {
  padding: 10px 16px;
  color: var(--blue);
  background: #eff6ff;
}

.section-link:hover {
  background: #dbeafe;
  transform: translateY(-2px);
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  gap: 22px;
  overflow-x: auto;
  padding: 8px 2px 18px;
  scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
  scroll-snap-align: start;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

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

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

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  color: var(--white);
  background: rgba(37, 99, 235, 0.92);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.card-body h3 a:hover {
  color: var(--blue);
}

.card-meta {
  margin-bottom: 10px;
  color: var(--muted);
}

.card-meta span {
  background: #f3f4f6;
  color: #4b5563;
}

.card-line {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--blue);
  background: #eff6ff;
  font-size: 12px;
  font-weight: 700;
}

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

.movie-card.compact .card-body h3 {
  font-size: 15px;
}

.movie-card.compact .card-line,
.movie-card.compact .card-meta,
.movie-card.compact .tag-row {
  display: none;
}

.category-strip {
  padding: 54px 0;
  background: var(--white);
}

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

.category-tile,
.category-card {
  display: block;
  padding: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, border 0.2s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-5px);
  border-color: #bfdbfe;
}

.category-tile span,
.category-index {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--blue);
  font-weight: 900;
}

.category-tile h3,
.category-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile p,
.category-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.category-tile div,
.category-samples {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: #374151;
}

.category-tile div a,
.category-samples a {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-tile div a:hover,
.category-samples a:hover {
  color: var(--blue);
}

.category-card strong {
  display: inline-flex;
  margin-top: 16px;
  color: var(--blue);
}

.page-main {
  background: #f9fafb;
}

.page-hero {
  padding: 70px 0 56px;
  color: var(--white);
  background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.48), transparent 32%), linear-gradient(135deg, #111827 0%, #1e3a8a 100%);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.04em;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #dbeafe;
  font-size: 14px;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.filter-bar label {
  display: grid;
  gap: 6px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  color: var(--ink);
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.ranking-preview,
.ranking-list {
  display: grid;
  gap: 14px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 84px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.ranking-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

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

.ranking-number {
  color: var(--blue);
  font-size: 30px;
  font-weight: 900;
  text-align: center;
}

.ranking-content h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.ranking-content h3 a:hover {
  color: var(--blue);
}

.ranking-content p {
  margin: 0 0 10px;
  color: #4b5563;
}

.ranking-action {
  padding: 9px 16px;
  color: var(--white);
  background: var(--blue);
}

.detail-hero {
  padding: 54px 0;
  color: var(--white);
  background: radial-gradient(circle at 12% 10%, rgba(37, 99, 235, 0.65), transparent 30%), linear-gradient(135deg, #0f172a, #111827 48%, #1e3a8a);
}

.detail-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.45);
  background: #111827;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.detail-line {
  max-width: 760px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 19px;
}

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

.meta-grid div {
  padding: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
}

.meta-grid dt {
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 800;
}

.meta-grid dd {
  margin: 3px 0 0;
  color: var(--white);
  font-weight: 800;
}

.player-section {
  padding: 50px 0 28px;
}

.player-section h2,
.story-card h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  align-content: center;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  border: 0;
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.play-circle {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  font-size: 30px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.player-overlay strong {
  font-size: 20px;
}

.story-section {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 24px;
  padding: 22px 0 30px;
}

.story-card {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.story-card p {
  margin: 0 0 14px;
  color: #374151;
}

.site-footer {
  margin-top: 50px;
  color: #94a3b8;
  background: var(--footer);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 44px 0;
}

.footer-logo {
  color: var(--white);
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.site-footer a {
  display: block;
  margin: 8px 0;
}

.site-footer a:hover {
  color: var(--white);
}

.footer-bottom {
  padding: 18px 0;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

[hidden] {
  display: none !important;
}

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

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

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

  .detail-grid,
  .story-section,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .header-inner {
    height: 64px;
  }

  .brand-text {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    padding: 12px 14px;
  }

  .hero {
    height: 620px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-control {
    top: auto;
    bottom: 22px;
    width: 42px;
    height: 42px;
    font-size: 28px;
  }

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

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

  .hero-dots {
    bottom: 38px;
  }

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

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

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

  .ranking-card {
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: start;
  }

  .ranking-number {
    position: absolute;
    margin-left: 8px;
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    font-size: 22px;
  }

  .ranking-action {
    grid-column: 2;
    width: max-content;
  }

  .ranking-content p,
  .ranking-meta {
    display: none;
  }

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

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

  .story-card {
    padding: 22px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .category-grid,
  .category-cards,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .scroll-row {
    grid-auto-columns: 82%;
  }

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

  .primary-button,
  .ghost-button {
    width: 100%;
  }
}
