:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --orange: #fb923c;
  --red: #ef4444;
  --blue: #38bdf8;
  --green: #22c55e;
  --radius: 24px;
  --shadow: 0 24px 80px 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", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.28);
}

.brand-name {
  font-size: 20px;
  background: linear-gradient(90deg, #fdba74, #ef4444);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--soft);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: #fff;
  background: rgba(251, 146, 60, 0.16);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.92);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  border-radius: 8px;
  background: #fff;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-shade,
.detail-bg-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.42) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 660px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 54px;
  align-items: center;
  padding: 86px 0 96px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(251, 146, 60, 0.36);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(251, 146, 60, 0.14);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin-top: 10px;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.tag-row,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-meta span,
.tag-row span,
.filter-row button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.74);
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.home-search button,
.search-page-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 16px 34px rgba(239, 68, 68, 0.24);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover,
.ghost-button:hover,
.home-search button:hover,
.search-page-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(239, 68, 68, 0.32);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: none;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

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

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

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

.hero-dots button.is-active {
  background: linear-gradient(90deg, var(--orange), var(--red));
}

.search-panel {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -38px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel h2,
.section-heading h2,
.ranking-panel h2,
.player-caption h2,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.search-panel p,
.category-tile p,
.category-overview-card p,
.movie-card p,
.player-caption p,
.detail-article p {
  color: var(--muted);
  line-height: 1.75;
}

.home-search,
.search-page-form,
.filter-search {
  display: flex;
  gap: 12px;
}

.home-search input,
.search-page-form input,
.filter-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  padding: 0 16px;
}

.home-search input:focus,
.search-page-form input:focus,
.filter-search input:focus {
  border-color: rgba(251, 146, 60, 0.64);
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.1);
}

.section-block {
  padding: 70px 0 0;
}

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

.section-heading a {
  color: #fed7aa;
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 146, 60, 0.42);
  background: rgba(15, 23, 42, 0.92);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  min-height: 28px;
  padding: 0 11px;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
  color: #cbd5e1;
  font-size: 13px;
}

.movie-card p {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  margin: 0 0 12px;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-small .movie-title {
  font-size: 16px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.ranking-panel,
.detail-side,
.player-card,
.detail-article,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.ranking-panel {
  position: sticky;
  top: 94px;
  align-self: start;
  padding: 22px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 30px 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.ranking-number {
  color: #fed7aa;
  font-weight: 900;
}

.ranking-item img {
  width: 54px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-copy {
  min-width: 0;
}

.ranking-copy strong,
.ranking-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-copy strong {
  color: #fff;
}

.ranking-copy em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.category-tile {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.7);
  padding: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 146, 60, 0.42);
}

.category-tile span {
  display: block;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.mini-links {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.mini-links a {
  overflow: hidden;
  color: #fed7aa;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.page-main {
  padding-bottom: 72px;
}

.page-hero {
  margin-top: 40px;
  padding: 54px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(251, 146, 60, 0.13), rgba(56, 189, 248, 0.08)),
    rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.slim-hero {
  min-height: 260px;
}

.filter-search {
  margin-top: 24px;
}

.filter-row {
  margin-top: 16px;
}

.filter-row button {
  cursor: pointer;
}

.filter-row button.is-active,
.filter-row button:hover {
  border-color: rgba(251, 146, 60, 0.62);
  background: rgba(251, 146, 60, 0.2);
  color: #fff;
}

.category-overview-list {
  display: grid;
  gap: 24px;
  padding-top: 40px;
}

.category-overview-card {
  padding: 24px;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.category-overview-head a {
  color: #fed7aa;
  font-weight: 800;
}

.category-preview-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.category-preview-row a {
  display: grid;
  gap: 8px;
}

.category-preview-row img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
}

.category-preview-row span {
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

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

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

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

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #fed7aa;
  font-size: 14px;
}

.detail-meta,
.detail-tags {
  margin-top: 18px;
}

.detail-info .primary-button {
  margin-top: 28px;
}

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

.player-card {
  position: relative;
  z-index: 5;
  overflow: hidden;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(251, 146, 60, 0.22), transparent 26rem),
    rgba(2, 6, 23, 0.62);
  cursor: pointer;
}

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

.player-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 18px 48px rgba(239, 68, 68, 0.34);
  font-size: 28px;
}

.player-caption {
  padding: 22px 24px 26px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding-top: 48px;
}

.detail-article,
.detail-side {
  padding: 26px;
}

.detail-article h2 + p {
  margin-top: 12px;
}

.side-list {
  margin-top: 12px;
}

.site-footer {
  margin-top: 82px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.62);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 42px 0;
}

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

.footer-grid h3 {
  margin: 0 0 14px;
}

.footer-grid a:not(.brand) {
  display: block;
  margin: 9px 0;
  color: var(--muted);
}

.footer-grid a:not(.brand):hover {
  color: #fed7aa;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

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

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

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

  .split-layout,
  .detail-content-grid,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .menu-button {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    border-radius: 12px;
  }

  .hero,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 52px;
  }

  .hero-poster {
    max-width: 220px;
    transform: none;
  }

  .page-hero {
    padding: 32px;
  }

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

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

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

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

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

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

  .home-search,
  .search-page-form {
    flex-direction: column;
  }

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

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

  .movie-card p {
    display: none;
  }

  .hero-tags span:nth-child(n + 5),
  .tag-row span:nth-child(n + 5) {
    display: none;
  }
}
