:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(15, 23, 42, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, .92);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(18px);
}

.topbar {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #facc15);
  box-shadow: 0 10px 25px rgba(249, 115, 22, .35);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .82);
  transition: .2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(360px, 34vw);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  overflow: hidden;
}

.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 10px 14px;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, .58);
}

.header-search button,
.search-strip button,
.filter-panel button {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  cursor: pointer;
  transition: .2s ease;
}

.header-search button:hover,
.search-strip button:hover,
.filter-panel button:hover,
.primary-button:hover {
  background: var(--accent-dark);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
}

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

.mobile-panel nav,
.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-cats {
  margin-top: 10px;
}

.mobile-cats a {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
}

.hero-shell {
  position: relative;
  min-height: 560px;
  background: linear-gradient(135deg, #334155, #475569 48%, #0f172a);
  overflow: hidden;
}

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

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .7s ease, transform .7s ease;
  pointer-events: none;
}

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

.hero-backdrop::after,
.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, .28), transparent 30%),
    linear-gradient(90deg, rgba(15, 23, 42, .96), rgba(15, 23, 42, .66) 48%, rgba(15, 23, 42, .92));
}

.hero-backdrop img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .34;
  filter: saturate(1.05);
}

.image-hidden {
  opacity: 0 !important;
}

.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;
  color: #fff;
  padding: 70px 0 120px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, .13);
  border: 1px solid rgba(251, 146, 60, .28);
  font-weight: 700;
  font-size: 14px;
}

.hero-content h1 {
  max-width: 780px;
  margin: 18px 0 6px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.05em;
}

.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 4vw, 46px);
  line-height: 1.15;
  color: #fff7ed;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, .84);
  font-size: 19px;
}

.hero-actions,
.detail-copy .primary-button {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: .2s ease;
}

.primary-button {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 15px 35px rgba(249, 115, 22, .32);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, .2);
}

.hero-tags,
.tag-row,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 13px;
}

.hero-tags span {
  color: rgba(255, 255, 255, .88);
  background: rgba(255, 255, 255, .12);
}

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

.hero-dots button {
  width: 30px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .36);
  cursor: pointer;
}

.hero-dots button.active {
  background: #fff;
}

.hero-overlap {
  position: relative;
  z-index: 5;
  margin-top: -74px;
}

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

.hero-mini-card {
  min-height: 148px;
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 18px;
  color: #fff;
  background: var(--dark);
  box-shadow: var(--shadow);
}

.hero-mini-card img,
.category-card img,
.overview-cover img,
.ranking-thumb img,
.poster img,
.detail-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #334155, #0f172a);
}

.hero-mini-card::after,
.category-card::after,
.overview-cover::after,
.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, .88), rgba(15, 23, 42, .15));
}

.hero-mini-card span,
.hero-mini-card em {
  position: relative;
  z-index: 2;
  display: block;
}

.hero-mini-card span {
  margin-top: 58px;
  font-weight: 850;
  font-size: 20px;
}

.hero-mini-card em {
  color: rgba(255, 255, 255, .72);
  font-style: normal;
  font-size: 14px;
}

.search-strip {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 45px rgba(15, 23, 42, .08);
}

.search-strip h2,
.section-heading h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.2;
  letter-spacing: -.03em;
}

.search-strip p,
.section-heading p,
.page-hero p,
.movie-card-body p,
.overview-card p,
.detail-article p,
.ranking-card p {
  color: var(--muted);
}

.search-strip form,
.filter-panel {
  display: flex;
  gap: 10px;
  align-items: center;
}

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

.content-section {
  margin-top: 64px;
}

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

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

.section-more {
  border: 1px solid var(--line);
  color: var(--text);
  background: #fff;
}

.section-more:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
  border: 1px solid rgba(226, 232, 240, .8);
  transition: .2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, .14);
}

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

.poster-badge,
.poster-play {
  position: absolute;
  z-index: 3;
}

.poster-badge {
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, .72);
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(249, 115, 22, .3);
}

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

.movie-title {
  display: block;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.3;
}

.movie-title:hover,
.overview-links a:hover,
.rank-row:hover span,
.ranking-card h2 a:hover {
  color: var(--accent-dark);
}

.movie-meta {
  margin: 8px 0;
}

.movie-meta span,
.detail-meta span {
  color: #475569;
  background: #f1f5f9;
}

.movie-card-body p {
  min-height: 46px;
  margin: 0 0 12px;
  font-size: 14px;
}

.tag-row span {
  color: #9a3412;
  background: #ffedd5;
}

.tag-row.large span {
  min-height: 30px;
  font-size: 14px;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 22px;
  padding: 18px;
  color: #fff;
  background: var(--dark);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .12);
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
}

.category-card span {
  display: block;
  margin-top: 68px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: 14px;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 26px;
  align-items: start;
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.rank-row strong {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #facc15);
}

.rank-row span,
.rank-row em {
  display: block;
}

.rank-row span {
  font-weight: 850;
}

.rank-row em {
  grid-column: 2;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

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

.page-hero {
  padding: 58px 0 8px;
}

.page-hero h1 {
  margin-top: 16px;
}

.page-hero p {
  max-width: 760px;
  margin: 12px 0 0;
  font-size: 18px;
}

.filter-panel {
  margin-top: 24px;
  max-width: 700px;
}

.filter-panel.wide {
  max-width: 900px;
}

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

.overview-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.overview-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 18px;
  background: var(--dark);
}

.overview-card h2 {
  margin: 4px 0 8px;
  font-size: 24px;
}

.overview-card p {
  margin: 0 0 12px;
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 14px;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 72px 96px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px;
}

.ranking-num {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: var(--dark);
  font-weight: 900;
}

.ranking-thumb {
  position: relative;
  display: block;
  width: 96px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: var(--dark);
}

.ranking-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-card p {
  margin: 0 0 10px;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: var(--dark);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 46px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: end;
  margin-top: 34px;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 2 / 3;
  background: #1e293b;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .36);
}

.detail-copy h1 {
  max-width: 820px;
  margin: 18px 0 14px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -.05em;
}

.detail-copy .lead {
  max-width: 780px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .86);
  font-size: 20px;
}

.detail-meta {
  margin-bottom: 16px;
}

.detail-copy .primary-button {
  width: fit-content;
  margin-top: 24px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(15, 23, 42, .28), rgba(15, 23, 42, .72));
  cursor: pointer;
  transition: .2s ease;
}

.play-overlay span {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 18px 40px rgba(249, 115, 22, .42);
  font-size: 26px;
}

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

.player-card.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 34px;
}

.detail-article {
  padding: 26px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 42px rgba(15, 23, 42, .08);
}

.detail-article h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.detail-article p {
  margin: 0;
  font-size: 17px;
}

.site-footer {
  margin-top: 80px;
  padding: 44px 0;
  color: rgba(255, 255, 255, .78);
  background: #0f172a;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 36px;
}

.footer-brand {
  color: #fff;
}

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

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

.footer-links a:hover {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.hidden-card {
  display: none !important;
}

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

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

  .two-column,
  .detail-text-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

  .menu-button {
    display: block;
    margin-left: auto;
  }

  .hero-shell {
    min-height: 620px;
  }

  .hero-mini-grid,
  .search-strip,
  .overview-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(260px, 72vw);
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .side-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .ranking-thumb {
    width: 130px;
  }
}

@media (max-width: 520px) {
  .wrap,
  .topbar,
  .mobile-panel,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

  .hero-content {
    width: min(100% - 22px, 1180px);
  }

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

  .search-strip form,
  .filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-hero {
    min-height: auto;
  }
}
