:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --panel: #ffffff;
  --soft: #f8fafc;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --orange: #f97316;
  --red: #ef4444;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f1f5f9;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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;
  color: #fff;
  background: linear-gradient(90deg, #2563eb, #0891b2);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1180px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.brand-symbol {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.35);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
}

.nav-link,
.nav-dropdown > button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  color: #fff;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-dropdown:hover > button {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 190px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.18s ease;
}

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

.dropdown-panel a,
.mobile-category-links a,
.mobile-link {
  display: block;
  border-radius: 12px;
  padding: 10px 12px;
}

.dropdown-panel a:hover {
  background: #eff6ff;
  color: var(--blue);
}

.site-search {
  position: relative;
  width: min(260px, 28vw);
}

.site-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.site-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  max-height: 380px;
  overflow: auto;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  display: none;
}

.search-results.is-open {
  display: block;
}

.search-result-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.search-result-item:hover {
  background: #eff6ff;
}

.search-result-item strong {
  display: block;
  margin-bottom: 4px;
}

.search-result-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.mobile-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px 20px;
}

.mobile-search {
  position: relative;
  margin-bottom: 12px;
}

.mobile-link:hover,
.mobile-link.is-active,
.mobile-category-links a:hover {
  background: rgba(255, 255, 255, 0.16);
}

.mobile-category-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
}

.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.9s ease;
}

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

.hero-inner,
.page-hero,
.detail-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-inner {
  display: flex;
  align-items: center;
  height: 100%;
}

.hero-copy {
  width: min(700px, 100%);
  color: #fff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-copy p,
.page-hero p,
.detail-copy .lead {
  max-width: 720px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.hero-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

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

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 18px 32px rgba(239, 68, 68, 0.28);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

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

.white-section {
  background: #fff;
}

.soft-section {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.category-section {
  background: #f8fafc;
}

.section.white-section,
.section.soft-section,
.section.category-section {
  max-width: none;
}

.section.white-section > *,
.section.soft-section > *,
.section.category-section > * {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

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

.section-head h2 {
  margin: 10px 0 6px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.035em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.text-link {
  flex: 0 0 auto;
  color: var(--blue);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid #eef2f7;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

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

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

.play-mark,
.rank-badge {
  position: absolute;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: rgba(239, 68, 68, 0.92);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.28);
}

.play-mark {
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: all 0.22s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 42px;
  height: 32px;
  border-radius: 10px;
  font-weight: 900;
}

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

.movie-card-meta {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

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

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

.movie-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #475569;
  font-size: 13px;
}

.movie-card-foot span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 140px 1fr;
}

.compact-card .poster-frame {
  min-height: 210px;
  aspect-ratio: auto;
}

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

.category-tile {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 10px;
  border-radius: 26px;
  padding: 22px;
  overflow: hidden;
  color: #fff;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
}

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

.category-tile strong {
  font-size: 14px;
  line-height: 1.55;
}

.page-hero {
  min-height: 360px;
  display: flex;
  align-items: center;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #0e7490);
  background-size: cover;
  background-position: center;
}

.compact-hero {
  min-height: 300px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  margin-bottom: 28px;
}

.filter-bar input,
.filter-bar select {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.filter-bar input::placeholder {
  color: #94a3b8;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.10);
  transition: transform 0.22s ease;
}

.category-overview-card:hover {
  transform: translateY(-5px);
}

.overview-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  min-height: 240px;
}

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

.overview-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
}

.overview-copy h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.overview-copy p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.overview-copy span {
  color: var(--blue);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.detail-inner {
  position: relative;
  padding-top: 34px;
  padding-bottom: 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.74);
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 42px;
  align-items: end;
}

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

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

.player-section {
  max-width: 1180px;
  padding-top: 44px;
  padding-bottom: 44px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 20px 46px rgba(239, 68, 68, 0.36);
  font-size: 34px;
}

.player-overlay strong {
  max-width: 80%;
  font-size: clamp(20px, 4vw, 34px);
  text-align: center;
}

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

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.movie-article,
.side-panel {
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.movie-article {
  padding: 34px;
}

.movie-article h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.movie-article p {
  margin: 0 0 28px;
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 700;
}

.side-panel {
  align-self: start;
  padding: 28px;
}

.side-panel dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.side-panel dl div {
  display: grid;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eef2f7;
}

.side-panel dt {
  color: var(--muted);
  font-size: 13px;
}

.side-panel dd {
  margin: 0;
  font-weight: 800;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b, #0f172a);
}

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

.footer-logo {
  margin-bottom: 16px;
  color: #fff;
}

.footer-brand p,
.site-footer p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.75;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #fff;
}

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

.footer-links a:hover {
  color: #fff;
}

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

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

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

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

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

  .header-inner {
    justify-content: space-between;
  }

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

  .hero-slider {
    height: 540px;
  }

  .section-head,
  .detail-grid,
  .content-layout {
    display: block;
  }

  .section-head .text-link {
    display: inline-block;
    margin-top: 12px;
  }

  .detail-poster {
    max-width: 260px;
    margin-bottom: 28px;
  }

  .side-panel {
    margin-top: 24px;
  }

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

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

@media (max-width: 640px) {
  .movie-grid,
  .ranking-grid,
  .category-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: 120px 1fr;
  }

  .compact-card .poster-frame {
    min-height: 184px;
  }

  .hero-slider {
    height: 560px;
  }

  .hero-actions {
    display: grid;
  }

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

  .movie-article,
  .side-panel {
    padding: 24px;
  }
}
