:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-strong: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #dbeafe;
  --gold: #f59e0b;
  --radius: 22px;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.header-inner {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
  font-size: 14px;
}

.brand-text {
  white-space: nowrap;
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 600;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #60a5fa;
}

.header-search {
  display: flex;
  align-items: center;
  min-width: 310px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.page-filter {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.36);
  outline: none;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.68);
  border-radius: 999px 0 0 999px;
  padding: 12px 16px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(226, 232, 240, 0.72);
}

.header-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  color: #ffffff;
  background: var(--brand);
  border-radius: 0 999px 999px 0;
  padding: 13px 18px;
  font-weight: 700;
  cursor: pointer;
}

.header-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover {
  background: var(--brand-dark);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 22px;
  cursor: pointer;
}

.mobile-panel {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.mobile-search {
  display: flex;
  margin-bottom: 14px;
}

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

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

.hero-track {
  position: relative;
  min-height: 680px;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: saturate(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 25%, rgba(37, 99, 235, 0.45), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.82) 44%, rgba(15, 23, 42, 0.34) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.1));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 560px;
  margin: 0 auto;
  padding: 96px 24px 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.eyebrow {
  margin: 0 0 14px;
  color: #93c5fd;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 8vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-desc {
  max-width: 760px;
  margin: 26px 0 0;
  color: rgba(226, 232, 240, 0.92);
  font-size: 18px;
}

.hero-tags,
.tag-row,
.detail-actions,
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.92);
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.12);
  color: #dbeafe;
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-actions,
.detail-actions {
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.section-more,
.category-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-btn {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35);
}

.primary-btn:hover,
.section-more:hover,
.category-enter:hover {
  transform: translateY(-2px);
  background: var(--brand-dark);
}

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

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 126px;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  transition: width 0.18s ease, background 0.18s ease;
}

.hero-dot.active {
  width: 30px;
  background: #60a5fa;
}

.hero-thumbs {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 28px;
  z-index: 4;
  width: min(1192px, calc(100% - 48px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.hero-thumb {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 18px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-thumb.active {
  border-color: rgba(96, 165, 250, 0.88);
  background: rgba(37, 99, 235, 0.34);
}

.hero-thumb img {
  height: 74px;
  border-radius: 12px;
}

.hero-thumb span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

main,
.content-section,
.page-shell {
  width: 100%;
}

.content-section,
.page-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 24px;
}

.page-shell {
  padding-top: 34px;
}

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

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

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

.section-more,
.category-enter {
  min-height: 40px;
  color: #ffffff;
  background: var(--brand);
  white-space: nowrap;
}

.category-strip {
  margin-top: -42px;
  position: relative;
  z-index: 8;
}

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

.category-tile,
.category-overview-card a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 132px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-overview-card a:hover,
.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.36);
}

.category-tile span,
.category-overview-card h2 {
  font-size: 20px;
  font-weight: 900;
}

.category-tile small,
.category-overview-card p {
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow);
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.68), transparent 62%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.88);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

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

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

.movie-meta,
.movie-one-line {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.movie-one-line {
  display: -webkit-box;
  min-height: 44px;
  margin-top: 8px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 14px;
}

.filter-bar {
  margin-bottom: 24px;
}

.page-filter {
  max-width: 520px;
  color: var(--ink);
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.page-hero,
.detail-hero {
  overflow: hidden;
  border-radius: 30px;
  color: #ffffff;
  background:
    radial-gradient(circle at 78% 20%, rgba(59, 130, 246, 0.42), transparent 32%),
    linear-gradient(135deg, #0f172a, #1e293b 52%, #111827);
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 62px;
  margin-bottom: 42px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p:last-child {
  max-width: 760px;
  color: rgba(226, 232, 240, 0.9);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.category-overview-card a {
  min-height: 190px;
}

.category-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 36px;
  padding: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  box-shadow: 0 28px 62px rgba(0, 0, 0, 0.36);
  background: #0f172a;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 820px;
  color: rgba(226, 232, 240, 0.92);
  font-size: 20px;
}

.large-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #dbeafe;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-launch {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.45), rgba(15, 23, 42, 0.12));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-launch span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
  font-size: 34px;
  box-shadow: 0 22px 52px rgba(37, 99, 235, 0.42);
}

.player-launch.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

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

.story-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.story-card p {
  margin: 0;
  color: #334155;
}

.meta-card {
  grid-column: 1 / -1;
}

.meta-card dl {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin: 0;
}

.meta-card div {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-strong);
}

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

.meta-card dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.search-page-form {
  display: flex;
  width: min(720px, 100%);
  margin-top: 28px;
}

.search-page-form input {
  color: var(--ink);
  background: #ffffff;
}

.search-status {
  margin-bottom: 20px;
  color: var(--muted);
  font-weight: 700;
}

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

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

.footer-inner p {
  max-width: 560px;
  margin: 12px 0 0;
}

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

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

.footer-copy {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 28px;
  color: #94a3b8;
}

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

@media (max-width: 1120px) {
  .movie-grid,
  .compact-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .hero-thumbs {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-thumb:nth-child(n+4) {
    display: none;
  }

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

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .header-inner {
    height: 64px;
  }

  .hero-carousel,
  .hero-track {
    min-height: 620px;
  }

  .hero-content {
    min-height: 520px;
    padding-top: 74px;
    padding-bottom: 128px;
  }

  .hero-controls {
    bottom: 96px;
  }

  .hero-thumbs {
    display: none;
  }

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

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

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

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

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

@media (max-width: 560px) {
  .header-inner,
  .mobile-panel,
  .content-section,
  .page-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero-content h1,
  .detail-info h1,
  .page-hero h1 {
    letter-spacing: -0.04em;
  }

  .hero-carousel,
  .hero-track {
    min-height: 560px;
  }

  .hero-content {
    min-height: 500px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-actions,
  .detail-actions {
    width: 100%;
  }

  .primary-btn,
  .ghost-btn {
    flex: 1 1 auto;
  }

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

  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .compact-grid,
  .meta-card dl {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-hero,
  .story-card {
    border-radius: 24px;
    padding: 24px;
  }
}
