:root {
  color-scheme: light;
  --bg: #f7fafc;
  --surface: #ffffff;
  --surface-soft: #f0fdf4;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #059669;
  --brand-dark: #047857;
  --brand-soft: #d1fae5;
  --blue-soft: #eff6ff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg), #ffffff 38%, #f8fafc 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 20px;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #22c55e, #38bdf8);
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.32);
}

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

.nav-link {
  padding: 10px 15px;
  border-radius: 999px;
  color: #475569;
  font-weight: 650;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: #0f172a;
  border-radius: 20px;
}

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

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  margin: 0 calc(50% - 50vw) 56px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.75s ease;
}

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

.hero-blur {
  position: absolute;
  inset: -38px;
  background-size: cover;
  background-position: center;
  filter: blur(22px) brightness(0.42);
  transform: scale(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.2)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.75), transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
  color: #ffffff;
}

.hero-meta,
.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #d1fae5;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-meta span,
.eyebrow {
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.22);
}

.hero-meta b {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

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

.hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-actions,
.footer-links,
.chip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn,
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  border: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.search-form button:hover {
  transform: translateY(-2px);
}

.btn.primary,
.search-form button {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.28);
}

.btn.primary:hover,
.search-form button:hover {
  background: var(--brand-dark);
}

.btn.ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

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

.hero-prev,
.hero-next {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  font-size: 30px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.hero-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.page-shell {
  padding-top: 34px;
}

.panel,
.content-section,
.page-hero,
.detail-hero,
.player-section,
.detail-text {
  margin-bottom: 54px;
}

.panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  padding: 28px;
  margin-top: -24px;
  position: relative;
  z-index: 5;
}

.quick-search h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-text h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.quick-search p,
.section-head p,
.page-hero p,
.detail-text p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.search-form {
  display: flex;
  gap: 12px;
}

.search-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 15px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

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

.section-head h2 {
  font-size: clamp(28px, 3.2vw, 40px);
}

.section-head p {
  margin: 8px 0 0;
}

.section-more {
  flex: 0 0 auto;
  color: var(--brand-dark);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover,
.wide-card:hover,
.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.14);
}

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

.poster-wrap img,
.detail-poster img,
.category-tile img,
.wide-card img,
.movie-row img,
.category-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s ease;
}

.movie-card:hover img,
.wide-card:hover img,
.category-tile:hover img,
.category-overview-card:hover img {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 52%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.poster-type,
.poster-play {
  position: absolute;
  z-index: 2;
}

.poster-type {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.card-body {
  padding: 15px;
  display: grid;
  gap: 6px;
}

.card-body strong,
.wide-card strong,
.movie-row strong {
  color: #0f172a;
  font-size: 16px;
  line-height: 1.35;
}

.card-body em,
.wide-card em,
.movie-row em,
.category-info em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
}

.card-line {
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.feature-panel {
  padding: 32px;
  border-radius: 32px;
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

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

.category-tile,
.category-overview-card {
  position: relative;
  display: grid;
  overflow: hidden;
  border-radius: 22px;
  min-height: 180px;
  color: #ffffff;
  background: #0f172a;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile img {
  position: absolute;
  inset: 0;
  opacity: 0.62;
}

.category-tile:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.08));
}

.category-tile span {
  position: relative;
  z-index: 2;
  align-self: end;
  padding: 18px;
  display: grid;
  gap: 8px;
}

.category-tile strong,
.category-info strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.category-tile em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
  font-size: 13px;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 15px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.wide-card img {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
}

.wide-content {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 15px;
  font-size: 13px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 58px;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.25), transparent 34%),
    linear-gradient(135deg, #0f172a, #064e3b 62%, #0f766e);
  color: #ffffff;
}

.small-hero {
  min-height: 260px;
  display: flex;
  align-items: center;
}

.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.02;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  margin: 16px 0 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--brand-dark);
  font-weight: 700;
}

.filter-panel {
  padding: 22px;
}

.filter-row {
  display: flex;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-row label {
  display: grid;
  gap: 8px;
  min-width: 220px;
  flex: 1;
  color: #334155;
  font-weight: 750;
}

.filter-row label.grow {
  flex: 999;
}

.chip-row {
  margin-top: 16px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  color: #475569;
  background: #ffffff;
  font-weight: 750;
}

.chip.active,
.chip:hover {
  color: #ffffff;
  border-color: var(--brand);
  background: var(--brand);
}

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

.category-overview-card {
  min-height: auto;
  grid-template-columns: 180px 1fr;
  color: var(--text);
  background: #ffffff;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  min-height: 180px;
  overflow: hidden;
}

.category-info {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 24px;
}

.ranking-list {
  list-style: none;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.ranking-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 12px;
}

.ranking-number {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-weight: 900;
}

.movie-row {
  display: grid;
  grid-template-columns: 72px 70px minmax(0, 1fr) 180px;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.movie-row img {
  width: 72px;
  height: 72px;
  border-radius: 14px;
}

.row-rank {
  color: #94a3b8;
  font-weight: 850;
}

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

.row-genre {
  color: #64748b;
  text-align: right;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  color: #ffffff;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-backdrop {
  position: absolute;
  inset: -35px;
  background-size: cover;
  background-position: center;
  filter: blur(26px) brightness(0.38);
  transform: scale(1.08);
}

.detail-hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.56));
}

.detail-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 42px;
  padding: 44px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.34);
  background: #1e293b;
}

.detail-info h1 {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.04;
}

.detail-one-line {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.8;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
}

.tag-list span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.detail-meta span {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.detail-meta b {
  color: #a7f3d0;
}

.player-section {
  scroll-margin-top: 92px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.24);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.18));
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 18px 42px rgba(5, 150, 105, 0.35);
  font-size: 32px;
  text-indent: 4px;
}

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

.detail-text {
  padding: 34px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.detail-text h2 {
  font-size: 28px;
  margin-top: 0;
}

.detail-text h2 + p {
  margin-top: 12px;
}

.detail-text p + h2 {
  margin-top: 28px;
}

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

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

.site-footer {
  margin-top: 62px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner strong {
  font-size: 18px;
}

.footer-inner p {
  margin: 6px 0 0;
}

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

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

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

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

@media (max-width: 820px) {
  .header-inner {
    height: 64px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: grid;
  }

  .nav-link {
    display: block;
  }

  .hero {
    min-height: 560px;
  }

  .quick-search,
  .detail-grid,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    padding: 26px;
  }

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

  .search-form,
  .footer-inner,
  .section-head,
  .filter-row {
    align-items: stretch;
    flex-direction: column;
  }

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

  .movie-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .movie-row img,
  .row-rank,
  .row-genre {
    display: none;
  }

  .ranking-item {
    grid-template-columns: 48px 1fr;
  }

  .page-hero {
    padding: 36px 24px;
  }
}

@media (max-width: 560px) {
  main,
  .header-inner,
  .footer-inner,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

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

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .hero {
    margin-bottom: 34px;
  }

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

  .hero-controls {
    bottom: 20px;
  }

  .poster-grid,
  .hot-grid,
  .related-grid,
  .category-grid,
  .wide-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .wide-card {
    grid-template-columns: 110px 1fr;
  }

  .feature-panel,
  .detail-text {
    padding: 22px;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }
}
