* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --dim: #64748b;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 32rem),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.13), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

main {
  min-height: 70vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(96, 165, 250, 0.85));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
}

.brand-mark span {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #03101a;
  margin-left: 3px;
}

.brand-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link {
  padding: 9px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
  background: rgba(15, 23, 42, 0.9);
  transform: translateY(-1px);
}

.site-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-search input,
.search-page-form input {
  width: 220px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  outline: none;
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  padding: 0 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search input:focus,
.search-page-form input:focus {
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.site-search button,
.search-page-form button,
.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  color: #02111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-search button:hover,
.search-page-form button:hover,
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(34, 211, 238, 0.24);
}

.ghost-btn {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: none;
}

.ghost-btn:hover {
  color: var(--cyan);
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.45);
}

.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #cbd5e1;
}

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

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

.mobile-link,
.mobile-cats a {
  display: block;
  padding: 11px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.74);
}

.mobile-link.active,
.mobile-link:hover,
.mobile-cats a:hover {
  color: var(--cyan);
}

.mobile-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hero-carousel {
  position: relative;
  height: min(720px, 78vh);
  min-height: 560px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-track,
.hero-slide,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease, visibility 0.8s ease, transform 1.1s ease;
  transform: scale(1.04);
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 38%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.82) 0%, transparent 36%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
}

.hero-badges,
.tag-row,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-badges span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  color: #c8f6ff;
  background: rgba(8, 47, 73, 0.45);
  font-size: 13px;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(40px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 680px;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(16px, 1.65vw, 21px);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 4;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 34px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  border-color: transparent;
}

.quick-panel,
.section-wrap,
.footer-grid,
.footer-bottom,
.breadcrumb,
.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-panel {
  margin-top: -52px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.quick-panel h2,
.quick-panel p {
  margin: 0;
}

.quick-panel h2 {
  font-size: 24px;
}

.quick-panel p {
  color: var(--muted);
}

.hero-search input {
  width: min(420px, 42vw);
}

.section-wrap {
  margin-top: 64px;
}

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

.section-title span,
.page-hero span {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-title h2,
.page-hero h1,
.content-card h2 {
  margin: 4px 0 0;
}

.section-title h2 {
  font-size: clamp(25px, 3vw, 38px);
}

.section-title a {
  color: var(--cyan);
  font-weight: 700;
}

.compact {
  margin-bottom: 16px;
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 330px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-scroll .movie-card {
  scroll-snap-align: start;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 58px rgba(2, 6, 23, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.45);
}

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

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

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

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: #ecfeff;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

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

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

.card-body h2 {
  margin: 8px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

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

.card-body p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.category-card {
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(96, 165, 250, 0.06)),
    rgba(15, 23, 42, 0.74);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.38);
}

.category-card span {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 800;
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

.ranking-panel,
.content-card {
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 36px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.32);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(8, 47, 73, 0.35);
  transform: translateX(3px);
}

.rank-num {
  color: var(--cyan);
  font-weight: 900;
}

.rank-item img {
  width: 54px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 700;
}

.rank-score {
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  padding: 86px 0 36px;
}

.small-hero {
  width: min(1180px, calc(100% - 32px));
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
}

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

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

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

.ranking-card a {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.ranking-card a:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.38);
}

.ranking-card img {
  width: 120px;
  height: 82px;
  object-fit: cover;
  border-radius: 16px;
}

.ranking-number {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #02111f;
  font-weight: 900;
}

.ranking-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 30px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.detail-line {
  max-width: 780px;
  color: #cbd5e1;
  font-size: 19px;
}

.detail-tags {
  margin: 22px 0 28px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.7));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 54px rgba(34, 211, 238, 0.28);
}

.big-play::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 24px solid #03101a;
}

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

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

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

.content-card p {
  color: #cbd5e1;
  margin: 12px 0 0;
  white-space: pre-line;
}

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

.info-card div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.32);
}

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

.info-card dd {
  margin: 4px 0 0;
  color: #e2e8f0;
}

.search-page-form {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.search-page-form input {
  width: min(640px, 100%);
}

.search-summary {
  margin-bottom: 18px;
  color: var(--muted);
}

.site-footer {
  margin-top: 84px;
  border-top: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(2, 6, 23, 0.85);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 34px;
  padding: 44px 0 30px;
}

.footer-brand {
  margin-bottom: 16px;
}

.site-footer p {
  max-width: 520px;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--cyan);
}

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

.footer-bottom {
  padding: 20px 0 32px;
  color: var(--dim);
  border-top: 1px solid rgba(51, 65, 85, 0.7);
  font-size: 14px;
}

@media (max-width: 1100px) {
  .movie-grid,
  .category-list,
  .overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-search input {
    width: 180px;
  }
}

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

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

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

  .quick-panel,
  .two-column,
  .detail-hero,
  .detail-content,
  .footer-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .hero-search {
    width: 100%;
  }

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

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

@media (max-width: 720px) {
  .header-inner {
    height: 64px;
  }

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

  .hero-carousel {
    min-height: 590px;
    height: 82vh;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 42px;
  }

  .hero-actions {
    gap: 10px;
  }

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

  .quick-panel {
    margin-top: -34px;
    padding: 18px;
  }

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

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

  .ranking-card a {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .ranking-card img {
    width: 92px;
    height: 74px;
  }

  .search-page-form {
    flex-direction: column;
  }
}
