:root {
  color-scheme: dark;
  --page-bg: #020617;
  --panel-bg: rgba(15, 23, 42, 0.86);
  --panel-solid: #0f172a;
  --panel-soft: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.2);
  --accent: #22d3ee;
  --accent-2: #ec4899;
  --accent-3: #a855f7;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.45);
  --shell: min(1180px, calc(100% - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 5%, rgba(34, 211, 238, 0.18), transparent 32rem),
    radial-gradient(circle at 82% 10%, rgba(236, 72, 153, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 54%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(236, 72, 153, 0.2));
  object-fit: cover;
}

button,
input {
  font: inherit;
}

.shell {
  width: var(--shell);
  margin: 0 auto;
}

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

.site-header-inner {
  width: var(--shell);
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #03111f;
  box-shadow: 0 10px 32px rgba(34, 211, 238, 0.28);
}

.brand-text {
  font-size: 1.2rem;
}

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

.nav-link,
.mobile-link {
  border-radius: 999px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: white;
  background: rgba(34, 211, 238, 0.12);
}

.site-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 310px;
}

.site-search input,
.mobile-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  color: white;
  background: rgba(15, 23, 42, 0.75);
  outline: none;
}

.site-search input:focus,
.mobile-search input:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.site-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.text-link,
.panel-close,
.filter-chip {
  border: 0;
  cursor: pointer;
}

.site-search button,
.mobile-search button,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 18px;
  color: #03111f;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #67e8f9);
  box-shadow: 0 14px 32px rgba(34, 211, 238, 0.22);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.site-search button:hover,
.mobile-search button:hover,
.primary-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 10px 18px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: white;
}

.mobile-panel {
  width: var(--shell);
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 720px;
  padding: 72px 0 56px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.45)),
    radial-gradient(circle at 70% 30%, rgba(236, 72, 153, 0.3), transparent 28rem),
    radial-gradient(circle at 20% 45%, rgba(34, 211, 238, 0.26), transparent 28rem);
}

.hero-inner {
  position: relative;
  width: var(--shell);
  margin: 0 auto;
}

.hero-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-heading h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-heading h1 {
  max-width: 920px;
  font-size: clamp(2.7rem, 7vw, 6.5rem);
}

.hero-heading p:last-child,
.page-hero p,
.detail-line {
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-stage {
  position: relative;
  min-height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow-lg);
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(30px) saturate(1.25);
  opacity: 0.24;
  transform: scale(1.08);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.1fr 0.74fr;
  gap: 30px;
  align-items: center;
  padding: clamp(24px, 4vw, 54px);
  opacity: 0;
  transform: translateX(40px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 6vw, 5.1rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy p:not(.eyebrow) {
  max-width: 650px;
  margin: 0;
  color: #dbeafe;
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-poster {
  position: relative;
  z-index: 2;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.46);
  transform: rotate(2deg);
}

.hero-poster img,
.poster-link img,
.compact-card img,
.ranking-cover img,
.category-tile img,
.category-panel-cover img {
  height: 100%;
  object-fit: cover;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: white;
  font-size: 2rem;
  background: rgba(2, 6, 23, 0.6);
  transform: translateY(-50%);
}

.hero-prev {
  left: 16px;
}

.hero-next {
  right: 16px;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.hero-dot.is-active {
  width: 34px;
  border-radius: 999px;
  background: var(--accent);
}

.section {
  padding: 56px 0;
}

.page-main {
  padding: 42px 0 72px;
}

.section-head,
.search-panel-head,
.rank-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2,
.rank-panel-head h2,
.search-panel-head h2,
.story-card h2,
.category-panel h2,
.ranking-info h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}

.text-link {
  color: var(--accent);
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: var(--panel-bg);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.02), rgba(2, 6, 23, 0.92));
}

.category-name,
.category-intro {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
}

.category-name {
  bottom: 58px;
  font-size: 1.25rem;
  font-weight: 900;
}

.category-intro {
  bottom: 18px;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.5;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 28px;
  align-items: start;
}

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

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

.movie-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.48);
  box-shadow: 0 22px 46px rgba(34, 211, 238, 0.1);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #03111f;
  font-size: 0.78rem;
  font-weight: 900;
  background: var(--accent);
}

.movie-card-body {
  padding: 16px;
}

.movie-meta {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.movie-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.35;
}

.movie-line {
  display: -webkit-box;
  min-height: 4.6em;
  margin: 10px 0 0;
  overflow: hidden;
  color: #cbd5e1;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  padding: 5px 9px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 999px;
  color: #bae6fd;
  font-size: 0.76rem;
  background: rgba(34, 211, 238, 0.08);
}

.rank-panel {
  position: sticky;
  top: 92px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow-lg);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.rank-no {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #03111f;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.full-btn {
  width: 100%;
  margin-top: 18px;
}

.page-hero,
.detail-hero,
.story-card,
.category-panel,
.ranking-card,
.search-panel-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow-lg);
}

.compact-hero {
  padding: clamp(28px, 5vw, 54px);
  margin-bottom: 28px;
  background:
    radial-gradient(circle at 78% 22%, rgba(236, 72, 153, 0.16), transparent 26rem),
    rgba(15, 23, 42, 0.78);
}

.compact-hero h1,
.detail-info h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #cbd5e1;
}

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

.category-panel-grid {
  display: grid;
  gap: 18px;
}

.category-panel {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

.category-panel-cover {
  min-height: 210px;
  border-radius: 20px;
  overflow: hidden;
}

.category-panel p {
  color: #cbd5e1;
  line-height: 1.75;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(34, 211, 238, 0.08);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-chip {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.75);
}

.filter-chip.is-active {
  color: #03111f;
  border-color: transparent;
  background: var(--accent);
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 72px 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
}

.ranking-number {
  width: 56px;
  height: 56px;
  display: inline-grid;
  place-items: center;
  border-radius: 18px;
  color: #03111f;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.ranking-cover {
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  overflow: hidden;
}

.ranking-info p {
  color: #cbd5e1;
  line-height: 1.7;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 26px;
  padding: clamp(18px, 3vw, 28px);
}

.player-frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: white;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.82)),
    rgba(2, 6, 23, 0.32);
  cursor: pointer;
  text-align: center;
}

.player-cover[hidden] {
  display: none;
}

.play-icon {
  width: 74px;
  height: 74px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #03111f;
  font-size: 1.8rem;
  background: var(--accent);
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.35);
}

.detail-info {
  align-self: center;
  padding: 10px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

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

.story-card {
  padding: 24px;
}

.story-card p {
  color: #dbeafe;
  line-height: 1.9;
}

.related-section {
  padding-bottom: 0;
}

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

.compact-card {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.compact-card img {
  aspect-ratio: 2 / 3;
  border-radius: 15px;
}

.compact-card span {
  font-weight: 900;
  line-height: 1.35;
}

.compact-card small {
  color: var(--muted);
  line-height: 1.5;
}

.search-panel {
  position: fixed;
  inset: 0;
  z-index: 90;
  padding: 92px 20px 28px;
  overflow: auto;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

.search-panel-box {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.panel-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: white;
  font-size: 1.7rem;
  background: rgba(255, 255, 255, 0.1);
}

.search-summary {
  color: var(--muted);
}

.search-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

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

.footer-grid {
  width: var(--shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 26px;
  padding: 40px 0;
}

.site-footer p,
.site-footer a {
  color: #cbd5e1;
  line-height: 1.8;
}

.site-footer a {
  display: block;
  margin: 8px 0;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.copyright {
  width: var(--shell);
  margin: 0 auto;
  padding: 18px 0 30px;
  color: var(--muted);
}

[data-card].is-hidden {
  display: none;
}

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

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

  .split-section {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  :root {
    --shell: min(100% - 28px, 760px);
  }

  .desktop-nav,
  .site-search {
    display: none;
  }

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

  .hero-section {
    min-height: auto;
    padding-top: 44px;
  }

  .hero-slide,
  .detail-hero,
  .category-panel,
  .ranking-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 760px;
  }

  .hero-poster {
    max-width: 260px;
    margin: 0 auto;
  }

  .movie-grid,
  .category-movie-grid,
  .category-grid,
  .compact-grid,
  .search-result-grid,
  .detail-content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .brand-text {
    font-size: 1rem;
  }

  .hero-heading h1,
  .hero-copy h2 {
    font-size: 2.35rem;
  }

  .hero-stage {
    min-height: 700px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .category-movie-grid,
  .category-grid,
  .compact-grid,
  .search-result-grid {
    grid-template-columns: 1fr;
  }

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

  .ranking-cover {
    grid-column: 1 / -1;
    max-width: 210px;
  }
}
