:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #172033;
  --muted: #6b7280;
  --line: #e5eaf3;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --accent: #7c3aed;
  --shadow: 0 20px 45px rgba(30, 64, 175, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34%),
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.1), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.page-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), #1e40af 48%, var(--accent));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
}

.logo-text {
  display: grid;
  line-height: 1.2;
}

.logo-text strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.logo-text em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.nav-dropdown > button {
  border: 0;
  color: #334155;
  background: transparent;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.nav-link:hover,
.nav-link.is-active,
.nav-dropdown:hover > button {
  color: var(--primary);
  background: var(--primary-soft);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 360px;
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.nav-dropdown:hover .dropdown-panel {
  display: grid;
}

.dropdown-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #334155;
  background: #f8fafc;
}

.dropdown-panel a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

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

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

.page-wrap {
  padding: 30px 0 56px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  margin: 24px auto 36px;
  padding: 42px;
  border-radius: 34px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 48%, #7c3aed 100%);
  box-shadow: 0 32px 80px rgba(30, 64, 175, 0.28);
}

.hero-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.38), transparent 26%),
    radial-gradient(circle at 85% 35%, rgba(216, 180, 254, 0.28), transparent 28%),
    radial-gradient(circle at 45% 100%, rgba(59, 130, 246, 0.28), transparent 34%);
}

.hero-slide {
  position: absolute;
  inset: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 38px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.hero-copy h1 {
  max-width: 720px;
  margin: 20px 0 14px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 660px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.hero-meta span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #334155;
  background: #eef2ff;
  font-size: 13px;
  font-weight: 700;
}

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

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

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

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

.btn-primary {
  color: #1d4ed8;
  background: #ffffff;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.2);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-poster {
  position: relative;
  z-index: 2;
  overflow: hidden;
  min-height: 420px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.26);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-dots {
  position: absolute;
  left: 42px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 34px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #ffffff;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 0 0 34px;
  padding: 14px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 16px 38px rgba(30, 64, 175, 0.09);
}

.search-panel input {
  width: 100%;
  border: 0;
  outline: 0;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  background: #f1f5f9;
  color: var(--text);
}

.search-panel button {
  border: 0;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  cursor: pointer;
  font-weight: 800;
}

.section-block {
  margin-top: 42px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

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

.section-link,
.small-link {
  color: var(--primary);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #dbeafe;
}

.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);
}

.year-badge,
.rank-badge,
.poster-play {
  position: absolute;
  z-index: 2;
}

.year-badge {
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-size: 12px;
  font-weight: 900;
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.94);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

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

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

.movie-card h3,
.ranking-copy h3 {
  margin: 8px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

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

.movie-card p,
.ranking-copy p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

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

.category-card {
  display: grid;
  min-height: 172px;
  padding: 20px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
  box-shadow: 0 20px 42px rgba(79, 70, 229, 0.18);
}

.category-card:nth-child(even) {
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.category-card strong {
  font-size: 22px;
}

.category-card p {
  margin: 10px 0 18px;
  color: rgba(255, 255, 255, 0.82);
}

.category-card span {
  align-self: end;
  font-weight: 900;
}

.page-title {
  margin: 22px 0 28px;
  padding: 34px;
  border-radius: 30px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1d4ed8 58%, #7c3aed);
  box-shadow: var(--shadow);
}

.page-title h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.05em;
}

.page-title p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
}

.filter-panel {
  margin-bottom: 22px;
}

.filter-panel input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 18px;
  outline: 0;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

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

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

.ranking-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
}

.ranking-thumb {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 10;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.1fr);
  gap: 30px;
  align-items: center;
  margin: 24px 0 34px;
  padding: 28px;
  border-radius: 34px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 16 / 10;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

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

.breadcrumb {
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 800;
}

.detail-copy h1 {
  margin: 14px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-copy p {
  color: var(--muted);
  font-size: 17px;
}

.player-section,
.content-panel {
  margin-top: 28px;
  padding: 24px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
}

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

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.36), rgba(2, 6, 23, 0.78));
  cursor: pointer;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--primary);
  background: #ffffff;
  font-size: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}

.player-start strong {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
}

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

.content-panel h2 {
  margin-top: 0;
  font-size: 28px;
}

.content-panel p {
  color: #475569;
}

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

.info-cell {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f8fafc;
}

.info-cell span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.info-cell strong {
  display: block;
  margin-top: 3px;
}

.site-footer {
  margin-top: 20px;
  padding: 34px 0;
  background: #0f172a;
  color: #ffffff;
}

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

.footer-inner p {
  margin: 4px 0 0;
  color: #cbd5e1;
}

.empty-state {
  display: none;
  padding: 30px;
  border-radius: 22px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
}

@media (max-width: 980px) {
  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

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

  .menu-toggle {
    display: block;
  }

  .nav-dropdown {
    display: none;
  }

  .hero-carousel {
    min-height: 720px;
    padding: 24px;
  }

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

  .hero-poster,
  .hero-poster img {
    min-height: 300px;
  }

  .hero-dots {
    left: 24px;
    bottom: 22px;
  }

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

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

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

  .ranking-item {
    grid-template-columns: 48px 92px 1fr;
  }

  .ranking-item .small-link {
    grid-column: 3;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .footer-inner,
  .page-wrap {
    width: min(100% - 22px, 1200px);
  }

  .logo-text em {
    display: none;
  }

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

  .hero-copy h1 {
    font-size: 38px;
  }

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

  .movie-grid,
  .category-grid,
  .info-table {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 42px 1fr;
  }

  .ranking-thumb {
    display: none;
  }

  .ranking-copy {
    min-width: 0;
  }

  .page-title,
  .detail-hero,
  .player-section,
  .content-panel {
    padding: 18px;
    border-radius: 22px;
  }
}

.quick-links {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.quick-links a {
  color: var(--primary);
  font-weight: 800;
}
