:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  min-height: 100vh;
}

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;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #f97316);
  color: #fff;
  font-size: 16px;
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.25);
}

.brand-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

.nav-link {
  color: #d1d5db;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.catalog-search,
.filter-bar select {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.78);
  color: var(--text);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 12px;
}

.header-search input:focus,
.catalog-search:focus,
.filter-bar select:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
  background: rgba(15, 23, 42, 0.96);
}

.header-search button,
.primary-btn,
.ghost-btn,
.panel-link {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.primary-btn {
  background: var(--accent);
  color: white;
}

.header-search button {
  padding: 10px 14px;
}

.header-search button:hover,
.primary-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: white;
  font-size: 26px;
}

.mobile-nav {
  display: none;
  padding: 10px 20px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.mobile-nav a {
  padding: 12px;
  border-radius: 12px;
  color: #d1d5db;
  background: rgba(15, 23, 42, 0.72);
}

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

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.74) 42%, rgba(15, 23, 42, 0.12) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.1) 45%, rgba(2, 6, 23, 0.22) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 72px;
  width: min(720px, calc(100vw - 48px));
}

.hero-kicker,
.section-kicker,
.page-hero span,
.rank-panel-head span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 14px 0 16px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 780px;
}

.hero-content p {
  margin: 0 0 20px;
  color: #d1d5db;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
  max-width: 680px;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin-bottom: 24px;
}

.hero-meta span,
.detail-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #f8fafc;
}

.hero-actions,
.detail-info .primary-btn {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn,
.panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
}

.ghost-btn,
.panel-link {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.46);
}

.ghost-btn:hover,
.panel-link:hover {
  border-color: rgba(245, 158, 11, 0.64);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

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

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

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.hero-dot.active {
  width: 34px;
  background: var(--accent);
}

.content-section,
.page-main > .ranking-list,
.filter-bar,
.breadcrumb,
.detail-main > .content-section,
.detail-content,
.detail-hero,
.player-section {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.content-section {
  padding-top: 56px;
  padding-bottom: 18px;
}

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

.section-heading h2,
.rank-panel-head h2,
.player-section h2,
.detail-content h2 {
  margin: 6px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.movie-grid {
  display: grid;
  gap: 20px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: var(--shadow);
}

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

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

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

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  background: rgba(245, 158, 11, 0.9);
}

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

.movie-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: white;
  font-size: 16px;
  font-weight: 850;
}

.movie-card-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 45px;
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.movie-meta {
  color: #cbd5e1;
  font-size: 12px;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 10px;
  color: rgba(203, 213, 225, 0.5);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #fbbf24;
  font-size: 12px;
}

.movie-card.wide {
  display: grid;
  grid-template-columns: 112px 1fr;
}

.movie-card.wide .poster-link {
  height: 100%;
  aspect-ratio: unset;
}

.movie-card.wide .movie-card-body p {
  -webkit-line-clamp: 3;
}

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

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.rank-item {
  display: grid;
  grid-template-columns: 28px 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.rank-number {
  color: var(--accent);
  font-weight: 950;
  text-align: center;
}

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

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.category-grid,
.category-large-grid {
  display: grid;
  gap: 18px;
}

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

.category-tile {
  min-height: 142px;
  padding: 20px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(15, 23, 42, 0.86)),
    rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(245, 158, 11, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.62);
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  color: white;
  font-size: 20px;
  font-weight: 900;
}

.category-tile strong {
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.7;
  font-weight: 500;
}

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

.page-hero {
  max-width: 1280px;
  margin: 28px auto 22px;
  padding: 58px 24px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(2, 6, 23, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
}

.page-hero > div {
  max-width: 760px;
}

.page-hero h1 {
  margin: 10px 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-hero p {
  margin: 0;
  color: var(--muted-2);
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin-top: 26px;
}

.catalog-search,
.filter-bar select {
  width: 100%;
  padding: 13px 14px;
}

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

.category-card-large {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #0f172a;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

.category-card-large::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.22));
}

.category-card-large img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.category-card-large span,
.category-card-large p {
  position: relative;
  z-index: 1;
}

.category-card-large span {
  color: white;
  font-size: 24px;
  font-weight: 950;
}

.category-card-large p {
  margin: 10px 0 0;
  color: var(--muted-2);
  line-height: 1.7;
}

.ranking-list {
  display: grid;
  gap: 14px;
  padding-top: 34px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.7);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-row:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.5);
}

.ranking-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
}

.ranking-poster span {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 950;
}

.ranking-poster img {
  width: 130px;
  height: 172px;
  object-fit: cover;
}

.ranking-body a {
  font-size: 24px;
  font-weight: 900;
}

.ranking-body a:hover,
.movie-title:hover {
  color: var(--accent);
}

.ranking-body p {
  margin: 12px 0;
  color: var(--muted-2);
  line-height: 1.75;
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-top: 26px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 12px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-info p {
  color: var(--muted-2);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  margin: 18px 0 10px;
}

.detail-tags {
  margin-bottom: 24px;
}

.player-section {
  padding-top: 28px;
  padding-bottom: 26px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 34px;
  box-shadow: 0 18px 46px rgba(245, 158, 11, 0.28);
}

.play-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding-top: 18px;
  padding-bottom: 18px;
}

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

.detail-content article {
  padding: 24px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-content p {
  margin: 12px 0 0;
  color: var(--muted-2);
  line-height: 1.9;
}

.site-footer {
  margin-top: 56px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.4), #020617);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner strong {
  font-size: 20px;
}

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

.footer-links {
  display: flex;
  gap: 18px;
  color: var(--muted-2);
}

.footer-links a:hover {
  color: var(--accent);
}

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 30px;
  color: #64748b;
  font-size: 13px;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .featured-grid,
  .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .rank-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    height: 620px;
  }

  .hero-content {
    bottom: 74px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .filter-bar,
  .detail-hero,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 10px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    height: 64px;
    padding: 0 14px;
  }

  .brand-name {
    font-size: 18px;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    left: 18px;
    width: calc(100vw - 36px);
  }

  .hero-meta span,
  .detail-meta span {
    padding: 6px 10px;
    font-size: 13px;
  }

  .content-section,
  .page-main > .ranking-list,
  .filter-bar,
  .breadcrumb,
  .detail-main > .content-section,
  .detail-content,
  .detail-hero,
  .player-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .featured-grid,
  .catalog-grid,
  .compact-grid,
  .category-grid,
  .category-large-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.wide {
    grid-template-columns: 104px 1fr;
  }

  .ranking-row {
    grid-template-columns: 92px 1fr;
  }

  .ranking-poster img {
    width: 92px;
    height: 128px;
  }

  .footer-inner {
    display: block;
  }

  .footer-links {
    margin-top: 18px;
    flex-wrap: wrap;
  }
}
