:root {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.22);
  --gold: #f59e0b;
  --orange: #ea580c;
  --rose: #e11d48;
  --cyan: #0891b2;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.15);
  --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;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #f5f5f4 48%, #e2e8f0 100%);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.96), rgba(41, 37, 36, 0.96), rgba(30, 41, 59, 0.96));
  border-bottom: 1px solid rgba(245, 158, 11, 0.24);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 14px 28px rgba(234, 88, 12, 0.35);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__text strong {
  font-size: 22px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fcd34d, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand__text em {
  margin-top: 5px;
  color: #cbd5e1;
  font-size: 12px;
  font-style: normal;
}

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

.site-nav a,
.mobile-nav a {
  padding: 10px 15px;
  border-radius: 13px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 650;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.global-search {
  position: relative;
  width: min(280px, 26vw);
}

.global-search input,
.filter-bar input,
.filter-bar select,
.search-hero input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.3);
  outline: none;
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.global-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-hero input:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.global-search__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(420px, 86vw);
  max-height: 430px;
  overflow: auto;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  color: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow);
  padding: 10px;
  display: none;
}

.global-search__panel.is-open {
  display: block;
}

.search-result {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  align-items: center;
}

.search-result:hover {
  background: #f8fafc;
}

.search-result img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e293b, #78350f);
}

.search-result strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
}

.search-result span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.menu-button {
  display: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  border-radius: 13px;
  width: 44px;
  height: 44px;
  font-size: 24px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 12px 22px 18px;
  background: rgba(15, 23, 42, 0.96);
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

.page-main {
  min-height: 72vh;
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 690px;
  color: #fff;
  background: radial-gradient(circle at 18% 18%, rgba(245, 158, 11, 0.23), transparent 26%), linear-gradient(135deg, #0f172a 0%, #1c1917 50%, #020617 100%);
}

.hero::before {
  content: "";
  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.18));
  z-index: 1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.74fr);
  align-items: center;
  gap: 46px;
  max-width: 1280px;
  width: calc(100% - 44px);
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
  z-index: 2;
  padding: 84px 0;
}

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

.hero-slide__content {
  max-width: 720px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.34);
  backdrop-filter: blur(12px);
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 24px 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 650px;
  color: #cbd5e1;
  font-size: clamp(16px, 1.8vw, 21px);
  line-height: 1.85;
}

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

.button-primary,
.button-ghost,
.section-more,
.category-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 18px 36px rgba(234, 88, 12, 0.34);
}

.button-primary:hover,
.button-ghost:hover,
.section-more:hover,
.category-card__link:hover {
  transform: translateY(-2px);
}

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

.hero-poster {
  position: relative;
  isolation: isolate;
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.85), rgba(249, 115, 22, 0.52));
  filter: blur(12px);
  z-index: -1;
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 26px;
  background: linear-gradient(135deg, #1e293b, #78350f);
  box-shadow: 0 32px 78px rgba(0, 0, 0, 0.36);
}

.hero-pills,
.detail-tags,
.movie-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-pills span,
.detail-tags span,
.movie-card__tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-pills span {
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
}

.section {
  padding: 62px 0;
}

.section.is-soft {
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.82), rgba(255, 247, 237, 0.82));
}

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

.section-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--orange);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
  max-width: 760px;
}

.section-more {
  color: var(--orange);
  background: #fff7ed;
  border: 1px solid rgba(251, 146, 60, 0.28);
  min-width: max-content;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.18);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.movie-card__poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #1e293b, #78350f);
}

.movie-grid.is-wide .movie-card__poster,
.search-grid .movie-card__poster {
  aspect-ratio: 3 / 4;
}

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

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

.movie-card__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 56%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.movie-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(10px);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.movie-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .movie-card__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-card__body {
  padding: 18px;
}

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

.movie-card__body h3 a:hover {
  color: var(--orange);
}

.movie-card__body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #475569;
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 12px;
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: 24px;
  padding: 24px;
  color: #fff;
  background: linear-gradient(135deg, #1e293b, #7c2d12);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #164e63, #312e81);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #7f1d1d, #431407);
}

.category-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.category-card p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
  margin: 0 0 24px;
}

.category-card__link {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.page-hero {
  padding: 76px 0 38px;
}

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

.breadcrumb a:hover {
  color: var(--orange);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 112px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-item__number {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--rose), var(--orange));
}

.rank-item__poster {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #1e293b, #78350f);
}

.rank-item__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-item h3 a:hover {
  color: var(--orange);
}

.rank-item p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #475569;
  font-size: 12px;
  font-weight: 750;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
  padding-bottom: 68px;
}

.detail-panel,
.side-panel {
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.detail-title {
  padding: 32px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  color: #475569;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 800;
}

.player-wrap {
  position: relative;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.38));
  display: grid;
  place-items: center;
  z-index: 2;
}

.player-cover.is-hidden {
  display: none;
}

.player-cover span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 18px 42px rgba(234, 88, 12, 0.38);
}

.detail-content {
  padding: 32px;
}

.detail-content h2 {
  margin: 30px 0 12px;
  font-size: 24px;
}

.detail-content h2:first-child {
  margin-top: 0;
}

.detail-content p {
  color: #334155;
  line-height: 1.9;
  font-size: 16px;
}

.side-panel {
  padding: 20px;
  position: sticky;
  top: 96px;
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
}

.side-card:hover {
  background: #fff7ed;
}

.side-card img {
  width: 82px;
  height: 104px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e293b, #78350f);
}

.side-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.42;
}

.side-card span {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
}

.search-hero {
  padding: 76px 0 36px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #431407);
}

.search-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.search-hero p {
  color: #cbd5e1;
  line-height: 1.8;
  max-width: 760px;
}

.search-hero input {
  margin-top: 26px;
  max-width: 680px;
  min-height: 56px;
  font-size: 16px;
}

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

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1c1917, #020617);
  border-top: 1px solid rgba(245, 158, 11, 0.2);
}

.site-footer__inner {
  width: min(1280px, calc(100% - 44px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: 30px;
}

.site-footer__brand strong {
  display: block;
  color: #fff;
  font-size: 24px;
  margin-bottom: 12px;
}

.site-footer__brand p {
  max-width: 560px;
  color: #94a3b8;
  line-height: 1.8;
  margin: 0;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-content: start;
}

.site-footer__links a:hover {
  color: #fbbf24;
}

.site-footer__bottom {
  width: min(1280px, calc(100% - 44px));
  margin: 0 auto;
  padding: 22px 0;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1180px) {
  .movie-grid,
  .movie-grid.is-wide,
  .search-grid,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .hero-poster {
    display: none;
  }

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 880px) {
  .site-header__inner {
    min-height: 70px;
  }

  .site-nav,
  .global-search {
    display: none;
  }

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

  .hero {
    min-height: 640px;
  }

  .hero-slide {
    padding: 58px 0 78px;
  }

  .section-head {
    display: block;
  }

  .section-more {
    margin-top: 16px;
  }

  .movie-grid,
  .movie-grid.is-wide,
  .search-grid,
  .category-grid,
  .rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .site-footer__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container,
  .site-footer__inner,
  .site-footer__bottom {
    width: min(100% - 28px, 1280px);
  }

  .brand__text strong {
    font-size: 18px;
  }

  .brand__text em {
    display: none;
  }

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

  .movie-grid,
  .movie-grid.is-wide,
  .search-grid,
  .category-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 48px 86px 1fr;
    gap: 12px;
  }

  .rank-item p {
    display: none;
  }

  .detail-title,
  .detail-content {
    padding: 22px;
  }
}
