:root {
  color-scheme: light;
  --page-bg: #f8fbff;
  --surface: #ffffff;
  --surface-soft: #f0f9ff;
  --surface-strong: #e0f2fe;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbeafe;
  --primary: #38bdf8;
  --primary-dark: #0284c7;
  --accent: #22d3ee;
  --shadow: 0 18px 45px rgba(14, 165, 233, 0.13);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(125, 211, 252, 0.26), transparent 30rem),
    linear-gradient(180deg, rgba(240, 249, 255, 0.78), #ffffff 28rem, rgba(240, 249, 255, 0.52));
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(191, 219, 254, 0.8);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.08);
  backdrop-filter: blur(16px);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 76px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 26px rgba(14, 165, 233, 0.28);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-name {
  font-size: 24px;
  letter-spacing: -0.04em;
  color: transparent;
  background: linear-gradient(90deg, #0284c7, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
}

.logo-subtitle {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #334155;
  font-weight: 700;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-form {
  position: relative;
  width: 260px;
}

.search-form input,
.filter-panel input,
.filter-panel select,
.search-page-form input {
  width: 100%;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  outline: none;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input {
  padding: 11px 46px 11px 18px;
}

.search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-page-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

.search-form button,
.search-page-form button {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 22px rgba(14, 165, 233, 0.22);
}

.search-form button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid #bae6fd;
  border-radius: 14px;
  color: #0284c7;
  background: #ffffff;
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 48%, #ecfeff 100%);
}

.hero-track {
  position: relative;
  min-height: 650px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: scale(1.012);
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
  opacity: 0.42;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(248, 251, 255, 0.96) 0%, rgba(248, 251, 255, 0.83) 42%, rgba(248, 251, 255, 0.34) 100%),
    radial-gradient(circle at 76% 44%, rgba(56, 189, 248, 0.26), transparent 22rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.72fr);
  align-items: center;
  gap: 46px;
  padding: 88px 0 96px;
}

.hero-eyebrow,
.section-eyebrow,
.detail-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 18px;
  padding: 7px 13px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  color: #0369a1;
  background: rgba(240, 249, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.gradient-title {
  color: transparent;
  background: linear-gradient(90deg, #0f172a 0%, #0284c7 48%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-description {
  max-width: 680px;
  margin: 24px 0 0;
  color: #475569;
  font-size: 19px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
}

.badge,
.tag,
.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 13px;
  font-weight: 800;
}

.badge,
.tag {
  padding: 7px 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 16px 30px rgba(14, 165, 233, 0.28);
}

.btn-secondary {
  color: #0369a1;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #bae6fd;
}

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

.hero-card {
  position: relative;
  border: 1px solid rgba(186, 230, 253, 0.86);
  border-radius: 32px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.hero-poster img,
.poster-wrap img,
.detail-poster img,
.related-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.hero-card:hover img,
.movie-card:hover img,
.related-card:hover img {
  transform: scale(1.045);
}

.hero-card-caption {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 34px;
  padding: 16px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.72));
}

.hero-card-caption strong {
  display: block;
  font-size: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: #bae6fd;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.section {
  padding: 72px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-desc {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(186, 230, 253, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 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(56, 189, 248, 0.62);
  box-shadow: var(--shadow);
}

.poster-wrap {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 17px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #0284c7;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card h3 a:hover,
.related-card h3 a:hover,
.text-link:hover,
.footer a:hover {
  color: var(--primary-dark);
}

.movie-card p {
  flex: 1;
  margin: 10px 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.text-link {
  display: inline-flex;
  width: fit-content;
  color: #0284c7;
  font-weight: 900;
}

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

.category-card,
.feature-card,
.rank-card,
.info-card {
  border: 1px solid rgba(186, 230, 253, 0.82);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h3,
.feature-card h3,
.info-card h3 {
  margin: 0 0 10px;
  font-size: 23px;
}

.category-card p,
.feature-card p,
.info-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.rank-card {
  display: grid;
  grid-template-columns: auto 78px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.rank-number {
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.rank-thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.subhero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 46px;
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.92), rgba(255, 255, 255, 0.92) 55%, rgba(236, 254, 255, 0.84));
}

.subhero h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.07em;
}

.subhero p {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel,
.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid #bae6fd;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 16px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #bae6fd;
  border-radius: 14px;
  color: #0369a1;
  background: rgba(255, 255, 255, 0.9);
  font-weight: 900;
}

.page-link.is-active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.detail-hero {
  padding: 70px 0 48px;
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.95), #ffffff 58%, rgba(236, 254, 255, 0.9));
}

.detail-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 12px solid rgba(255, 255, 255, 0.85);
  border-radius: 34px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
  box-shadow: var(--shadow);
}

.detail-content h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.07em;
}

.detail-lead {
  margin: 20px 0 0;
  color: #475569;
  font-size: 19px;
  line-height: 1.85;
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.28);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.32), rgba(2, 6, 23, 0.42));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer span {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.36);
  font-size: 32px;
  transform: translateX(2px);
}

.player-shell.is-playing .play-layer {
  opacity: 0;
  visibility: hidden;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.article-card {
  border: 1px solid rgba(186, 230, 253, 0.82);
  border-radius: 28px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.08);
}

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

.article-card p {
  margin: 0 0 18px;
  color: #475569;
  line-height: 1.9;
}

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

.related-card {
  overflow: hidden;
  border: 1px solid rgba(186, 230, 253, 0.82);
  border-radius: 22px;
  background: #ffffff;
}

.related-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.related-card div:last-child {
  padding: 14px;
}

.related-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.search-page-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  max-width: 780px;
  margin-top: 30px;
}

.search-page-form input {
  min-height: 52px;
  padding: 0 18px;
  border-radius: 18px;
}

.search-page-form button {
  min-width: 118px;
  border-radius: 18px;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid #bae6fd;
  border-radius: 24px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
}

.empty-state.is-visible {
  display: block;
}

.footer {
  margin-top: 64px;
  padding: 48px 0;
  border-top: 1px solid rgba(186, 230, 253, 0.8);
  background: rgba(255, 255, 255, 0.82);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 28px;
}

.footer h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer p,
.footer a {
  color: var(--muted);
  line-height: 1.8;
}

.footer a {
  display: block;
  margin: 8px 0;
}

img.is-missing {
  opacity: 0;
}

.hide-card {
  display: none;
}

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

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

  .hero-card,
  .detail-poster {
    max-width: 430px;
  }

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

@media (max-width: 820px) {
  .nav-links,
  .header-actions .search-form {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .mobile-panel {
    position: fixed;
    inset: 76px 16px auto 16px;
    z-index: 70;
    display: none;
    border: 1px solid #bae6fd;
    border-radius: 24px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

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

  .mobile-panel a {
    display: block;
    padding: 12px 8px;
    color: #334155;
    font-weight: 800;
  }

  .mobile-panel .search-form {
    width: 100%;
    margin-top: 10px;
  }

  .hero,
  .hero-track {
    min-height: 760px;
  }

  .hero-grid {
    gap: 28px;
    padding: 58px 0 90px;
  }

  .section-header {
    display: block;
  }

  .movie-grid,
  .category-grid,
  .feature-grid,
  .rank-list,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .logo-name {
    font-size: 20px;
  }

  .hero h1,
  .subhero h1,
  .detail-content h1 {
    letter-spacing: -0.04em;
  }

  .movie-grid,
  .category-grid,
  .feature-grid,
  .rank-list,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: auto 70px minmax(0, 1fr);
  }

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

  .article-card {
    padding: 22px;
  }
}
