:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.24);
  --cyan: #06b6d4;
  --blue: #2563eb;
  --deep: #0f172a;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-logo::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 28px rgba(6, 182, 212, 0.34);
}

.site-logo span,
.site-footer h3 {
  background: linear-gradient(90deg, #67e8f9, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  font-size: 14px;
}

.desktop-nav a,
.mobile-nav a {
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #67e8f9;
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  width: 260px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  padding: 12px 14px;
  color: #ffffff;
  background: rgba(30, 41, 59, 0.82);
  outline: none;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(103, 232, 249, 0.78);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16);
}

.header-search button,
.menu-button {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  cursor: pointer;
  font-weight: 700;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  flex-direction: column;
  gap: 14px;
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(430px, 88vw);
  max-height: 460px;
  overflow: auto;
  padding: 10px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(103, 232, 249, 0.16);
  box-shadow: var(--shadow);
  display: none;
}

.search-results.show {
  display: block;
}

.search-results a {
  display: block;
  padding: 12px;
  border-radius: 14px;
  color: #e2e8f0;
}

.search-results a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.search-results strong {
  display: block;
  color: #ffffff;
  margin-bottom: 4px;
}

.search-results span {
  color: #94a3b8;
  font-size: 13px;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.28), transparent 32%), linear-gradient(135deg, #020617 0%, #0f172a 44%, #172554 100%);
}

.hero-carousel::after,
.page-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.5;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
  display: flex;
  align-items: center;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.2) contrast(1.08);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.72) 52%, rgba(15, 23, 42, 0.28) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 760px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.14);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero-content p,
.page-hero p,
.lead-text {
  margin: 0 0 26px;
  color: #cbd5e1;
  font-size: clamp(18px, 2.2vw, 23px);
  line-height: 1.75;
}

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

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 7px 11px;
  color: #0f172a;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover,
.ranking-card:hover {
  transform: translateY(-3px);
}

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

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

.hero-dots button.active {
  background: #67e8f9;
}

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

.section-title,
.preview-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-title h2,
.preview-heading h2,
.player-section h2,
.detail-text h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.16;
}

.dark-section .section-title h2,
.dark-section .section-title p {
  color: #ffffff;
}

.section-title p,
.preview-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.10);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  box-shadow: 0 24px 66px rgba(15, 23, 42, 0.17);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.featured-grid .card-cover,
.movie-card.compact .card-cover {
  aspect-ratio: 16 / 10;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover img,
.rank-item:hover img,
.category-tile:hover img,
.hero-card-stack a:hover img,
.ranking-card:hover img {
  transform: scale(1.08);
}

.card-cover::after,
.ranking-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.78));
}

.card-category {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-size: 12px;
  font-weight: 800;
}

.card-play {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.card-body {
  padding: 18px;
}

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

.card-body h3 a:hover,
.ranking-card h2 a:hover {
  color: var(--cyan);
}

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

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.card-meta span,
.detail-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f5f9;
}

.card-body .tag-row,
.detail-tags {
  margin-top: 12px;
}

.dark-section {
  background: radial-gradient(circle at 24% 20%, rgba(6, 182, 212, 0.20), transparent 30%), linear-gradient(135deg, #020617 0%, #0f172a 55%, #1e3a8a 100%);
}

.inner-dark {
  color: #ffffff;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 84px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.rank-num {
  font-size: 22px;
  font-weight: 900;
  color: #67e8f9;
}

.rank-item img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 16px;
  transition: transform 0.4s ease;
}

.rank-copy strong {
  display: block;
  margin-bottom: 8px;
}

.rank-copy em {
  color: #cbd5e1;
  font-style: normal;
  font-size: 13px;
}

.center-action {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  padding: 22px;
  overflow: hidden;
  border-radius: 24px;
  color: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transition: transform 0.5s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.30));
}

.category-tile span,
.category-tile strong {
  position: relative;
  z-index: 1;
  display: block;
}

.category-tile span {
  margin-bottom: 50px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong {
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.6;
}

.filter-bar {
  display: flex;
  gap: 14px;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  color: #0f172a;
  background: #f8fafc;
}

.page-hero,
.detail-hero {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.22), transparent 26%), linear-gradient(135deg, #020617 0%, #0f172a 52%, #172554 100%);
}

.page-hero > div,
.detail-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero {
  display: flex;
  align-items: center;
  padding: 90px 0;
}

.small-hero {
  min-height: 360px;
}

.category-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 40px;
  padding: 84px max(16px, calc((100vw - 1180px) / 2));
}

.category-hero > div {
  width: auto;
}

.hero-card-stack {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
}

.hero-card-stack a {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.hero-card-stack img {
  width: 92px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.4s ease;
}

.stacked-sections {
  display: grid;
  gap: 44px;
}

.category-preview {
  padding: 28px;
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 16px 52px rgba(15, 23, 42, 0.08);
}

.preview-heading a {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

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

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

.ranking-card {
  display: grid;
  grid-template-columns: 156px 1fr;
  gap: 22px;
  padding: 18px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-cover {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 16 / 11;
  background: #0f172a;
}

.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ranking-cover span {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.ranking-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.ranking-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.75;
}

.detail-hero {
  min-height: 620px;
  padding: 52px 0 76px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.04);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78));
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #67e8f9;
}

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

.detail-poster {
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

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

.detail-copy .lead-text {
  max-width: 820px;
}

.detail-meta span {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.10);
}

.player-section {
  padding-bottom: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12), rgba(2, 6, 23, 0.58));
  cursor: pointer;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 22px 58px rgba(37, 99, 235, 0.32);
  font-size: 28px;
}

.player-overlay strong {
  font-size: 20px;
}

.player-shell.is-started .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-text {
  padding-top: 34px;
}

.detail-text p {
  margin: 0 0 24px;
  color: #334155;
  font-size: 18px;
  line-height: 1.9;
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 36px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 36px;
}

.site-footer h3,
.site-footer h4 {
  margin: 0 0 16px;
  color: #ffffff;
}

.site-footer p,
.site-footer li {
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #64748b;
  font-size: 14px;
}

[data-movie-card].hide {
  display: none;
}

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

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

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

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

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

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .site-logo {
    font-size: 18px;
  }

  .hero-carousel {
    min-height: 680px;
  }

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

  .hero-actions,
  .filter-bar {
    flex-direction: column;
  }

  .movie-grid,
  .all-grid,
  .preview-grid,
  .category-grid,
  .rank-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 40px 72px 1fr;
  }

  .rank-item img {
    width: 72px;
    height: 72px;
  }

  .section-title,
  .preview-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .ranking-card,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
