:root {
  --bg: #f6f9ff;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --primary: #2563eb;
  --primary-dark: #1e3a8a;
  --cyan: #06b6d4;
  --accent: #f97316;
  --shadow: 0 24px 70px rgba(30, 64, 175, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 4%, rgba(37, 99, 235, 0.12), transparent 26rem),
    radial-gradient(circle at 92% 10%, rgba(6, 182, 212, 0.12), transparent 28rem),
    linear-gradient(135deg, #f8fbff 0%, #eef6ff 46%, #f7fbff 100%);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.34);
}

.brand-text {
  font-size: 1.12rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.22);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #e0f2fe;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #0f172a;
}

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 70px;
}

.hero {
  position: relative;
  height: 600px;
  margin: 24px auto 34px;
  overflow: hidden;
  border-radius: 34px;
  color: #fff;
  background: linear-gradient(135deg, #1e3a8a, #0891b2);
  box-shadow: var(--shadow);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) 360px;
  align-items: center;
  gap: 44px;
  padding: 74px 84px 108px;
  transition: opacity 0.8s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(30, 64, 175, 0.58), rgba(8, 145, 178, 0.38)),
    var(--hero-image) center / cover;
  filter: saturate(1.12);
  transform: scale(1.04);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 38%, rgba(59, 130, 246, 0.38), transparent 18rem),
    radial-gradient(circle at 86% 28%, rgba(34, 211, 238, 0.3), transparent 20rem),
    linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.82) 100%);
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  color: #0891b2;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-kicker {
  color: #a7f3d0;
}

.hero h1 {
  max-width: 740px;
  margin: 16px 0 10px;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero h2 {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 3vw, 2.75rem);
}

.hero p {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  line-height: 1.85;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #1e3a8a;
  background: rgba(219, 234, 254, 0.96);
  font-size: 0.8rem;
  font-weight: 700;
}

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

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

.primary-button,
.home-search button {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
}

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

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

.hero-poster {
  height: 460px;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: inherit;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(14px);
  font-size: 2rem;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 84px;
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 9px;
}

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

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.hero-thumbs {
  position: absolute;
  right: 42px;
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-thumb {
  width: 88px;
  height: 64px;
  overflow: hidden;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  opacity: 0.72;
  transition: 0.25s ease;
}

.hero-thumb span {
  display: none;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  opacity: 1;
  border-color: #fff;
  transform: translateY(-3px);
}

.quick-search-panel,
.filter-bar,
.page-hero,
.content-section,
.detail-hero,
.player-section,
.detail-text {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  align-items: center;
  gap: 24px;
  margin: 34px 0;
  padding: 28px;
  border-radius: var(--radius);
}

.quick-search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.player-section h2,
.detail-text h2 {
  margin: 8px 0 0;
  letter-spacing: -0.04em;
}

.home-search,
.filter-bar {
  display: flex;
  gap: 12px;
}

.home-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 16px;
  padding: 0 16px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.9);
  outline: none;
}

.home-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.content-section {
  margin: 34px 0;
  padding: 30px;
  border-radius: 30px;
}

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

.section-heading.light,
.hot-section .section-heading {
  color: #fff;
}

.section-heading.light .eyebrow,
.hot-section .eyebrow {
  color: #a7f3d0;
}

.section-more {
  font-weight: 900;
  color: #2563eb;
}

.hot-section {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

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

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

.category-tile {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  color: #fff;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.88)),
    var(--tile-bg) center / cover;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.32), rgba(6, 182, 212, 0.18));
  transition: 0.25s ease;
}

.category-tile:hover::after {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.58), rgba(6, 182, 212, 0.3));
}

.category-tile span {
  font-size: 1.2rem;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  line-height: 1.55;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 58px rgba(37, 99, 235, 0.18);
}

.movie-card .poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

.movie-card .poster img {
  transition: transform 0.35s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.72));
}

.movie-info {
  padding: 16px;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.movie-card h3 {
  margin: 9px 0 8px;
  font-size: 1.06rem;
  line-height: 1.35;
}

.movie-card p {
  min-height: 44px;
  margin: 0 0 12px;
  color: #64748b;
  line-height: 1.55;
  font-size: 0.9rem;
}

.hot-section .movie-card {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.hot-section .movie-meta,
.hot-section .movie-card p,
.hot-section .tag-row span {
  color: rgba(255, 255, 255, 0.78);
}

.hot-section .movie-card h3 {
  color: #fff;
}

.hot-section .tag-row span {
  background: rgba(255, 255, 255, 0.12);
}

.movie-card.compact,
.movie-card.ranking {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
}

.movie-card.compact .poster,
.movie-card.ranking .poster {
  aspect-ratio: auto;
  min-height: 142px;
}

.movie-card.compact .movie-info,
.movie-card.ranking .movie-info {
  padding: 15px;
}

.movie-card.small p {
  display: none;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

.page-shell,
.detail-shell {
  padding-top: 24px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  padding: 56px;
  border-radius: 34px;
  isolation: isolate;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.68)),
    var(--hero-image) center / cover;
}

.page-hero.slim {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(224, 242, 254, 0.82));
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.page-hero p {
  max-width: 760px;
  color: #475569;
  line-height: 1.8;
  font-size: 1.05rem;
}

.small-actions {
  margin-top: 18px;
}

.filter-bar {
  align-items: center;
  margin: 28px 0;
  padding: 18px;
  border-radius: 22px;
}

.filter-bar input {
  flex: 1 1 auto;
}

.filter-bar select {
  width: 160px;
  flex: 0 0 160px;
}

.empty-state {
  display: none;
  margin: 24px 0 0;
  padding: 20px;
  text-align: center;
  color: #64748b;
  border-radius: 18px;
  background: rgba(226, 232, 240, 0.65);
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 18px;
  color: #64748b;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #2563eb;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  padding: 34px;
  border-radius: 34px;
}

.detail-cover {
  min-height: 460px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.detail-copy {
  align-self: center;
}

.detail-copy h1 {
  font-size: clamp(2.1rem, 4.6vw, 4.3rem);
  line-height: 1.05;
}

.lead {
  color: #475569;
  font-size: 1.12rem;
  line-height: 1.85;
}

.detail-meta {
  margin: 20px 0 16px;
}

.tag-row.large span {
  min-height: 34px;
  padding: 7px 12px;
}

.player-section,
.detail-text {
  margin: 30px 0;
  padding: 30px;
  border-radius: 30px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.76));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding-left: 5px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.42);
  font-size: 2rem;
}

.detail-text p {
  color: #475569;
  line-height: 1.95;
  font-size: 1.02rem;
}

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

.site-footer {
  margin-top: 40px;
  padding: 34px 22px;
  color: #e2e8f0;
  background: #0f172a;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: #94a3b8;
}

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

.footer-links a {
  color: #cbd5e1;
  font-weight: 700;
}

@media (max-width: 1120px) {
  .hero-slide {
    grid-template-columns: 1fr 300px;
    padding: 62px 56px 104px;
  }

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

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

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

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

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  main {
    padding: 0 14px 46px;
  }

  .hero {
    height: auto;
    min-height: 720px;
    border-radius: 26px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 26px;
    padding: 46px 24px 138px;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .hero-poster {
    width: min(280px, 78vw);
    height: 360px;
    transform: none;
  }

  .hero-arrow {
    top: auto;
    bottom: 84px;
    transform: none;
  }

  .hero-dots {
    left: 24px;
    bottom: 36px;
  }

  .hero-thumbs {
    display: none;
  }

  .quick-search-panel,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .home-search,
  .filter-bar {
    width: 100%;
    flex-direction: column;
  }

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

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

  .content-section,
  .page-hero,
  .detail-hero,
  .player-section,
  .detail-text {
    padding: 22px;
    border-radius: 24px;
  }

  .detail-cover {
    min-height: 420px;
  }

  .movie-card.compact,
  .movie-card.ranking {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .brand-text {
    font-size: 1rem;
  }

  .hero {
    margin-top: 14px;
  }

  .hero-slide {
    padding: 34px 18px 120px;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .hero-actions {
    gap: 10px;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .movie-grid,
  .movie-grid.dense,
  .ranking-grid,
  .hot-grid,
  .related-grid,
  .category-grid,
  .category-grid.wide {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    min-height: 360px;
  }

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