:root {
  --bg: #f3f8ff;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #607089;
  --line: rgba(15, 23, 42, 0.10);
  --cyan: #06b6d4;
  --blue: #2563eb;
  --purple: #7c3aed;
  --green: #10b981;
  --orange: #f97316;
  --shadow: 0 22px 60px rgba(37, 99, 235, 0.14);
  --soft-shadow: 0 12px 36px rgba(15, 23, 42, 0.10);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #f8fbff 0%, #eef7ff 45%, #ecfeff 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
  box-shadow: 0 12px 36px rgba(37, 99, 235, 0.28);
}

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

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

.brand {
  color: #fff;
  min-width: max-content;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
  transition: transform .25s ease;
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
  transform: scale(1.08) rotate(-4deg);
}

.brand-name {
  font-size: 22px;
}

.site-search-form {
  flex: 1;
  max-width: 420px;
  display: flex;
  position: relative;
}

.site-search-form input,
.large-search-form input,
.local-filter-input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #172033;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 118px 12px 20px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72);
}

.site-search-form button,
.large-search-form button {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  padding: 0 18px;
  cursor: pointer;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  white-space: nowrap;
  transition: color .2s ease, transform .2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 12px 24px 18px;
  background: rgba(15, 23, 42, .24);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, .22);
}

.mobile-nav.open {
  display: grid;
  gap: 12px;
}

.hero {
  position: relative;
  min-height: 670px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity .7s ease;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 56px;
  align-items: center;
  padding: 96px max(32px, calc((100vw - 1280px) / 2 + 24px)) 86px;
}

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0891b2;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.hero .eyebrow,
.detail-hero .eyebrow,
.ranking-hero .eyebrow {
  color: #67e8f9;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
  margin: 16px 0;
  line-height: .98;
  letter-spacing: -0.055em;
}

.hero h1,
.hero h2 {
  font-size: clamp(44px, 6vw, 86px);
}

.hero p,
.page-hero p,
.detail-line {
  margin: 0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
  color: rgba(255, 255, 255, .84);
}

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

.hero-tags {
  margin: 26px 0 0;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  color: #ecfeff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .24);
  padding: 9px 14px;
  backdrop-filter: blur(12px);
}

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

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

.primary-button {
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 36px rgba(6, 182, 212, .32);
}

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

.ghost-button.dark {
  color: var(--blue);
  background: #fff;
  border-color: rgba(37, 99, 235, .18);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(37, 99, 235, .24);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 34px;
  overflow: hidden;
  min-height: 520px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .42);
  transform: rotate(2deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(15, 23, 42, .62));
}

.hero-poster img {
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

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

.hero-dot {
  width: 34px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, .36);
  cursor: pointer;
}

.hero-dot.active {
  background: #fff;
}

.section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px 0;
}

.quick-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: -44px;
  position: relative;
  z-index: 4;
}

.quick-card,
.content-card,
.category-card,
.category-wide-card,
.search-page-panel,
.filter-panel {
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.quick-card {
  padding: 26px;
  display: grid;
  gap: 8px;
  transition: transform .22s ease, box-shadow .22s ease;
}

.quick-card strong {
  font-size: 21px;
}

.quick-card span {
  color: var(--muted);
}

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

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

.section-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading a {
  color: var(--blue);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .09);
  border: 1px solid rgba(15, 23, 42, .06);
  transition: transform .22s ease, box-shadow .22s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dff6ff, #eff6ff);
}

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}

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

.play-corner {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 30px rgba(37, 99, 235, .36);
}

.rank-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 24px rgba(239, 68, 68, .26);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 52px;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.45;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #536275;
  font-size: 13px;
  font-weight: 700;
}

.movie-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f5f9;
}

.tag-row {
  margin-top: 14px;
}

.tag-row span {
  color: #0e7490;
  background: #ecfeff;
  padding: 7px 10px;
}

.tag-row.large span {
  font-size: 15px;
  padding: 10px 14px;
}

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

.category-card {
  padding: 24px;
  transition: transform .22s ease, box-shadow .22s ease;
}

.category-main-link {
  display: grid;
  gap: 12px;
}

.category-icon,
.category-wide-head span {
  width: 58px;
  height: 58px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 34px rgba(37, 99, 235, .24);
}

.category-card h2,
.category-wide-head h2 {
  margin: 0;
  font-size: 24px;
}

.category-card p,
.category-wide-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-mini-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

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

.mini-movie {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background .2s ease;
}

.mini-movie:hover {
  background: #ecfeff;
}

.mini-movie img {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  flex: 0 0 auto;
}

.mini-movie span {
  display: -webkit-box;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.soft-hero {
  color: var(--ink);
}

.soft-hero h1,
.ranking-hero h1 {
  font-size: clamp(42px, 5vw, 72px);
}

.soft-hero p {
  max-width: 790px;
  color: var(--muted);
}

.page-actions .ghost-button {
  color: var(--blue);
  background: #fff;
  border-color: rgba(37, 99, 235, .18);
}

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

.category-wide-card {
  padding: 26px;
  transition: transform .22s ease, box-shadow .22s ease;
}

.category-wide-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.filter-panel {
  padding: 22px;
  margin-bottom: 26px;
}

.filter-panel.compact {
  max-width: 560px;
}

.filter-panel .local-filter-input {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  padding-right: 18px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-chips button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: #155e75;
  background: #ecfeff;
  font-weight: 900;
  cursor: pointer;
}

.filter-chips button.active {
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.ranking-hero {
  max-width: none;
  color: #fff;
  padding: 86px max(24px, calc((100vw - 1280px) / 2 + 24px));
  background: radial-gradient(circle at 20% 0%, rgba(6, 182, 212, .45), transparent 30%), linear-gradient(135deg, #0f172a, #1e3a8a 52%, #312e81);
}

.ranking-hero p {
  max-width: 740px;
  color: rgba(255, 255, 255, .82);
}

.top-rank-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 38px;
}

.top-rank-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: 28px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .20);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .24);
  transition: transform .22s ease, box-shadow .22s ease;
}

.top-rank-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: .48;
}

.top-rank-card strong,
.top-rank-card span {
  position: relative;
  z-index: 2;
}

.top-rank-card strong {
  font-size: 24px;
}

.top-rank-num {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.detail-hero {
  min-height: 620px;
  background-size: cover;
  background-position: center;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 78px 24px;
}

.detail-wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 54px;
  align-items: center;
}

.detail-poster {
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .42);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, .78);
  font-weight: 800;
}

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

.detail-info h1 {
  font-size: clamp(42px, 6vw, 78px);
}

.detail-score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.detail-score-row span {
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .20);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.detail-score-row strong {
  color: #67e8f9;
  font-size: 22px;
}

.player-section {
  padding-top: 58px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background: #020617;
  box-shadow: 0 34px 90px rgba(15, 23, 42, .30);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  background: radial-gradient(circle at center, rgba(6, 182, 212, .28), rgba(2, 6, 23, .62));
  cursor: pointer;
  transition: opacity .22s ease;
}

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

.player-icon {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 48px rgba(37, 99, 235, .38);
  font-size: 28px;
  padding-left: 4px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.content-card {
  padding: 30px;
}

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

.content-card p {
  margin: 0;
  color: #4b5563;
  line-height: 2;
  font-size: 17px;
}

.tag-content {
  grid-column: 1 / -1;
}

.search-page-panel {
  padding: 24px;
  margin-bottom: 34px;
}

.large-search-form {
  position: relative;
  max-width: 760px;
}

.large-search-form input {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  min-height: 58px;
}

.large-search-form button {
  min-width: 96px;
}

.site-footer {
  margin-top: 88px;
  color: #e5f2ff;
  background: linear-gradient(135deg, #0f172a, #1e3a8a 55%, #0f172a);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px 34px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

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

.site-footer p {
  color: rgba(229, 242, 255, .76);
  line-height: 1.8;
  max-width: 460px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #67e8f9;
  font-size: 18px;
}

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

.footer-links a {
  color: rgba(229, 242, 255, .78);
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px 34px;
  color: rgba(229, 242, 255, .68);
  border-top: 1px solid rgba(255, 255, 255, .12);
}

[data-card].is-hidden {
  display: none;
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-poster {
    display: none;
  }

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

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

@media (max-width: 820px) {
  .header-inner {
    padding: 0 16px;
  }

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

  .site-search-form {
    display: none;
  }

  .hero {
    min-height: 590px;
  }

  .hero-slide {
    padding: 82px 20px 74px;
  }

  .quick-panel,
  .top-rank-row,
  .footer-grid,
  .detail-wrap,
  .category-mini-list.wide {
    grid-template-columns: 1fr;
  }

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

  .detail-hero {
    padding: 52px 20px;
  }

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

  .section-wrap,
  .page-hero {
    padding-left: 18px;
    padding-right: 18px;
  }
}

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

  .hero h1,
  .hero h2 {
    font-size: 42px;
  }

  .hero p,
  .detail-line {
    font-size: 16px;
  }

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

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

  .player-shell {
    border-radius: 22px;
  }
}
