:root {
  color-scheme: dark;
  --bg: #05060f;
  --panel: rgba(17, 24, 39, 0.78);
  --panel-strong: rgba(12, 16, 30, 0.94);
  --text: #f8fafc;
  --muted: #a7b0c3;
  --line: rgba(255, 255, 255, 0.12);
  --gold: #facc15;
  --gold-deep: #eab308;
  --purple: #7c3aed;
  --purple-soft: rgba(124, 58, 237, 0.26);
  --radius: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 5%, rgba(124, 58, 237, 0.22), transparent 28rem),
    radial-gradient(circle at 85% 0%, rgba(250, 204, 21, 0.14), transparent 24rem),
    linear-gradient(180deg, #070713 0%, #0b1020 44%, #05060f 100%);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
}

button,
input,
select {
  font: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 15, 0.82);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
  color: #1f1300;
  background: linear-gradient(135deg, var(--gold), #fff7ad);
  box-shadow: 0 14px 30px rgba(250, 204, 21, 0.28);
}

.brand strong,
.footer-logo {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 900;
  background: linear-gradient(90deg, #fde68a, #ffffff, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand em {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-style: normal;
  color: var(--muted);
}

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

.main-nav a {
  color: #d6d9e6;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--gold);
  transform: translateY(-1px);
}

.nav-search {
  width: min(320px, 32vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.nav-search input,
.filter-panel input,
.filter-panel select,
.search-box-large input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.nav-search input::placeholder,
.filter-panel input::placeholder,
.search-box-large input::placeholder {
  color: rgba(226, 232, 240, 0.62);
}

.nav-search button {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #201400;
  cursor: pointer;
  font-weight: 800;
  background: var(--gold);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
}

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

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

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

.hero-backdrop {
  background:
    linear-gradient(90deg, rgba(5, 6, 15, 0.96) 0%, rgba(5, 6, 15, 0.78) 42%, rgba(5, 6, 15, 0.35) 100%),
    linear-gradient(180deg, rgba(5, 6, 15, 0.22) 0%, rgba(5, 6, 15, 0.94) 100%),
    var(--hero-image) center / cover no-repeat;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 72px;
  padding: 88px 0 130px;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 0 0 14px;
  color: #fde68a;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  margin: 0;
  color: #d7dcea;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  color: #fef3c7;
  font-weight: 700;
}

.detail-meta span,
.hero-meta span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

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

.compact-actions {
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #201400;
  background: linear-gradient(135deg, var(--gold), #fef08a);
  box-shadow: 0 16px 34px rgba(250, 204, 21, 0.28);
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff8db;
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
  position: relative;
  height: 480px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 34px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 -90px 80px rgba(0, 0, 0, 0.5);
}

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

.hero-arrow,
.hero-dot {
  border: 0;
  color: var(--text);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.hero-dot.is-active {
  width: 34px;
  border-radius: 999px;
  background: var(--gold);
}

.quick-section,
.content-section {
  padding: 72px 0;
}

.page-main {
  padding-top: 42px;
}

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

.section-heading h2,
.story-card h2 {
  margin: 8px 0 8px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.18;
  font-weight: 950;
}

.section-heading p,
.story-card p,
.footer-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  flex-shrink: 0;
  color: var(--gold);
  font-weight: 900;
}

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

.category-chip,
.category-card a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(124, 58, 237, 0.12));
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-chip {
  min-height: 130px;
  padding: 22px;
}

.category-chip:hover,
.category-card a:hover {
  border-color: rgba(250, 204, 21, 0.55);
  transform: translateY(-4px);
}

.category-chip span,
.category-info h2 {
  display: block;
  margin: 0 0 10px;
  color: #fff8db;
  font-size: 20px;
  font-weight: 950;
}

.category-chip em,
.category-info p {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  line-height: 1.65;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
  margin-bottom: 28px;
}

.filter-panel input,
.filter-panel select,
.search-box-large input {
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.filter-panel select option {
  color: #111827;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(250, 204, 21, 0.52);
  transform: translateY(-6px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.poster-link img {
  transition: transform 0.36s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.78) 100%);
}

.watch-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #211400;
  font-size: 12px;
  font-weight: 900;
  background: var(--gold);
}

.rank-num {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 32px;
  border-radius: 999px;
  color: #1b1200;
  font-weight: 950;
  background: linear-gradient(135deg, #fde047, #fef3c7);
}

.card-body {
  padding: 15px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.42;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: var(--gold);
}

.card-meta {
  margin: 8px 0;
  color: #c6ccda;
  font-size: 13px;
}

.card-meta a {
  color: #fde68a;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  color: #fef3c7;
  font-size: 12px;
  background: rgba(250, 204, 21, 0.08);
}

.movie-card.compact .card-desc {
  display: none;
}

.movie-card.compact .card-title {
  min-height: 42px;
  font-size: 15px;
}

.movie-card.compact .card-body {
  padding: 12px;
}

.page-hero,
.detail-content,
.player-section {
  position: relative;
}

.small-hero {
  overflow: hidden;
  margin-top: 28px;
  padding: 56px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 80% 20%, rgba(250, 204, 21, 0.16), transparent 20rem),
    linear-gradient(135deg, rgba(124, 58, 237, 0.24), rgba(255, 255, 255, 0.06));
  box-shadow: var(--shadow);
}

.small-hero h1 {
  margin-bottom: 12px;
}

.category-card .category-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  height: 220px;
  background: rgba(255, 255, 255, 0.05);
}

.category-info {
  padding: 22px;
}

.category-info span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: var(--detail-image) center / cover no-repeat;
}

.detail-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 6, 15, 0.96) 0%, rgba(5, 6, 15, 0.74) 52%, rgba(5, 6, 15, 0.38) 100%),
    linear-gradient(180deg, rgba(5, 6, 15, 0.15) 0%, var(--bg) 100%);
  backdrop-filter: blur(2px);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  min-height: 620px;
  padding: 72px 0;
}

.detail-poster {
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
  color: #fef3c7;
  font-weight: 700;
}

.detail-copy h1 {
  max-width: 850px;
}

.detail-one-line {
  max-width: 820px;
}

.detail-tags {
  margin-top: 20px;
}

.player-section {
  margin-top: -70px;
  z-index: 3;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-card video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: #fff;
  text-align: center;
  cursor: pointer;
  background:
    radial-gradient(circle, rgba(250, 204, 21, 0.16), transparent 18rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.72));
}

.play-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  padding-left: 6px;
  border-radius: 50%;
  color: #1b1200;
  font-size: 38px;
  background: linear-gradient(135deg, var(--gold), #fff7ad);
  box-shadow: 0 18px 48px rgba(250, 204, 21, 0.36);
}

.play-overlay strong {
  width: min(700px, 88%);
  font-size: clamp(24px, 4vw, 46px);
  line-height: 1.25;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-top: 54px;
}

.story-card {
  min-height: 260px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
}

.search-box-large {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  max-width: 760px;
  margin-top: 28px;
}

.site-footer {
  margin-top: 72px;
  padding: 46px 0;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.footer-grid p {
  max-width: 720px;
  margin-top: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: #fef3c7;
  font-weight: 800;
}

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

@media (max-width: 1080px) {
  .movie-grid,
  .large-rank {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .hero-content {
    grid-template-columns: 1fr 260px;
    gap: 36px;
  }
}

@media (max-width: 820px) {
  .nav-wrap {
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 0;
  }

  .main-nav {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0 4px;
  }

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

  .nav-search {
    width: auto;
    flex: 1;
    min-width: 0;
    margin-left: auto;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero {
    padding-bottom: 92px;
  }

  .hero-slide {
    position: relative;
    display: none;
  }

  .hero-slide.is-active {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 60px 0 40px;
  }

  .hero-poster {
    width: min(320px, 86vw);
    height: 430px;
    transform: none;
  }

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

  .category-grid,
  .category-overview,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .filter-panel,
  .search-box-large {
    grid-template-columns: 1fr;
  }

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

  .small-hero {
    padding: 34px 24px;
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 48px 0 100px;
  }

  .detail-poster {
    width: min(270px, 70vw);
  }

  .player-section {
    margin-top: -52px;
  }
}

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

  .brand em,
  .nav-search button {
    display: none;
  }

  .nav-search {
    order: 3;
    width: 100%;
    flex-basis: 100%;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

  .hero-copy h2 {
    font-size: 28px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .movie-grid,
  .rank-grid,
  .large-rank {
    gap: 13px;
  }

  .card-body {
    padding: 12px;
  }

  .card-title {
    font-size: 15px;
  }

  .card-desc,
  .tag-row {
    display: none;
  }

  .play-circle {
    width: 70px;
    height: 70px;
    font-size: 30px;
  }

  .story-card {
    padding: 24px;
  }
}
