:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.22);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #22d3ee;
  --accent-2: #60a5fa;
  --hot: #f59e0b;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.18), transparent 32rem),
    radial-gradient(circle at 82% 8%, rgba(96, 165, 250, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.desktop-nav,
.mobile-nav,
.footer-links,
.hero-actions,
.detail-meta,
.tag-row,
.card-meta,
.filter-bar,
.search-page-box,
.breadcrumb,
.section-head {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #03131a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.24);
}

.brand-text {
  font-size: 1.22rem;
  background: linear-gradient(135deg, #e0faff, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  gap: 30px;
  color: var(--soft);
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: var(--accent);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.75);
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 10px 18px 18px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--soft);
}

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

main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-shell {
  min-height: 690px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  padding: 30px 0 26px;
}

.hero-stage {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.44;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.25) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 34px;
  align-items: center;
  padding: 56px;
}

.hero-text h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-text h1 {
  max-width: 760px;
  font-size: clamp(2.8rem, 7vw, 6rem);
}

.hero-text p {
  max-width: 660px;
  margin: 24px 0 0;
  font-size: 1.16rem;
  color: var(--soft);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 12px;
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(8, 47, 73, 0.48);
  font-size: 0.86rem;
  font-weight: 800;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.hero-tags span,
.tag-row.large span,
.detail-meta span {
  padding: 7px 12px;
  font-size: 0.88rem;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 0.76rem;
}

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

.primary-btn,
.secondary-btn,
.search-page-box button,
.hero-search button {
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  padding: 13px 22px;
  color: #03131a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 34px rgba(34, 211, 238, 0.22);
}

.secondary-btn {
  padding: 12px 21px;
  color: var(--text);
  border: 1px solid rgba(226, 232, 240, 0.28);
  background: rgba(15, 23, 42, 0.66);
}

.primary-btn:hover,
.secondary-btn:hover,
.search-page-box button:hover,
.hero-search button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  align-self: center;
  border-radius: 26px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.18);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

.hero-dots {
  position: absolute;
  left: 56px;
  bottom: 32px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 28px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.32);
}

.hero-dot.is-active {
  width: 46px;
  background: var(--accent);
}

.hero-panel {
  min-height: 640px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-search,
.search-page-box,
.filter-bar {
  display: flex;
  gap: 10px;
}

.hero-search input,
.search-page-box input,
.filter-bar input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  outline: none;
  color: var(--text);
  background: rgba(2, 6, 23, 0.6);
}

.hero-search input {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 16px;
}

.hero-search button,
.search-page-box button {
  border: 0;
  color: #03131a;
  background: var(--accent);
}

.hero-search button {
  padding: 0 16px;
}

.panel-heading {
  margin: 24px 0 12px;
  color: #f8fafc;
  font-size: 1.1rem;
  font-weight: 900;
}

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

.compact-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.46);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.compact-item:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(8, 47, 73, 0.35);
}

.compact-rank {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.12);
  font-weight: 900;
}

.compact-title,
.compact-kind {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-title {
  display: block;
  color: #f8fafc;
  font-weight: 800;
}

.compact-kind {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.content-section {
  padding: 48px 0;
}

.highlight-section {
  padding-top: 28px;
}

.section-head {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2,
.detail-section h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  letter-spacing: -0.03em;
}

.section-head p,
.detail-section p,
.page-hero p,
.footer-inner p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 900;
}

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.card-link:hover {
  transform: translateY(-7px);
  border-color: rgba(34, 211, 238, 0.46);
  background: rgba(15, 23, 42, 0.94);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

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

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

.duration-pill,
.rank-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: #f8fafc;
  font-size: 0.76rem;
  font-weight: 900;
}

.rank-badge {
  left: 10px;
  right: auto;
  color: #03131a;
  background: linear-gradient(135deg, #fbbf24, #22d3ee);
}

.card-content {
  padding: 15px;
}

.card-meta {
  gap: 8px;
  flex-wrap: wrap;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.card-content h3 {
  min-height: 3.1em;
  margin: 8px 0 6px;
  color: #f8fafc;
  font-size: 1.02rem;
  line-height: 1.45;
}

.card-content p {
  min-height: 3.2em;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

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

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

.category-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-posters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px;
}

.category-posters img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.category-copy {
  padding: 0 18px 18px;
}

.category-copy h2 {
  margin: 6px 0;
  font-size: 1.18rem;
}

.category-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 22px;
}

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

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

.page-hero,
.detail-hero {
  margin: 30px 0 0;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 26rem),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.small-hero {
  padding: 54px;
}

.page-hero h1 {
  max-width: 900px;
  font-size: clamp(2.3rem, 6vw, 4.8rem);
}

.page-hero p {
  max-width: 760px;
  font-size: 1.08rem;
}

.filter-bar {
  justify-content: space-between;
  margin-bottom: 22px;
}

.filter-bar input,
.search-page-box input {
  padding: 15px 18px;
  border-radius: 18px;
}

.filter-bar a {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 900;
}

.search-page-box {
  margin-bottom: 24px;
}

.search-page-box button {
  padding: 0 26px;
  border: 0;
}

.rank-row {
  display: grid;
  grid-template-columns: 58px 72px minmax(0, 1fr) 150px;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-row:hover {
  transform: translateX(5px);
  border-color: rgba(34, 211, 238, 0.42);
}

.rank-row img {
  width: 72px;
  height: 98px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-num {
  color: var(--accent);
  font-size: 1.28rem;
  font-weight: 900;
  text-align: center;
}

.rank-main strong,
.rank-main em {
  display: block;
  min-width: 0;
}

.rank-main strong {
  color: #f8fafc;
  font-size: 1.05rem;
}

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

.rank-meta {
  color: var(--soft);
  font-size: 0.9rem;
  text-align: right;
}

.detail-hero {
  padding: 22px;
}

.breadcrumb {
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 28px;
  align-items: stretch;
}

.player-box {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 28px;
  background: #000;
  border: 1px solid rgba(226, 232, 240, 0.16);
}

.player-box video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-box video {
  object-fit: contain;
  background: #000;
}

.player-cover {
  z-index: 2;
  padding: 0;
  overflow: hidden;
  border: 0;
  cursor: pointer;
  background: #000;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  filter: saturate(1.08);
}

.player-cover.is-hidden {
  display: none;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #03131a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.34);
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: 900;
}

.detail-copy {
  padding: 20px 8px 20px 0;
}

.detail-copy h1 {
  font-size: clamp(2rem, 5vw, 4.2rem);
}

.one-line {
  margin: 18px 0 20px;
  color: var(--soft);
  font-size: 1.08rem;
}

.detail-meta {
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.detail-section {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.detail-section p {
  font-size: 1.06rem;
  color: var(--soft);
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.68);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
}

.footer-logo {
  color: #f8fafc;
  font-weight: 900;
  font-size: 1.2rem;
}

.footer-inner p {
  max-width: 720px;
}

.footer-links {
  gap: 18px;
  color: var(--soft);
  font-weight: 800;
}

@media (max-width: 1100px) {
  .hero-shell,
  .detail-layout,
  .ranking-layout {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: auto;
  }

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

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

  .menu-toggle {
    display: flex;
  }

  .hero-stage,
  .hero-content,
  .hero-shell {
    min-height: 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 34px;
  }

  .hero-poster {
    width: min(240px, 70%);
    transform: none;
  }

  .hero-dots {
    left: 34px;
  }

  .movie-grid,
  .movie-grid.dense,
  .category-grid,
  .category-grid.wide,
  .ranking-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-row {
    grid-template-columns: 42px 64px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }

  .small-hero {
    padding: 34px;
  }

  .filter-bar,
  .search-page-box,
  .section-head,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  main,
  .header-inner,
  .footer-inner {
    width: min(100% - 22px, 1240px);
  }

  .hero-shell {
    padding-top: 18px;
  }

  .hero-content {
    padding: 26px;
  }

  .hero-text h1 {
    font-size: 2.4rem;
  }

  .movie-grid,
  .movie-grid.dense,
  .category-grid,
  .category-grid.wide,
  .ranking-cards {
    grid-template-columns: 1fr;
  }

  .player-box {
    min-height: 260px;
  }

  .card-content h3,
  .card-content p {
    min-height: 0;
  }
}
