* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --sky: #0284c7;
  --sky-soft: #e0f2fe;
  --emerald: #059669;
  --amber: #f59e0b;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--emerald));
  box-shadow: 0 14px 26px rgba(2, 132, 199, 0.25);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(135deg, var(--sky), var(--emerald));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand.dark .brand-text {
  color: #ffffff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.main-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 12px;
  color: #334155;
  font-size: 15px;
  font-weight: 650;
  transition: 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  width: 280px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.header-search input,
.mobile-search input,
.search-controls input,
.search-controls select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  padding: 0 12px;
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--emerald));
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-soft);
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.mobile-panel.open {
  display: block;
}

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 10px;
  margin: 8px auto 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
}

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

.hero-slide {
  display: none;
  min-height: 620px;
  position: relative;
}

.hero-slide.active {
  display: block;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.32)), var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.32), transparent 34%), radial-gradient(circle at 72% 35%, rgba(16, 185, 129, 0.22), transparent 30%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 360px;
  gap: 56px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  padding: 58px 0 78px;
}

.eyebrow,
.page-hero p,
.section-heading p,
.rank-copy p {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--sky);
  background: var(--sky-soft);
  font-size: 14px;
  font-weight: 750;
}

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

.hero-copy h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 700;
}

.hero-copy .hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--emerald));
  box-shadow: 0 18px 38px rgba(2, 132, 199, 0.26);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #0f172a, #075985);
}

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

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.86);
  box-shadow: 0 14px 32px rgba(2, 132, 199, 0.42);
}

.hero-controls {
  position: absolute;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 28px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 28px;
  backdrop-filter: blur(10px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
}

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

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

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

.section-heading h2,
.page-hero h1,
.rank-copy h2 {
  margin: 10px 0 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-more {
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--sky);
  background: #ffffff;
  font-weight: 750;
}

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

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

.category-tile {
  display: grid;
  gap: 14px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
  transition: 0.2s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  min-height: 90px;
}

.category-covers img {
  width: 100%;
  height: 105px;
  object-fit: cover;
  border-radius: 13px;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.category-tile strong {
  font-size: 18px;
}

.category-tile span {
  color: var(--muted);
  font-size: 14px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
  transition: 0.2s ease;
}

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

.poster-frame {
  position: relative;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #e0f2fe, #d1fae5);
}

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

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

.score-badge,
.play-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
}

.score-badge {
  top: 12px;
  left: 12px;
  min-width: 46px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.94);
}

.play-badge {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(2, 132, 199, 0.86);
  backdrop-filter: blur(8px);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h2 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 54px;
  margin: 8px 0 8px;
  font-size: 19px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-grid.dense .movie-card h2 {
  min-height: 46px;
  font-size: 16px;
}

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

.rank-band {
  padding: 62px 0;
  color: #ffffff;
  background: radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.35), transparent 32%), linear-gradient(135deg, #020617, #0f172a 52%, #064e3b);
}

.rank-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: center;
}

.rank-copy p {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.rank-copy h2 {
  margin-bottom: 18px;
}

.rank-copy span {
  display: block;
  max-width: 520px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.78);
}

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

.rank-list.compact {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.rank-item {
  display: grid;
  grid-template-columns: 48px 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 10px;
  border-radius: 18px;
  color: var(--text);
  background: #ffffff;
  transition: 0.2s ease;
}

.rank-list.compact .rank-item {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.rank-item:hover {
  transform: translateX(4px);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--emerald));
  font-weight: 900;
}

.rank-item img {
  width: 58px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #e0f2fe, #d1fae5);
}

.rank-info {
  display: grid;
  min-width: 0;
}

.rank-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list.compact .rank-info em {
  color: rgba(255, 255, 255, 0.66);
}

.rank-score {
  color: var(--amber);
  font-weight: 900;
}

.page-shell {
  min-height: 60vh;
}

.page-hero {
  padding: 78px 0 28px;
}

.page-hero.slim {
  padding-top: 56px;
}

.page-hero span {
  display: block;
  max-width: 760px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 17px;
}

.filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
}

.filter-strip a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #0369a1;
  background: var(--sky-soft);
  font-weight: 750;
}

.search-panel {
  padding: 28px 0 60px;
}

.search-controls {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}

.search-controls input,
.search-controls select {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.rank-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  padding: 28px 0 62px;
}

.rank-list.full .rank-item {
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.rank-side {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.rank-side h2 {
  margin: 0 0 8px;
}

.rank-side a {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: #0369a1;
  font-weight: 750;
}

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

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.62)), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(2px);
  transform: scale(1.04);
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  padding: 70px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  background: linear-gradient(135deg, #e0f2fe, #d1fae5);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.detail-copy h1 {
  margin: 16px 0;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.detail-copy p {
  max-width: 820px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.detail-copy .primary-btn {
  margin-top: 28px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  padding: 34px 0 22px;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
  align-content: start;
}

.player-card,
.story-card,
.info-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.video-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.46));
  cursor: pointer;
}

.video-start span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--emerald));
  box-shadow: 0 18px 44px rgba(2, 132, 199, 0.42);
  font-size: 34px;
}

.video-start.hidden {
  display: none;
}

.story-card,
.info-card {
  padding: 24px;
}

.story-card h2,
.info-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.story-card p {
  margin: 0;
  color: #334155;
  font-size: 16px;
  white-space: pre-line;
}

.info-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-card dt {
  color: var(--muted);
}

.info-card dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.side-related {
  display: grid;
  gap: 10px;
}

.side-related .rank-item {
  grid-template-columns: 34px 48px minmax(0, 1fr);
  min-height: 64px;
  padding: 8px;
  box-shadow: none;
}

.side-related .rank-item .rank-score {
  display: none;
}

.side-related .rank-num {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 12px;
}

.side-related .rank-item img {
  width: 48px;
  height: 64px;
}

.site-footer {
  margin-top: 42px;
  padding: 54px 0;
  color: rgba(255, 255, 255, 0.72);
  background: #020617;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 36px;
}

.footer-brand p {
  max-width: 520px;
  margin: 16px 0 0;
}

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

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

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

.hidden-card {
  display: none !important;
}

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

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

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

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

  .detail-layout,
  .rank-page-grid {
    grid-template-columns: 1fr;
  }

  .rank-side {
    position: static;
  }
}

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

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

  .nav-wrap {
    min-height: 66px;
  }

  .hero-slider,
  .hero-slide,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 48px 0 92px;
  }

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

  .hero-copy h1 {
    font-size: clamp(38px, 13vw, 64px);
  }

  .hero-controls {
    left: 16px;
    right: auto;
  }

  .rank-layout,
  .detail-hero-inner,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .search-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-container {
    width: min(100% - 24px, 1180px);
  }

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

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

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

  .movie-card h2,
  .movie-grid.dense .movie-card h2 {
    min-height: 42px;
    font-size: 15px;
  }

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

  .category-covers img {
    height: 74px;
  }

  .rank-item {
    grid-template-columns: 38px 50px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

  .detail-hero-inner {
    padding: 42px 0;
  }

  .detail-layout {
    padding-top: 20px;
  }

  .story-card,
  .info-card {
    padding: 18px;
  }
}
