:root {
  --bg: #0f172a;
  --bg-soft: #111c32;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(30, 41, 59, 0.95);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --accent: #60a5fa;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.22), transparent 28rem),
    radial-gradient(circle at 90% 12%, rgba(34, 211, 238, 0.12), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #172033 48%, #0f172a 100%);
  min-height: 100vh;
}

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(15, 23, 42, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

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

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

.logo {
  font-size: 20px;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.42);
}

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

.site-nav a {
  color: var(--soft);
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.18);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.top-search input,
.landing-search input,
.search-box-large input {
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
}

.top-search input {
  width: 180px;
  padding: 8px 10px;
}

.top-search button,
.landing-search button,
.primary-btn {
  border: 0;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 40px rgba(59, 130, 246, 0.32);
  cursor: pointer;
}

.top-search button {
  padding: 8px 16px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  color: #ffffff;
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.9);
  border-radius: 12px;
  padding: 8px 11px;
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 580px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.65) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.12) 42%, rgba(15, 23, 42, 0.22) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  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-kicker,
.page-hero span,
.section-heading span {
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.hero-content p {
  max-width: 680px;
  margin: 0;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.52);
}

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

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

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

.hero-tags span,
.tag-row span,
.rank-meta span {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(10px);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: max(16px, calc((100vw - 1180px) / 2 - 70px));
}

.hero-next {
  right: max(16px, calc((100vw - 1180px) / 2 - 70px));
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: #ffffff;
}

.quick-panel,
.section-block,
.page-main,
.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
  margin-top: -54px;
  position: relative;
  z-index: 8;
}

.quick-search,
.quick-links,
.tinted,
.category-card,
.story-card,
.filter-panel,
.page-hero {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
}

.quick-search {
  padding: 28px;
}

.quick-search h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.landing-search {
  display: flex;
  gap: 10px;
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px;
}

.landing-search input {
  flex: 1;
  padding: 12px 14px;
  min-width: 0;
}

.landing-search button {
  padding: 0 20px;
}

.quick-links {
  padding: 22px;
  display: grid;
  gap: 12px;
}

.quick-links a,
.text-link {
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.12);
  padding: 14px 16px;
  font-weight: 800;
}

.section-block {
  padding: 72px 0 0;
}

.section-block.tinted {
  padding: 34px;
  margin-top: 72px;
}

.no-top-padding {
  padding-top: 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(28px, 4vw, 40px);
}

.section-heading a {
  color: var(--cyan);
  font-weight: 800;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.72);
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow: 0 24px 72px rgba(2, 6, 23, 0.44);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(34, 211, 238, 0.12));
}

.poster-link img,
.category-tile img,
.category-cover img,
.rank-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.38s ease;
}

.movie-card:hover .poster-link img,
.category-tile:hover img,
.category-card:hover img,
.rank-item:hover img {
  transform: scale(1.06);
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.38);
}

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

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

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

.movie-card p {
  margin: 0 0 14px;
  color: var(--soft);
  line-height: 1.65;
  font-size: 14px;
}

.tag-row span {
  font-size: 12px;
  padding: 5px 9px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 54px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.58);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-cover {
  width: 72px;
  height: 96px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.12);
}

.rank-number {
  color: #dbeafe;
  font-size: 26px;
  font-weight: 900;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--soft);
  line-height: 1.6;
}

.rank-score {
  color: #ffffff;
  font-weight: 900;
  font-size: 24px;
  padding: 8px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.44), rgba(34, 211, 238, 0.36));
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #020617;
  padding: 18px;
  transition: transform 0.2s ease;
}

.category-tile img {
  position: absolute;
  inset: 0;
  opacity: 0.45;
}

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

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

.category-tile span {
  font-size: 21px;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 8px;
  color: var(--soft);
  font-weight: 500;
  line-height: 1.5;
}

.page-main,
.detail-main {
  padding-top: 34px;
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(28px, 5vw, 48px);
  margin-bottom: 30px;
}

.page-hero h1 {
  margin: 8px 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 740px;
  margin: 0;
  color: var(--soft);
  line-height: 1.8;
  font-size: 17px;
}

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

.category-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  overflow: hidden;
  padding: 16px;
  transition: transform 0.2s ease;
}

.category-cover {
  height: 250px;
  overflow: hidden;
  border-radius: 18px;
}

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

.category-card p {
  margin: 0 0 16px;
  color: var(--soft);
  line-height: 1.7;
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.sample-links a,
.category-chip-nav a,
.filter-panel button {
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
}

.category-chip-nav,
.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.category-chip-nav a:hover,
.filter-panel button:hover,
.filter-panel button.is-active {
  color: #ffffff;
  border-color: rgba(96, 165, 250, 0.46);
  background: rgba(59, 130, 246, 0.28);
}

.filter-panel {
  padding: 16px;
}

.filter-panel button {
  cursor: pointer;
}

.search-box-large {
  flex: 0 0 min(100%, 430px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.52);
  padding: 12px 16px;
}

.search-box-large input {
  width: 100%;
  padding: 12px 4px;
  font-size: 18px;
}

.full-rank {
  padding-bottom: 58px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  margin-bottom: 18px;
}

.breadcrumbs a {
  color: #dbeafe;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: stretch;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.video-shell.is-playing .play-cover {
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 22px 70px rgba(59, 130, 246, 0.48);
  font-size: 28px;
}

.detail-info {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(148, 163, 184, 0.12);
}

.detail-text {
  min-width: 0;
}

.detail-kicker {
  color: var(--cyan);
  margin: 0 0 10px;
  font-weight: 800;
}

.detail-text h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-one-line {
  color: var(--soft);
  margin: 0 0 18px;
  line-height: 1.72;
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 24px;
}

.story-card {
  padding: 28px;
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.story-card p {
  color: var(--soft);
  line-height: 1.9;
  margin: 0;
}

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

.meta-card dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.meta-card div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(2, 6, 23, 0.26);
}

.meta-card dt {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.meta-card dd {
  margin: 0;
  color: #ffffff;
  font-weight: 800;
}

.related-block {
  padding-bottom: 70px;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

.footer-logo {
  color: #ffffff;
  margin-bottom: 10px;
}

.footer-inner p {
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.search-card.is-hidden {
  display: none;
}

@media (max-width: 1120px) {
  .top-search {
    display: none;
  }

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

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

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

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
  }

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

  .site-nav a {
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.6);
  }

  .hero-carousel {
    height: 76vh;
    min-height: 600px;
  }

  .hero-content {
    justify-content: end;
    padding-bottom: 92px;
  }

  .hero-mask {
    background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.82) 44%, rgba(15, 23, 42, 0.28) 100%);
  }

  .hero-arrow {
    display: none;
  }

  .quick-panel,
  .page-hero,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

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

  .landing-search,
  .page-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .all-grid,
  .feature-grid,
  .related-grid,
  .category-grid,
  .category-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .category-cover {
    height: 220px;
  }

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

  .meta-card dl {
    grid-template-columns: 1fr 1fr;
  }

  .rank-item {
    grid-template-columns: 58px 1fr auto;
  }

  .rank-cover {
    display: none;
  }
}

@media (max-width: 560px) {
  .hero-content h1 {
    font-size: 42px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .movie-grid,
  .all-grid,
  .feature-grid,
  .related-grid,
  .category-grid,
  .category-list-grid,
  .meta-card dl {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 1fr;
    align-items: start;
  }

  .rank-score {
    grid-column: 2;
    justify-self: start;
    font-size: 18px;
  }

  .story-card,
  .quick-search,
  .section-block.tinted {
    padding: 22px;
  }
}
