:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-900: #0c4a6e;
  --mist-50: #f8fafc;
  --mist-100: #f1f5f9;
  --mist-200: #e2e8f0;
  --mist-300: #cbd5e1;
  --mist-500: #64748b;
  --mist-600: #475569;
  --mist-700: #334155;
  --mist-800: #1e293b;
  --mist-900: #0f172a;
  --white: #ffffff;
  --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 24px 55px rgba(15, 23, 42, 0.18);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--mist-900);
  background: linear-gradient(180deg, var(--mist-50) 0%, #ffffff 42%, var(--primary-50) 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--mist-200);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 68px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--mist-900);
}

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

.logo-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-900));
  box-shadow: 0 10px 20px rgba(2, 132, 199, 0.28);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: 10px;
}

.nav-link {
  color: var(--mist-700);
  font-size: 15px;
  font-weight: 650;
  padding: 9px 0;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-600);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  border: 1px solid var(--mist-300);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.header-search input,
.mobile-search input,
.wide-search input,
.filter-bar input,
.filter-bar select {
  border: 0;
  outline: 0;
  background: #fff;
  color: var(--mist-800);
}

.header-search input {
  width: 220px;
  padding: 10px 12px;
}

.header-search button,
.mobile-search button,
.wide-search button {
  border: 0;
  color: #fff;
  background: var(--primary-600);
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.wide-search button:hover {
  background: var(--primary-700);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--mist-100);
  cursor: pointer;
}

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

.mobile-panel {
  border-top: 1px solid var(--mist-200);
  padding: 16px 24px 22px;
  background: #fff;
}

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

.mobile-panel .nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--mist-50);
}

.mobile-search {
  display: flex;
  border: 1px solid var(--mist-300);
  border-radius: 12px;
  overflow: hidden;
}

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

.hero-carousel {
  max-width: 1280px;
  margin: 24px auto 0;
  padding: 0 24px;
}

.hero-stage {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--mist-900);
  box-shadow: var(--shadow-hover);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 0.55s ease, transform 0.7s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 590px;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(14, 165, 233, 0.42), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.08));
}

.hero-copy {
  position: absolute;
  left: clamp(28px, 7vw, 88px);
  top: 50%;
  transform: translateY(-50%);
  max-width: 640px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-copy .eyebrow,
.page-hero .eyebrow,
.detail-info .eyebrow,
.ranking-hero .eyebrow {
  color: #7dd3fc;
}

.hero-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

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

.hero-tags,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

.hero-tags span,
.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

.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: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-900));
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.35);
}

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

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

.hero-dots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.hero-dot {
  border: 1px solid var(--mist-200);
  background: rgba(255, 255, 255, 0.84);
  color: var(--mist-700);
  min-height: 52px;
  border-radius: 15px;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: border 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hero-dot span {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 750;
}

.hero-dot.active,
.hero-dot:hover {
  border-color: var(--primary-500);
  color: var(--primary-700);
  transform: translateY(-1px);
}

.search-band,
.section-wrap,
.page-hero,
.detail-shell {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.search-band {
  margin-top: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-top: 28px;
  padding-bottom: 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.search-band h2,
.section-head h2,
.page-hero h1 {
  margin: 8px 0 0;
}

.search-band h2 {
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.wide-search {
  min-width: min(520px, 100%);
  display: flex;
  overflow: hidden;
  border: 1px solid var(--mist-300);
  border-radius: 16px;
}

.wide-search input {
  flex: 1;
  min-width: 0;
  padding: 16px 18px;
}

.wide-search button {
  padding: 0 24px;
}

.section-wrap {
  margin-top: 54px;
}

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

.section-head h2 {
  font-size: clamp(26px, 3.4vw, 42px);
  letter-spacing: -0.045em;
}

.section-head a {
  color: var(--primary-700);
  font-weight: 800;
}

.section-head.small h2 {
  font-size: 26px;
}

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

.category-card,
.category-overview-card,
.movie-card,
.content-card,
.rank-panel {
  background: #fff;
  border: 1px solid var(--mist-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.category-card {
  position: relative;
  min-height: 210px;
  padding: 18px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.88));
  z-index: 1;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
}

.category-card span {
  font-size: 20px;
  font-weight: 850;
}

.category-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  line-height: 1.55;
}

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

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

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

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

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

.movie-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--mist-200);
}

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

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

.quality-mark,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.quality-mark {
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  background: rgba(15, 23, 42, 0.74);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.25);
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.86);
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-700);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  font-size: 22px;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

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

.movie-card h3 a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-card p {
  min-height: 42px;
  margin: 9px 0 12px;
  color: var(--mist-600);
  font-size: 13px;
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  color: var(--mist-500);
  font-size: 12px;
  gap: 8px;
}

.card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--mist-100);
}

.rank-panel {
  padding: 18px;
}

.sticky-panel {
  position: sticky;
  top: 94px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 34px 52px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 14px;
  background: var(--mist-50);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  background: var(--primary-50);
  transform: translateX(3px);
}

.ranking-num {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-100);
  font-weight: 900;
}

.ranking-row img {
  width: 52px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--mist-200);
}

.ranking-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ranking-main strong,
.ranking-main em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-main strong {
  font-size: 14px;
}

.ranking-main em {
  color: var(--mist-500);
  font-size: 12px;
  font-style: normal;
}

.ranking-arrow {
  color: var(--mist-400);
  font-size: 26px;
}

.page-hero,
.detail-shell {
  margin-top: 28px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 10%, rgba(14, 165, 233, 0.34), transparent 28%),
    linear-gradient(135deg, var(--mist-900), var(--primary-900));
  color: #fff;
}

.page-hero {
  padding-top: 58px;
  padding-bottom: 62px;
}

.compact-hero {
  padding-top: 46px;
  padding-bottom: 48px;
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  letter-spacing: -0.055em;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 210px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-overview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-overview-card div {
  padding: 24px;
}

.category-overview-card h2 {
  margin: 10px 0;
  font-size: 28px;
}

.category-overview-card p {
  color: var(--mist-600);
  line-height: 1.7;
}

.filter-bar {
  display: flex;
  gap: 12px;
  padding: 14px;
  margin-bottom: 24px;
  border: 1px solid var(--mist-200);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  border: 1px solid var(--mist-300);
  border-radius: 12px;
  padding: 0 14px;
}

.filter-bar input {
  flex: 1;
  min-width: 0;
}

.filter-bar select {
  width: 150px;
}

.detail-shell {
  padding: 26px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: stretch;
}

.player-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.35);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(14, 165, 233, 0.34), transparent 24%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  z-index: 3;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay span {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--primary-700);
  background: #fff;
  box-shadow: 0 18px 35px rgba(2, 6, 23, 0.32);
  font-size: 30px;
}

.player-overlay strong {
  font-size: 18px;
}

.detail-info {
  padding: 20px 4px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

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

.detail-line {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 17px;
  line-height: 1.8;
}

.detail-meta {
  margin-bottom: 14px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

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

.content-card p {
  margin: 0;
  color: var(--mist-700);
  font-size: 17px;
  line-height: 1.9;
}

.site-footer {
  margin-top: 70px;
  background: var(--mist-900);
  color: var(--mist-300);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-logo {
  color: #fff;
  font-size: 20px;
}

.site-footer p {
  max-width: 520px;
  color: var(--mist-300);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer-links a {
  color: var(--mist-300);
  font-weight: 700;
}

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

.footer-bottom {
  border-top: 1px solid rgba(226, 232, 240, 0.12);
  padding: 18px 24px;
  text-align: center;
  color: var(--mist-500);
}

@media (max-width: 1180px) {
  .category-grid,
  .wide-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .side-column {
    order: -1;
  }

  .sticky-panel {
    position: static;
  }
}

@media (max-width: 980px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-stage,
  .hero-slide img {
    min-height: 520px;
  }

  .hero-dots {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .search-band,
  .detail-layout {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .search-band {
    display: grid;
  }

  .detail-layout {
    display: grid;
  }

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

@media (max-width: 720px) {
  .header-inner,
  .hero-carousel,
  .search-band,
  .section-wrap,
  .page-hero,
  .detail-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-logo {
    font-size: 18px;
  }

  .hero-stage,
  .hero-slide img {
    min-height: 560px;
    border-radius: 22px;
  }

  .hero-copy {
    left: 22px;
    right: 22px;
    max-width: none;
  }

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

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

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

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

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .category-overview-card img {
    height: 220px;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-bar select {
    width: 100%;
  }

  .detail-shell {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .category-grid,
  .movie-grid,
  .wide-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .wide-search {
    flex-direction: column;
  }

  .wide-search button {
    min-height: 46px;
  }

  .ranking-row {
    grid-template-columns: 30px 46px minmax(0, 1fr);
  }

  .ranking-arrow {
    display: none;
  }
}
