:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-soft: #e0f2fe;
  --secondary: #0f172a;
  --secondary-light: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --page: #f8fafc;
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--secondary);
  background: linear-gradient(180deg, #f8fafc 0%, #eef7ff 42%, #f8fafc 100%);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(226, 232, 240, 0.84);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.35);
}

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

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

.nav-link,
.mobile-link {
  color: var(--secondary-light);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--primary-soft);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: var(--primary-dark);
}

.mobile-nav {
  display: none;
}

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

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.58) 45%, rgba(2, 132, 199, 0.22) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.12) 48%, rgba(2, 6, 23, 0.62) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: center;
  gap: 56px;
  color: #ffffff;
}

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

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 14px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 14px;
  font-weight: 900;
}

.hero-kicker {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy p {
  width: min(680px, 100%);
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
}

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

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 11px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 700;
}

.tag-row span {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

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

.button-primary,
.button-ghost,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 900;
  transition: 0.22s ease;
}

.button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  box-shadow: 0 14px 30px rgba(2, 132, 199, 0.32);
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(2, 132, 199, 0.42);
}

.button-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster span {
  display: block;
  padding: 16px;
  color: #ffffff;
  font-weight: 900;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 32px;
  background: #ffffff;
}

.content-section {
  width: min(1200px, calc(100% - 32px));
  margin: 52px auto;
}

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

.section-head h2 {
  margin: 12px 0 6px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.section-link {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.search-panel {
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px 18px;
  outline: none;
  color: var(--secondary);
  background: #ffffff;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-button {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--secondary-light);
  background: #f1f5f9;
  cursor: pointer;
  font-weight: 800;
}

.filter-button:hover,
.filter-button.is-active {
  color: #ffffff;
  background: var(--primary);
}

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

.category-tile {
  overflow: hidden;
  min-height: 230px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 16px;
}

.category-thumbs img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  object-fit: cover;
}

.category-tile strong {
  display: block;
  font-size: 20px;
}

.category-tile span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.all-movie-grid {
  margin-top: 24px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e2e8f0;
}

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

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

.poster-play,
.rank-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.88);
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.35);
}

.card-body {
  padding: 15px;
}

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

.card-body h3 a:hover {
  color: var(--primary-dark);
}

.card-meta {
  margin: 7px 0;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  min-height: 46px;
  margin: 0;
  color: var(--secondary-light);
  font-size: 14px;
}

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

.ranking-panel {
  position: sticky;
  top: 94px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  padding: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.ranking-panel h2 {
  margin: 0 0 16px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 32px 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  padding: 8px;
  background: #f8fafc;
}

.compact-card:hover {
  background: var(--primary-soft);
}

.compact-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: #ffffff;
  background: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.compact-card img {
  width: 54px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
}

.compact-card strong,
.compact-card em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.page-hero {
  padding: 92px 0;
  background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.38), transparent 34%), linear-gradient(135deg, #020617, #075985 70%, #0284c7);
}

.page-hero > div {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero h1 {
  max-width: 760px;
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.detail-hero {
  min-height: 560px;
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  min-height: 430px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 20px 0 12px;
  font-size: clamp(36px, 5.8vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.06em;
}

.detail-meta,
.detail-one-line {
  color: rgba(255, 255, 255, 0.88);
}

.detail-one-line {
  max-width: 820px;
  font-size: 18px;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.player-section {
  margin-top: -58px;
  position: relative;
  z-index: 4;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

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

.player-cover {
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.78));
  cursor: pointer;
}

.movie-player.is-playing .player-cover {
  display: none;
}

.player-start {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin-bottom: 14px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  box-shadow: 0 18px 44px rgba(2, 132, 199, 0.45);
  font-size: 34px;
  line-height: 1;
}

.player-cover strong {
  display: block;
  padding: 0 20px;
  font-size: clamp(20px, 3vw, 34px);
}

.article-card {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 42px);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.article-card h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.article-card p {
  margin: 0 0 28px;
  color: var(--secondary-light);
  font-size: 17px;
}

.article-card p:last-child {
  margin-bottom: 0;
}

.site-footer {
  margin-top: 80px;
  color: #cbd5e1;
  background: #020617;
}

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

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

.footer-inner p {
  max-width: 560px;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-content: start;
}

.footer-links a {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  background: rgba(255, 255, 255, 0.16);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 16px;
  text-align: center;
  color: #94a3b8;
}

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

@media (max-width: 1080px) {
  .movie-grid,
  .featured-grid,
  .compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .ranking-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .mobile-nav {
    display: grid;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 49;
    padding: 16px;
    gap: 10px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    transform: translateY(-140%);
    transition: transform 0.22s ease;
  }

  body.nav-open .mobile-nav {
    transform: translateY(0);
  }

  .mobile-link {
    display: block;
  }

  .hero-carousel,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 24px;
  }

  .hero-poster {
    display: none;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .section-head,
  .footer-inner {
    display: block;
  }

  .section-link {
    margin-top: 14px;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .top-rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }

  .detail-poster {
    width: min(220px, 70vw);
  }

  .player-section {
    margin-top: -28px;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 24px;
  }
}

@media (max-width: 480px) {
  .header-inner,
  .content-section,
  .page-hero > div,
  .detail-inner,
  .footer-inner,
  .hero-content {
    width: min(100% - 22px, 1200px);
  }

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

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .top-rank-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .search-panel {
    padding: 16px;
  }

  .compact-card {
    grid-template-columns: 28px 48px minmax(0, 1fr);
  }
}
