:root {
  color-scheme: light;
  --bg: #f6f8fc;
  --card: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #06b6d4;
  --orange: #f97316;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 38%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.28);
}

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

.nav-links a,
.mobile-panel a,
.footer-links a,
.breadcrumb a {
  color: #334155;
  text-decoration: none;
  font-weight: 600;
}

.nav-links a:hover,
.mobile-panel a:hover,
.footer-links a:hover,
.breadcrumb a:hover {
  color: var(--blue);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.nav-search input,
.search-panel input,
.mobile-panel input {
  min-width: 190px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 9px 12px;
}

.nav-search button,
.search-panel button,
.mobile-panel button,
.primary-btn,
.secondary-btn,
.player-overlay {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.nav-search button,
.search-panel button,
.mobile-panel button,
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 999px;
  padding: 10px 18px;
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.24);
}

.secondary-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 10px 18px;
  backdrop-filter: blur(12px);
  text-decoration: none;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.mobile-panel {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.mobile-panel a {
  display: block;
  padding: 10px 0;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.site-main {
  padding-bottom: 64px;
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) brightness(0.65);
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.22) 100%), linear-gradient(0deg, rgba(15, 23, 42, 0.9), transparent 35%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  align-items: center;
  gap: 46px;
  padding: 98px 0 76px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 8px;
  color: #bfdbfe;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-title h1 {
  margin: 12px 0 18px;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero-copy p,
.page-hero p,
.detail-title p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
}

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

.hero-meta,
.detail-meta,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.hero-meta span,
.detail-meta span,
.meta-pills span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 30px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
}

.hero-card-info {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
}

.hero-card-info strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

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

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

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

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

.section-heading h2,
.page-heading-row h2,
.detail-section h2 {
  margin: 8px 0 0;
  color: #0f172a;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-heading-row p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.09);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
}

.movie-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 360ms ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.year-badge {
  right: 12px;
  background: rgba(15, 23, 42, 0.66);
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, var(--orange), #ef4444);
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card-body p {
  min-height: 3.2em;
  margin: 0 0 12px;
  color: #475569;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta,
.genre-line {
  color: #64748b;
  font-size: 0.86rem;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  color: #1d4ed8;
  background: #eff6ff;
}

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

.category-tile {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 26px;
  padding: 24px;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
  box-shadow: var(--shadow);
  text-decoration: none;
  overflow: hidden;
  position: relative;
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-tile strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 1.45rem;
  margin-bottom: 10px;
}

.category-tile p,
.category-tile span {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.7;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1d4ed8 68%, #06b6d4);
}

.page-hero .container,
.detail-hero .container {
  position: relative;
  z-index: 2;
  padding: 72px 0;
}

.page-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 16%, rgba(255, 255, 255, 0.2), transparent 34%);
}

.search-panel {
  display: flex;
  gap: 12px;
  padding: 14px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-panel input {
  flex: 1;
  min-width: 0;
  font-size: 1rem;
}

.empty-search {
  display: none;
  padding: 42px;
  border-radius: 24px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow);
}

.movie-card.is-hidden {
  display: none;
}

.ranking-list {
  display: grid;
  gap: 16px;
  counter-reset: ranking;
}

.ranking-item {
  counter-increment: ranking;
  display: grid;
  grid-template-columns: 80px 110px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 38px rgba(15, 23, 42, 0.08);
  text-decoration: none;
  color: inherit;
}

.ranking-number {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  font-weight: 900;
}

.ranking-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.ranking-item h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 900;
}

.ranking-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  margin-bottom: 18px;
}

.breadcrumb a {
  color: #e0f2fe;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.34) saturate(1.15);
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.25));
}

.detail-head {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-meta span,
.meta-pills span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 28px;
  padding-top: 42px;
}

.detail-section,
.side-card {
  border-radius: 28px;
  padding: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-section + .detail-section {
  margin-top: 24px;
}

.detail-section p {
  color: #334155;
  line-height: 1.9;
  margin: 14px 0 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  aspect-ratio: 16 / 9;
  margin-top: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  color: #fff;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.4), rgba(37, 99, 235, 0.34));
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--blue);
  font-size: 2rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.player-overlay strong {
  display: block;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
}

.player-shell.is-playing .player-overlay {
  display: none;
}

.side-card {
  position: sticky;
  top: 94px;
}

.side-card h2 {
  margin: 0 0 18px;
  font-size: 1.3rem;
  font-weight: 900;
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-link {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  color: inherit;
  text-decoration: none;
  align-items: center;
}

.side-link img {
  width: 74px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
}

.side-link strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-link span {
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer {
  margin-top: 72px;
  padding: 52px 0 22px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  color: #fff;
  font-size: 1.2rem;
}

.site-footer p {
  max-width: 560px;
  line-height: 1.8;
  margin: 14px 0 0;
}

.site-footer h2 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 14px;
}

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

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

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}

@media (max-width: 1024px) {
  .nav-links,
  .nav-search {
    display: none;
  }

  .mobile-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero-card {
    max-width: 420px;
  }

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

  .side-card {
    position: static;
  }
}

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

  .hero-inner {
    padding-top: 92px;
  }

  .hero-card {
    display: none;
  }

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

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

  .section-heading,
  .page-heading-row {
    display: block;
  }

  .ranking-item {
    grid-template-columns: 54px 82px minmax(0, 1fr);
  }

  .ranking-item .primary-btn {
    display: none;
  }

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

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

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

  .mobile-panel form,
  .search-panel {
    flex-direction: column;
  }
}
