:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #06b6d4;
  --cyan-deep: #0891b2;
  --dark: #020617;
  --radius: 18px;
  --shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

button,
input,
select {
  font: inherit;
}

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

.site-header-inner {
  max-width: 1240px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-weight: 900;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #22d3ee, #0891b2);
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.28);
}

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

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(51, 65, 85, 0.76);
}

.header-search {
  width: min(320px, 32vw);
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 10px 12px 10px 16px;
  color: #e2e8f0;
  background: transparent;
}

.header-search button {
  border: 0;
  padding: 10px 16px;
  color: #ffffff;
  background: var(--cyan-deep);
}

.menu-button {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.78);
}

.hero {
  position: relative;
  height: 78vh;
  min-height: 560px;
  overflow: hidden;
  color: #ffffff;
  background: var(--dark);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.35), transparent 32%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.64) 48%, rgba(2, 6, 23, 0.2));
}

.hero-content {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 88px;
}

.hero-text {
  max-width: 780px;
}

.hero-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  color: #cbd5e1;
}

.pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 13px;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.94);
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 12px 22px;
  color: #ffffff;
  background: var(--cyan);
  box-shadow: 0 16px 32px rgba(6, 182, 212, 0.28);
  font-weight: 800;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--cyan-deep);
}

.btn.secondary {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(226, 232, 240, 0.28);
  box-shadow: none;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: all 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--cyan);
}

.page-hero {
  padding: 78px 20px 48px;
  color: #ffffff;
  background:
    radial-gradient(circle at top left, rgba(6, 182, 212, 0.25), transparent 34%),
    linear-gradient(135deg, #0f172a, #020617);
}

.page-hero-inner,
.section-block,
.filter-panel,
.content-grid,
.player-section,
.footer-inner,
.footer-bottom {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
}

.section-block {
  padding: 64px 20px;
}

.section-block.dark {
  max-width: none;
  background: linear-gradient(135deg, #1e293b, #020617);
}

.section-block.dark > .section-heading,
.section-block.dark > .scroll-row,
.section-block.dark > .movie-grid {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.dark .section-heading h2 {
  color: #ffffff;
}

.dark .section-heading p {
  color: #cbd5e1;
}

.dark .section-heading a {
  color: #67e8f9;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: all 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

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

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

.movie-card:hover .card-media img {
  transform: scale(1.08);
}

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), transparent 55%);
}

.card-region,
.card-year {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.76);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.card-region {
  top: 12px;
  left: 12px;
}

.card-year {
  right: 12px;
  bottom: 12px;
}

.card-play {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.92);
  transform: translate(-50%, -50%);
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.32);
}

.card-body {
  padding: 18px;
}

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

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

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

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

.card-meta {
  margin-bottom: 12px;
  color: #475569;
  font-size: 13px;
}

.tag-row span,
.rank-meta span {
  border-radius: 999px;
  padding: 5px 10px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
}

.scroll-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
  width: 318px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

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

.category-tile {
  min-height: 170px;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 22px;
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.34), transparent 36%),
    linear-gradient(135deg, #0f172a, #1e293b);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.13);
}

.category-tile h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile p {
  margin: 0 0 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.category-tile span {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(6, 182, 212, 0.9);
  font-weight: 800;
  font-size: 13px;
}

.filter-panel {
  margin-top: 28px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 14px;
  color: var(--ink);
  background: #f8fafc;
  outline: none;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.rank-cover {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  background: #0f172a;
}

.rank-cover img {
  height: 100%;
  object-fit: cover;
}

.rank-number {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #22d3ee, #0891b2);
  font-weight: 900;
}

.rank-card > div {
  padding: 18px 18px 18px 0;
}

.rank-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.detail-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at top left, rgba(6, 182, 212, 0.28), transparent 36%),
    linear-gradient(135deg, #0f172a, #020617);
}

.detail-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 68px 20px;
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 38px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
  background: #0f172a;
}

.detail-cover img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: #94a3b8;
  font-size: 14px;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.detail-info p {
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 18px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #e2e8f0;
  background: rgba(51, 65, 85, 0.8);
}

.player-section {
  padding: 56px 20px 28px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(6, 182, 212, 0.24), transparent 36%),
    rgba(2, 6, 23, 0.32);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  width: 94px;
  height: 94px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.94);
  box-shadow: 0 18px 44px rgba(6, 182, 212, 0.36);
  font-size: 34px;
}

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

.content-grid {
  padding: 28px 20px 58px;
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 28px;
}

.article-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.article-panel {
  padding: 30px;
}

.article-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.article-panel p {
  margin: 0 0 20px;
  color: #475569;
}

.side-panel {
  padding: 22px;
  height: fit-content;
}

.side-links {
  display: grid;
  gap: 14px;
}

.side-links a {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
}

.side-links img {
  height: 56px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.side-links strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.35;
}

.side-links span {
  color: #64748b;
  font-size: 12px;
}

.no-result {
  display: none;
  margin: 28px auto 0;
  max-width: 1240px;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: #64748b;
  background: #ffffff;
}

.site-footer {
  color: #94a3b8;
  background: #020617;
}

.footer-inner {
  padding: 46px 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-brand p {
  max-width: 460px;
  margin: 14px 0 0;
}

.footer-links h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 16px;
}

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

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

.footer-bottom {
  padding: 18px 20px 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 14px;
}

@media (max-width: 1080px) {
  .site-header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .menu-button {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.98);
  }

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

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

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

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

@media (max-width: 760px) {
  .site-header-inner {
    min-height: auto;
    padding: 12px 16px;
    grid-template-columns: 1fr auto;
  }

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

  .header-search {
    grid-column: 1 / -1;
    width: 100%;
  }

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

  .hero-content {
    padding-bottom: 82px;
  }

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

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

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 118px 1fr;
  }

  .rank-card > div {
    padding: 14px 14px 14px 0;
  }

  .rank-card h2 {
    font-size: 17px;
  }

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