:root {
  --blue: #2563eb;
  --indigo: #4f46e5;
  --violet: #7c3aed;
  --cyan: #06b6d4;
  --dark: #0f172a;
  --muted: #64748b;
  --line: #e5e7eb;
  --card: #ffffff;
  --bg: #f8fafc;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--dark);
  background: var(--bg);
  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;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.98), rgba(79, 70, 229, 0.98), rgba(14, 165, 233, 0.92));
  box-shadow: 0 12px 35px rgba(37, 99, 235, 0.2);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--blue);
  background: #ffffff;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.18);
}

.brand-text {
  display: grid;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 21px;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: #dbeafe;
  font-size: 12px;
}

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

.desktop-nav > a,
.nav-dropdown > a {
  color: #eff6ff;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.desktop-nav > a:hover,
.nav-dropdown > a:hover {
  color: #ffffff;
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  width: 460px;
  transform: translateX(-50%) translateY(10px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  color: #1f2937;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  padding: 9px 10px;
  border-radius: 12px;
  color: #334155;
}

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

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

.nav-search input,
.mobile-search input,
.wide-search input,
.list-tools input {
  border: 1px solid rgba(255, 255, 255, 0.22);
  outline: none;
  border-radius: 999px;
  padding: 10px 15px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  transition: all 0.2s ease;
}

.nav-search input::placeholder,
.mobile-search input::placeholder,
.wide-search input::placeholder {
  color: #dbeafe;
}

.nav-search input:focus,
.mobile-search input:focus,
.wide-search input:focus {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.nav-search button,
.mobile-search button,
.wide-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--blue);
  background: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 14px;
  color: #eff6ff;
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
}

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

.section {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 12% 18%, rgba(125, 211, 252, 0.34), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(196, 181, 253, 0.36), transparent 28%),
    linear-gradient(135deg, #1d4ed8 0%, #4f46e5 48%, #0f172a 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
}

.hero-shell {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 54px 0 86px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.7fr);
  gap: 48px;
  align-items: center;
}

.hero-slide.active {
  display: grid;
  animation: fadeRise 0.45s ease both;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--blue);
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-desc,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: clamp(17px, 2.4vw, 22px);
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.17);
  backdrop-filter: blur(12px);
}

.tag-row span {
  color: var(--blue);
  background: #eff6ff;
  border: 1px solid #dbeafe;
  font-size: 12px;
}

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

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  min-height: 46px;
  padding: 0 24px;
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.ghost-btn {
  min-height: 46px;
  padding: 0 22px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.text-link {
  color: var(--blue);
}

.hero-poster {
  position: relative;
  z-index: 2;
  display: block;
  width: min(100%, 380px);
  justify-self: end;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.45);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.4);
}

.hero-backdrop {
  position: absolute;
  right: -8%;
  top: 7%;
  width: 48%;
  height: 78%;
  object-fit: cover;
  opacity: 0.17;
  filter: blur(28px) saturate(1.25);
  border-radius: 42px;
}

.hero-controls {
  position: absolute;
  left: 0;
  bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-controls button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

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

.hero-dot {
  width: 9px !important;
  height: 9px !important;
  padding: 0;
  border: 0 !important;
  background: rgba(255, 255, 255, 0.38) !important;
}

.hero-dot.active {
  width: 26px !important;
  background: #ffffff !important;
}

.section-heading {
  margin-bottom: 28px;
}

.split-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 690px;
  margin: 10px 0 0;
  color: var(--muted);
}

.intro-section {
  padding-bottom: 30px;
}

.wide-search {
  padding: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: var(--shadow);
}

.wide-search input {
  width: min(360px, 48vw);
  background: rgba(255, 255, 255, 0.16);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.category-pills a {
  padding: 10px 16px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 32px 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 {
  position: relative;
  display: block;
  overflow: hidden;
  background: #dbeafe;
}

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

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

.poster-score,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.34);
}

.poster-score {
  right: 12px;
  top: 12px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  overflow: hidden;
  min-height: 50px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

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

.card-meta {
  margin: 7px 0;
  color: #64748b;
  font-size: 13px;
}

.card-desc {
  min-height: 54px;
  margin: 0 0 12px;
  color: #475569;
  font-size: 14px;
}

.movie-card.compact .card-title {
  min-height: 44px;
  font-size: 16px;
}

.movie-card.compact .card-desc {
  display: none;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  font-weight: 900;
}

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

.rank-row em {
  color: #ef4444;
  font-style: normal;
  font-weight: 900;
}

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

.category-card,
.category-overview-card {
  display: block;
  min-height: 160px;
  padding: 24px;
  border-radius: 24px;
  color: #ffffff;
  background:
    radial-gradient(circle at right top, rgba(255, 255, 255, 0.24), transparent 36%),
    linear-gradient(135deg, #2563eb, #4f46e5 54%, #0f172a);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.18);
  transition: transform 0.2s ease;
}

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

.category-card span,
.category-name {
  display: block;
  font-size: 24px;
  font-weight: 900;
}

.category-card p,
.category-overview-card p {
  margin: 12px 0 0;
  color: #dbeafe;
}

.mini-links {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.mini-links a {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #ffffff;
  opacity: 0.94;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 12%, rgba(14, 165, 233, 0.35), transparent 28%),
    linear-gradient(135deg, #1e3a8a, #4f46e5 55%, #111827);
}

.page-hero {
  padding: 82px max(16px, calc((100% - 1200px) / 2)) 74px;
}

.page-hero > div {
  width: min(1200px, 100%);
}

.page-hero h1 {
  max-width: 850px;
}

.page-hero p {
  max-width: 760px;
}

.list-tools {
  margin-bottom: 24px;
}

.list-tools label {
  display: grid;
  gap: 10px;
  max-width: 620px;
  color: #1e293b;
  font-weight: 800;
}

.list-tools input {
  width: 100%;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #dbeafe;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.list-tools input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.empty-state {
  display: none;
  margin: 26px 0 0;
  padding: 28px;
  border-radius: 22px;
  text-align: center;
  color: #64748b;
  background: #ffffff;
}

.empty-state.visible {
  display: block;
}

.detail-hero {
  padding: 72px max(16px, calc((100% - 1200px) / 2));
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  filter: blur(28px) saturate(1.2);
}

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

.detail-layout {
  position: relative;
  z-index: 1;
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 24px 58px rgba(2, 6, 23, 0.42);
}

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

.detail-poster span {
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 6px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

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

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

.detail-meta {
  margin: 14px 0 0;
  color: #bfdbfe;
  font-weight: 700;
}

.detail-tags span {
  color: #ffffff;
}

.narrow-actions {
  margin-top: 26px;
}

.detail-section {
  padding-bottom: 26px;
}

.watch-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

.watch-panel video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.64));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--blue);
  background: #ffffff;
  font-size: 30px;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
}

.watch-panel.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.article-section {
  padding-top: 24px;
}

.article-section h2 {
  margin: 0 0 12px;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.article-section p {
  margin: 0 0 26px;
  padding: 28px;
  border-radius: 24px;
  color: #334155;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

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

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 34px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.8fr;
  gap: 34px;
}

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

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

.site-footer p {
  max-width: 520px;
  color: #94a3b8;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 7px 0;
  color: #cbd5e1;
}

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

.copyright {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes fadeRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .menu-button {
    display: block;
    margin-left: auto;
  }

  .mobile-nav.open {
    display: block;
  }

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

  .hero-poster {
    justify-self: start;
    width: min(320px, 78vw);
  }

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

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

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

  .detail-layout {
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    min-height: 68px;
  }

  .brand-text small {
    display: none;
  }

  .hero-shell {
    min-height: auto;
    padding: 48px 0 92px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-desc,
  .page-hero p,
  .detail-one-line {
    font-size: 17px;
  }

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

  .wide-search {
    width: 100%;
  }

  .wide-search input {
    width: 100%;
  }

  .movie-grid,
  .compact-grid,
  .search-grid,
  .ranking-grid,
  .category-movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

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

  .detail-poster {
    width: min(260px, 75vw);
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .compact-grid,
  .search-grid,
  .ranking-grid,
  .category-movie-grid {
    grid-template-columns: 1fr;
  }

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