:root {
  --bg: #f0f9ff;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.82);
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --brand: #0891b2;
  --brand-strong: #2563eb;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.22), transparent 36%), linear-gradient(135deg, #ecfeff 0%, #eff6ff 45%, #eef2ff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.nav-wrap {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.3);
  font-size: 14px;
}

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

.site-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #0369a1;
  background: rgba(8, 145, 178, 0.1);
  transform: translateY(-1px);
}

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

.hero-slider {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-inner {
  min-height: 680px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 100px 20px 140px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
  color: #fff;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.hero-kicker span,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  font-size: clamp(32px, 5vw, 58px);
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.9;
}

.hero-actions,
.filter-panel,
.hero-control-panel,
.hero-dots,
.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.primary-btn.full {
  width: 100%;
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
}

.text-link {
  min-height: auto;
  padding: 8px 0;
  color: #0891b2;
}

.hero-control-panel {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  padding: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(18px);
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot.active {
  width: 34px;
  background: #22d3ee;
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 104px;
  width: min(780px, calc(100% - 40px));
  transform: translateX(-50%);
  padding: 10px;
  display: flex;
  gap: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(8, 145, 178, 0.55);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.hero-search button {
  min-width: 108px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  font-weight: 800;
  cursor: pointer;
}

.section-wrap,
.page-shell,
.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 20px;
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.story-card h2,
.info-card h2,
.rank-card h2,
.side-recommend h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading.small h2,
.story-card h2,
.info-card h2,
.rank-card h2,
.side-recommend h2 {
  font-size: 24px;
}

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

.home-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: var(--surface-soft);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(8, 145, 178, 0.28);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.16);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #164e63, #1e3a8a);
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent);
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 800;
}

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

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

.movie-card h3 a:hover {
  color: var(--brand);
}

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

.meta-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #0e7490;
  font-size: 13px;
  font-weight: 800;
}

.tag-list span {
  padding: 5px 10px;
  border-radius: 999px;
  color: #475569;
  background: rgba(14, 165, 233, 0.1);
  font-size: 12px;
  font-weight: 700;
}

.split-layout,
.ranking-layout,
.detail-content-grid,
.detail-hero,
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.rank-panel,
.rank-card,
.side-recommend,
.story-card,
.info-card,
.category-card-large,
.filter-panel,
.page-hero {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.rank-panel,
.rank-card,
.side-recommend,
.story-card,
.info-card,
.category-card-large {
  padding: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.06);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: #fff;
  transform: translateX(4px);
}

.rank-num {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  background: #e0f2fe;
  font-weight: 900;
}

.top-rank .rank-num {
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
}

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

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

.category-grid,
.category-large-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.category-tile,
.category-card-large {
  display: block;
  padding: 24px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.96), rgba(37, 99, 235, 0.94));
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.2);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card-large {
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
}

.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 64px rgba(37, 99, 235, 0.24);
}

.category-tile span,
.category-card-large h2 {
  display: block;
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile p,
.category-card-large p,
.page-hero p,
.story-card p,
.detail-copy .lead-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.8;
}

.category-card-large p,
.page-hero p,
.story-card p,
.detail-copy .lead-text {
  color: var(--muted);
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.mini-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: #0e7490;
  background: rgba(14, 165, 233, 0.1);
  font-size: 13px;
  font-weight: 700;
}

.page-shell {
  padding-top: 38px;
}

.page-hero {
  margin-bottom: 28px;
  padding: 36px;
}

.compact-hero {
  padding: 28px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #0891b2;
  font-weight: 800;
}

.filter-panel {
  margin-bottom: 26px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
}

.empty-state {
  padding: 40px;
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
}

.detail-shell {
  padding-top: 34px;
}

.detail-breadcrumb {
  margin-bottom: 24px;
}

.detail-hero {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  align-items: center;
  margin-bottom: 34px;
}

.video-stage {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.22);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.64));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 20px 48px rgba(8, 145, 178, 0.42);
  font-size: 30px;
}

.detail-copy {
  padding: 22px 0;
}

.detail-copy h1 {
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #0e7490;
  font-weight: 800;
}

.detail-tags {
  margin-top: 18px;
}

.detail-content-grid {
  grid-template-columns: minmax(0, 1fr) 330px;
}

.story-card h2 + p {
  margin-top: 14px;
}

.story-card h2:not(:first-child) {
  margin-top: 30px;
}

.info-card dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  margin: 20px 0 24px;
}

.info-card dt {
  color: #64748b;
  font-weight: 800;
}

.info-card dd {
  margin: 0;
  font-weight: 700;
}

.detail-related {
  padding-left: 0;
  padding-right: 0;
}

.side-grid {
  grid-template-columns: 1fr;
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 20px;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
}

.footer-logo {
  margin-bottom: 12px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
  color: #94a3b8;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #fff;
}

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

.footer-links a {
  color: #cbd5e1;
}

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

@media (max-width: 1040px) {
  .split-layout,
  .ranking-layout,
  .detail-content-grid,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .nav-wrap {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0 0 14px;
  }

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

  .site-nav a {
    border-radius: 14px;
  }

  .hero-slider,
  .hero-inner {
    min-height: 720px;
  }

  .hero-inner {
    padding: 88px 18px 180px;
  }

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

  .hero-search {
    bottom: 92px;
    border-radius: 26px;
    flex-direction: column;
  }

  .hero-search button {
    min-height: 48px;
  }

  .hero-control-panel {
    bottom: 24px;
  }

  .section-wrap,
  .page-shell,
  .detail-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .rank-meta {
    grid-column: 2;
  }

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

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

  .movie-card p,
  .tag-list {
    display: none;
  }

  .detail-hero {
    gap: 18px;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .home-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}
