:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.12);
  --gold: #facc15;
  --orange: #f97316;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --radius: 22px;
  --shadow: 0 28px 80px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 58, 138, 0.96), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.3);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.34);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
  transform: scale(1.08) rotate(-4deg);
}

.brand-text,
.footer-brand span:last-child {
  font-size: 24px;
  background: linear-gradient(90deg, #fde68a, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  white-space: nowrap;
}

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.header-search input,
.mobile-search input,
.home-search-band input,
.filter-panel input,
.filter-panel select,
.big-search input {
  min-width: 0;
  color: #fff;
  border: 0;
  outline: 0;
  background: transparent;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.home-search-band input::placeholder,
.filter-panel input::placeholder,
.big-search input::placeholder {
  color: rgba(226, 232, 240, 0.66);
}

.header-search button,
.mobile-search button,
.home-search-band button,
.big-search button {
  border: 0;
  cursor: pointer;
  color: #0f172a;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--orange));
}

.menu-toggle {
  display: none;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 12px;
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-link.active,
.mobile-link:hover {
  color: var(--gold);
  background: rgba(255, 255, 255, 0.14);
}

main {
  min-height: 60vh;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 420px);
  align-items: center;
  gap: 48px;
  width: 100%;
  min-height: 640px;
  padding: 80px max(28px, calc((100vw - 1200px) / 2)) 72px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.75s ease, transform 0.9s ease;
}

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.22);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 18px;
  line-height: 1.04;
  font-size: clamp(40px, 6vw, 76px);
  letter-spacing: -0.07em;
}

.hero-copy p,
.page-hero p,
.lead-text {
  max-width: 700px;
  color: rgba(226, 232, 240, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid var(--line);
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 800;
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, #eab308, #f97316);
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.32);
}

.btn-ghost {
  color: #fff;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.btn-primary:hover,
.btn-ghost:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  max-width: 410px;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow);
}

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

.hero-poster:hover img {
  transform: scale(1.08);
}

.hero-poster span,
.player-cover span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, #fde68a, #fb923c);
  box-shadow: 0 16px 40px rgba(249, 115, 22, 0.38);
  font-size: 28px;
  font-weight: 900;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  transition: width 0.22s ease, background 0.22s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
}

.home-search-band {
  position: relative;
  z-index: 6;
  width: min(980px, calc(100% - 32px));
  margin: -35px auto 0;
}

.home-search-band form,
.big-search {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.home-search-band input,
.big-search input {
  flex: 1;
  padding: 0 18px;
  font-size: 16px;
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

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

.section-more {
  color: #fde68a;
  font-weight: 900;
}

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

.category-tile {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.26);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.48);
}

.category-tile span {
  font-size: 23px;
  font-weight: 950;
}

.category-tile strong {
  color: rgba(226, 232, 240, 0.82);
  font-size: 14px;
  line-height: 1.55;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.22);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card a {
  display: block;
  height: 100%;
}

.movie-card figure {
  position: relative;
  aspect-ratio: 2 / 3;
  margin: 0;
  overflow: hidden;
  background: #0f172a;
}

.movie-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.movie-card:hover img {
  transform: scale(1.08);
}

.card-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  background: rgba(239, 68, 68, 0.9);
  font-size: 12px;
  font-weight: 900;
}

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

.movie-card h3,
.movie-card h2 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
}

.movie-meta span {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
}

.tag-row span {
  color: #fde68a;
  background: rgba(250, 204, 21, 0.1);
  font-size: 12px;
}

.dark-feature {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(88, 28, 135, 0.62), rgba(124, 45, 18, 0.68));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dark-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 42px;
  padding: 64px 0;
}

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

.ranking-list a {
  display: grid;
  grid-template-columns: 48px 58px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-list a:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateX(4px);
}

.rank-no {
  color: #fde68a;
  font-size: 21px;
  font-weight: 950;
}

.ranking-list img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
}

.ranking-list strong,
.compact-card span {
  display: block;
  color: #fff;
  line-height: 1.35;
}

.ranking-list em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 66px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 96px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-3px);
}

.compact-card img {
  width: 66px;
  height: 82px;
  object-fit: cover;
  border-radius: 10px;
}

.page-hero,
.detail-hero {
  background-size: cover;
  background-position: center;
}

.page-hero {
  min-height: 390px;
  display: flex;
  align-items: center;
  padding: 72px max(28px, calc((100vw - 1200px) / 2));
  background: radial-gradient(circle at top right, rgba(250, 204, 21, 0.16), transparent 32%), linear-gradient(135deg, #020617, #1e3a8a 54%, #0f172a);
}

.small-hero {
  min-height: 310px;
}

.category-hero {
  background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.22), transparent 34%), linear-gradient(135deg, #020617, #172554 54%, #431407);
}

.ranking-hero {
  background: radial-gradient(circle at top right, rgba(239, 68, 68, 0.22), transparent 32%), linear-gradient(135deg, #020617, #450a0a 52%, #0f172a);
}

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

.category-overview-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.8);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-overview-card a {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 230px;
}

.category-cover {
  background-size: cover;
  background-position: center;
}

.category-overview-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 24px;
}

.category-overview-body h2 {
  margin: 0;
  font-size: 28px;
}

.category-overview-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.sample-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sample-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.1);
  font-size: 12px;
}

.category-overview-body strong {
  color: #fde68a;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.18);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.filter-panel option {
  color: #0f172a;
}

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

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

.ranking-row {
  border-radius: 22px;
}

.ranking-row a {
  display: grid;
  grid-template-columns: 76px 90px 1fr;
  align-items: center;
  gap: 18px;
  padding: 12px;
}

.ranking-row img {
  width: 90px;
  height: 126px;
  object-fit: cover;
  border-radius: 14px;
}

.big-rank {
  color: #fde68a;
  font-size: 26px;
  font-weight: 950;
  text-align: center;
}

.detail-hero {
  min-height: 620px;
  padding: 58px max(28px, calc((100vw - 1200px) / 2));
}

.detail-inner {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  color: rgba(226, 232, 240, 0.75);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  max-width: 780px;
  font-size: clamp(38px, 5vw, 68px);
}

.detail-meta {
  margin: 22px 0 4px;
}

.player-section {
  width: min(1120px, calc(100% - 32px));
  margin: -90px auto 0;
  position: relative;
  z-index: 4;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #000;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
  filter: saturate(1.08);
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

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

.detail-text article {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
}

.detail-text h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 25px;
}

.detail-text p {
  margin: 0;
  color: rgba(226, 232, 240, 0.8);
  line-height: 1.9;
}

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

.search-page {
  min-height: 560px;
}

.big-search {
  margin-bottom: 28px;
}

.search-empty {
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.78);
  text-align: center;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
  border-top: 1px solid var(--line);
}

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 30px;
  padding: 48px 0;
}

.site-footer p {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #fde68a;
  font-size: 18px;
}

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

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

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  color: #94a3b8;
  font-size: 14px;
}

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .hero-poster {
    display: none;
  }

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

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

  .dark-inner,
  .detail-text {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 250px 1fr;
  }

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

@media (max-width: 760px) {
  .brand-text,
  .footer-brand span:last-child {
    font-size: 20px;
  }

  .hero-carousel,
  .hero-slide {
    min-height: 590px;
  }

  .hero-slide {
    padding-top: 56px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .home-search-band form,
  .big-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .home-search-band input,
  .big-search input {
    min-height: 46px;
  }

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

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

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

  .category-overview-card a {
    grid-template-columns: 1fr;
  }

  .category-cover {
    min-height: 180px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .ranking-row a {
    grid-template-columns: 52px 72px 1fr;
    gap: 12px;
  }

  .ranking-row img {
    width: 72px;
    height: 100px;
  }

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

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

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

  .player-shell {
    border-radius: 18px;
  }
}

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

  .hero-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }
}
