:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-strong: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #94a3b8;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --blue-soft: #dbeafe;
  --slate: #0f172a;
  --slate-2: #1e293b;
  --slate-3: #334155;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 55%, #0f172a 100%);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark,
.footer-brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.12);
}

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

.main-nav a,
.mobile-panel a {
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover {
  color: #60a5fa;
}

.header-search,
.mobile-search,
.page-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.page-search input {
  width: 230px;
  height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.86);
  outline: none;
  padding: 0 16px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: #94a3b8;
}

.header-search input:focus,
.mobile-search input:focus,
.page-search input:focus,
.filter-toolbar input:focus,
.filter-toolbar select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.header-search button,
.mobile-search button,
.page-search button {
  height: 40px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--blue);
  padding: 0 16px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 26px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 16px;
  background: #0f172a;
}

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

.mobile-panel nav {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #334155);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.62) 48%, rgba(15, 23, 42, 0.1) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.45), transparent 40%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

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

.hero-labels,
.detail-meta,
.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero-labels span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 700;
}

.hero-labels span:first-child {
  background: #2563eb;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 780px;
  margin: 0 0 34px;
  color: #dbeafe;
  font-size: clamp(18px, 3vw, 24px);
  line-height: 1.65;
}

.hero-actions,
.detail-tags,
.section-heading,
.footer-bottom,
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

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

.primary-button {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.36);
}

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

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

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 38px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

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

.section-block {
  padding: 70px 0;
}

.light-panel {
  background: #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 30px;
}

.section-heading h2,
.page-hero h1,
.detail-intro h1,
.content-card h2,
.text-card h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.section-heading a {
  color: var(--blue);
  font-weight: 800;
}

.compact-heading {
  margin-bottom: 22px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.05));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.35);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  font-weight: 900;
}

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

.movie-meta-line {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

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

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

.movie-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.movie-tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-compact .poster-link {
  aspect-ratio: 16 / 9;
}

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

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

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-soft);
  padding: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  border-radius: 14px;
  background: #f8fafc;
  padding: 12px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: #eff6ff;
  transform: translateX(3px);
}

.rank-row span {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--blue);
  font-weight: 900;
}

.rank-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.category-tile,
.category-overview-card,
.text-card,
.content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.category-tile,
.category-overview-card {
  position: relative;
  display: grid;
  gap: 12px;
  min-height: 150px;
  overflow: hidden;
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile::after,
.category-overview-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -45px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.09);
}

.category-tile:hover,
.category-overview-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.category-tile strong,
.category-overview-card h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.category-tile span,
.category-overview-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-overview-card > span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--blue);
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 58%, #334155 100%);
  padding: 78px 0;
}

.page-hero h1 {
  color: #ffffff;
  font-size: clamp(36px, 6vw, 62px);
}

.page-hero p {
  max-width: 760px;
  margin: 20px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.75;
}

.page-search {
  margin-top: 28px;
}

.page-search input {
  width: min(520px, 100%);
  color: #ffffff;
}

.filter-toolbar {
  justify-content: space-between;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.filter-search-box {
  flex: 1 1 280px;
}

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

.filter-toolbar select {
  flex: 0 1 170px;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  color: var(--muted);
  background: #ffffff;
  padding: 46px 20px;
  text-align: center;
}

.detail-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.3), transparent 34%),
    linear-gradient(135deg, #020617, #0f172a 52%, #1e293b);
  padding: 58px 0;
}

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

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: #0f172a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #bfdbfe;
  font-size: 14px;
  margin-bottom: 22px;
}

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

.detail-intro h1 {
  color: #ffffff;
  font-size: clamp(34px, 5vw, 60px);
}

.detail-one-line {
  max-width: 820px;
  margin: 22px 0;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.75;
}

.detail-meta {
  margin: 0 0 18px;
}

.detail-tags {
  margin-bottom: 26px;
}

.detail-tags a:hover {
  color: #ffffff;
  background: var(--blue);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(0, 0, 0, 0.48));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.94);
  box-shadow: 0 18px 55px rgba(37, 99, 235, 0.4);
  font-size: 34px;
}

.player-shell.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 20px 0 30px;
}

.content-card,
.text-card {
  padding: 26px;
}

.content-card h2,
.text-card h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.content-card p,
.text-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.detail-side-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-side-card div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.detail-side-card dt {
  color: var(--muted);
}

.detail-side-card dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

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

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
  margin-top: 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding: 52px 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

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

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

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

.site-footer a:hover {
  color: #60a5fa;
}

.footer-bottom {
  justify-content: center;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  padding: 18px 16px 24px;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

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

  .two-column-layout,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .category-grid,
  .small-grid,
  .category-tile-grid,
  .category-overview-grid,
  .text-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .brand-text {
    font-size: 18px;
  }

  .hero-carousel {
    height: 540px;
  }

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

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

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

  .section-block {
    padding: 46px 0;
  }

  .movie-grid,
  .category-grid,
  .small-grid,
  .category-tile-grid,
  .category-overview-grid,
  .text-grid {
    grid-template-columns: 1fr;
  }

  .filter-toolbar {
    display: grid;
  }

  .filter-toolbar select {
    flex: 1 1 auto;
  }

  .page-hero,
  .detail-hero {
    padding: 52px 0;
  }

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

  .player-start span {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}
