:root {
  --bg: #f8fafc;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.28);
  --amber: #d97706;
  --blue: #2563eb;
  --cyan: #0891b2;
  --red: #dc2626;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 48%, #fff7ed 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(217, 119, 6, 0.16);
}

.nav-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #2563eb);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

.brand-text strong,
.footer-brand {
  display: block;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(90deg, #d97706, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--amber);
}

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

.top-search input,
.mobile-search input,
.large-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid rgba(217, 119, 6, 0.22);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  min-width: 220px;
  color: #0f172a;
}

.top-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.top-search button,
.mobile-search button,
.large-search button,
.primary-btn,
.outline-btn {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #2563eb);
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.24);
}

.secondary-btn {
  border-radius: 999px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.46);
  padding: 11px 18px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: rgba(245, 158, 11, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 20px;
  color: #92400e;
}

.mobile-nav {
  display: none;
  padding: 8px 22px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

.mobile-search {
  display: flex;
  gap: 8px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 440px);
  gap: 48px;
  align-items: center;
  padding: 110px max(22px, calc((100vw - 1240px) / 2)) 84px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(24px) saturate(1.2);
  transform: scale(1.12);
  opacity: 0.38;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.36), transparent 34%),
    radial-gradient(circle at 76% 22%, rgba(37, 99, 235, 0.42), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.54));
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-head p,
.page-hero p,
.ranking-panel p {
  margin: 0 0 12px;
  color: #f59e0b;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
  line-height: 1.85;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.13);
  color: #b45309;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

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

.hero-poster {
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.46);
  transform: rotate(2deg);
}

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

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

.hero-dot {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.active {
  background: #f59e0b;
}

.section-wrap,
.page-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 22px;
}

.intro-search {
  padding-top: 34px;
  padding-bottom: 22px;
}

.large-search {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 30px;
  box-shadow: var(--soft-shadow);
}

.large-search input {
  flex: 1;
  min-width: 0;
  border: 0;
}

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

.section-head.compact {
  align-items: center;
}

.section-head h2,
.page-hero h1,
.ranking-panel h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  background: linear-gradient(90deg, #dc2626, #f59e0b, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head a {
  color: var(--amber);
  font-weight: 900;
}

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

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

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

.movie-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster {
  position: relative;
  display: block;
  background: #e2e8f0;
  overflow: hidden;
}

.poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(8px);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2 {
  margin: 8px 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  color: #64748b;
  line-height: 1.65;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--tile-image);
  background-size: cover;
  background-position: center;
  opacity: 0.45;
  transition: transform 0.35s ease;
}

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

.category-tile:hover::before {
  transform: scale(1.08);
}

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

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.55;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  border-radius: 30px;
  padding: 26px;
  color: #ffffff;
  background: linear-gradient(160deg, #111827, #1e293b 48%, #92400e);
  box-shadow: var(--shadow);
}

.ranking-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.ranking-list strong {
  color: #fbbf24;
}

.ranking-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-list em {
  color: rgba(255, 255, 255, 0.55);
  font-style: normal;
}

.page-main {
  padding-top: 42px;
}

.page-hero {
  border-radius: 34px;
  padding: 54px;
  background:
    radial-gradient(circle at 18% 10%, rgba(245, 158, 11, 0.20), transparent 32%),
    radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.22), transparent 32%),
    rgba(255, 255, 255, 0.82);
  box-shadow: var(--soft-shadow);
  border: 1px solid var(--line);
}

.lead-text {
  max-width: 860px;
  color: #475569;
  line-height: 1.8;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 14px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.filter-panel input,
.filter-panel select {
  min-width: 0;
  width: 100%;
}

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

.mini-card {
  display: grid;
  gap: 8px;
  border-radius: 18px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--soft-shadow);
}

.mini-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.mini-card span {
  font-weight: 900;
}

.mini-card small {
  color: var(--muted);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 66px 90px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.rank-num {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
}

.rank-poster img {
  width: 86px;
  height: 116px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-row h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-row p {
  color: #64748b;
  margin: 0 0 10px;
  line-height: 1.6;
}

.outline-btn {
  box-shadow: none;
}

.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #64748b;
  font-weight: 800;
  margin-bottom: 20px;
}

.breadcrumb a {
  color: #2563eb;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 36px;
  padding: 34px;
  border-radius: 34px;
  color: #ffffff;
  background:
    radial-gradient(circle at 12% 10%, rgba(245, 158, 11, 0.36), transparent 32%),
    radial-gradient(circle at 82% 16%, rgba(37, 99, 235, 0.36), transparent 32%),
    linear-gradient(135deg, #111827, #1e293b);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
}

.detail-line {
  color: rgba(255, 255, 255, 0.82);
  font-size: 19px;
  line-height: 1.85;
}

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

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow);
}

.video-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.48));
  cursor: pointer;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  font-size: 32px;
  background: linear-gradient(135deg, #f59e0b, #2563eb);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 34px;
}

.content-card {
  border-radius: 26px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-card p {
  color: #475569;
  line-height: 1.9;
  margin: 0;
}

.info-table {
  grid-column: 1 / -1;
}

.info-table dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.info-table div {
  border-radius: 18px;
  padding: 16px;
  background: #f8fafc;
}

.info-table dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.info-table dd {
  margin: 6px 0 0;
  font-weight: 900;
}

.related-wrap {
  padding-left: 0;
  padding-right: 0;
}

.site-footer {
  margin-top: 54px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #1e293b 52%, #0f172a);
}

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

.footer-grid p {
  color: #94a3b8;
  line-height: 1.8;
}

.footer-grid h2 {
  color: #ffffff;
  font-size: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  border-radius: 999px;
  padding: 8px 12px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
}

.is-filter-hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .feature-grid,
  .latest-grid,
  .catalog-grid,
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .split-section {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .nav-wrap {
    gap: 12px;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 86px 22px 86px;
  }

  .hero-poster {
    max-width: 320px;
    transform: none;
  }

  .feature-grid,
  .latest-grid,
  .catalog-grid,
  .related-grid,
  .category-grid,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-hero,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .info-table dl {
    grid-template-columns: 1fr 1fr;
  }

  .rank-row {
    grid-template-columns: 48px 72px minmax(0, 1fr);
  }

  .rank-row .outline-btn {
    grid-column: 1 / -1;
    text-align: center;
  }
}

@media (max-width: 540px) {
  .brand {
    min-width: 0;
  }

  .brand-text small {
    display: none;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .large-search,
  .mobile-search {
    flex-direction: column;
  }

  .feature-grid,
  .latest-grid,
  .catalog-grid,
  .related-grid,
  .category-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-hero {
    padding: 26px;
    border-radius: 26px;
  }

  .info-table dl {
    grid-template-columns: 1fr;
  }
}
