:root {
  --bg: #f8fafc;
  --bg-soft: #eff6ff;
  --text: #0f172a;
  --muted: #64748b;
  --panel: #ffffff;
  --dark: #020617;
  --dark-2: #0f172a;
  --blue: #1d4ed8;
  --blue-2: #0f3b86;
  --amber: #f59e0b;
  --amber-2: #fb923c;
  --line: rgba(148, 163, 184, 0.28);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 48%, #ffffff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 58, 138, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.22);
  backdrop-filter: blur(16px);
}

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

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

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.36);
}

.logo-text {
  font-size: 22px;
  background: linear-gradient(90deg, #fde68a, #fdba74, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  font-weight: 700;
  padding: 22px 0;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fbbf24;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  height: 2px;
  border-radius: 999px;
  background: #fbbf24;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 12px 20px 18px;
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  color: rgba(255, 255, 255, 0.84);
  padding: 10px 12px;
  border-radius: 12px;
}

.mobile-link.active,
.mobile-link:hover {
  color: #fbbf24;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #020617;
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

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

.hero-slide > img,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide > img {
  position: absolute;
  inset: 0;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 34%, rgba(245, 158, 11, 0.18), transparent 30%), linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.62) 46%, rgba(15, 23, 42, 0.08));
}

.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;
  max-width: 1180px;
  color: #ffffff;
}

.hero-content > * {
  width: min(680px, 100%);
}

.hero-kicker,
.page-hero span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #fb923c);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.25);
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.48);
}

.hero p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.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: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-button,
.home-search button {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.28);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  font-size: 38px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: rgba(245, 158, 11, 0.86);
}

.hero-arrow.prev {
  left: 28px;
}

.hero-arrow.next {
  right: 28px;
}

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

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

.hero-dot.active {
  width: 28px;
  background: #fbbf24;
}

.hero-strip {
  position: absolute;
  right: max(22px, calc((100vw - 1180px) / 2));
  bottom: 68px;
  z-index: 5;
  display: grid;
  gap: 10px;
  width: 260px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  color: rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.hero-thumb.active,
.hero-thumb:hover {
  color: #ffffff;
  border-color: rgba(251, 191, 36, 0.8);
  background: rgba(245, 158, 11, 0.2);
}

.hero-thumb img {
  width: 58px;
  height: 42px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.hero-thumb span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.quick-search-panel {
  width: min(1180px, calc(100% - 32px));
  margin: -34px auto 0;
  position: relative;
  z-index: 10;
}

.quick-search-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
  padding: 26px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-inner h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.quick-search-inner p {
  margin: 0;
  color: var(--muted);
}

.home-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.home-search input,
.movie-search {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
  background: #ffffff;
}

.home-search input:focus,
.movie-search:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 72px auto;
}

.dark-section {
  width: 100%;
  padding: 58px max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(135deg, #020617, #0f172a 48%, #1e3a8a);
  color: #ffffff;
}

.dark-section .section-heading p,
.dark-section .movie-card p,
.dark-section .meta-row {
  color: rgba(255, 255, 255, 0.68);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more,
.text-link {
  color: #d97706;
  font-weight: 900;
}

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

.category-card {
  position: relative;
  height: 152px;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.13);
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.48);
}

.category-card:hover img {
  opacity: 0.92;
  transform: scale(1.06);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.09);
  border: 1px solid rgba(148, 163, 184, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.74));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.play-pill {
  right: 12px;
  bottom: 12px;
  min-height: 30px;
  padding: 0 12px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.94);
  transform: translateY(16px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-pill {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.36);
}

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

.meta-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.movie-card h3 a:hover {
  color: #d97706;
}

.movie-card p {
  min-height: 50px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.movie-card .tag-row span {
  color: #475569;
  background: #f1f5f9;
}

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

.small-hero {
  padding: 84px max(16px, calc((100vw - 1180px) / 2));
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

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

.catalog-card {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.catalog-card p {
  color: var(--muted);
}

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 14px;
  color: #334155;
  background: #e2e8f0;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.detail-hero {
  min-height: 580px;
}

.detail-bg,
.detail-bg-shade {
  position: absolute;
  inset: 0;
}

.detail-bg {
  opacity: 0.34;
  filter: blur(1px);
}

.detail-bg-shade {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.78), rgba(30, 58, 138, 0.32));
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 580px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 44px;
  align-items: center;
  padding: 58px 0;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #172554, #0f172a);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

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

.detail-meta span {
  color: rgba(255, 255, 255, 0.8);
}

.detail-tags {
  margin: 18px 0 28px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 26px;
  align-items: start;
}

.player-card,
.story-card {
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.player-card {
  grid-column: 1 / -1;
  padding: 14px;
  background: #020617;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background: #000000;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.28), rgba(2, 6, 23, 0.74));
}

.play-overlay.hidden {
  display: none;
}

.big-play {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.38);
  font-size: 34px;
  text-indent: 4px;
}

.play-overlay strong {
  width: min(720px, 90%);
  overflow: hidden;
  font-size: clamp(22px, 4vw, 36px);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.story-card {
  padding: 28px;
}

.story-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.story-card p {
  margin: 0 0 14px;
  color: #334155;
}

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

.site-footer {
  margin-top: 82px;
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(135deg, #020617, #0f172a 56%, #1e3a8a);
}

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

.footer-brand p {
  max-width: 420px;
  color: rgba(255, 255, 255, 0.62);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer-links a:hover {
  color: #fbbf24;
}

.footer-bottom {
  padding: 18px 16px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
}

.movie-card.filtered-out {
  display: none;
}

@media (max-width: 1080px) {
  .hero-strip {
    display: none;
  }

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

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

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

  .menu-button {
    display: block;
  }

  .hero {
    height: 580px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-inner,
  .detail-inner,
  .detail-content,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .detail-inner {
    gap: 26px;
    padding: 36px 0;
  }

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

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

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

@media (max-width: 520px) {
  .header-inner {
    width: min(100% - 22px, 1180px);
  }

  .logo-text {
    font-size: 18px;
  }

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

  .hero-content {
    width: min(100% - 28px, 1180px);
    padding-top: 12px;
  }

  .hero p {
    font-size: 15px;
  }

  .hero-actions,
  .home-search {
    display: grid;
    grid-template-columns: 1fr;
  }

  .content-section {
    width: min(100% - 22px, 1180px);
    margin: 46px auto;
  }

  .quick-search-panel {
    width: min(100% - 22px, 1180px);
  }

  .quick-search-inner,
  .filter-panel,
  .story-card {
    padding: 18px;
  }

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

  .movie-card {
    border-radius: 18px;
  }

  .poster-wrap {
    aspect-ratio: 16 / 10;
  }

  .small-hero {
    padding: 58px 16px;
  }

  .detail-info h1 {
    font-size: 34px;
  }
}
