:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-2: #172033;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.18);
  --line: rgba(148, 163, 184, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.12), transparent 28%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  box-shadow: 0 0 0 7px var(--accent-soft);
  font-size: 14px;
}

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

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

.nav-link,
.mobile-link {
  color: var(--muted);
  font-size: 15px;
  transition: color 0.2s ease;
}

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

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

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select,
.search-large input {
  border: 1px solid var(--line);
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.92);
  border-radius: 999px;
}

.header-search input {
  width: 210px;
  padding: 10px 14px;
}

.header-search button,
.mobile-search button,
.search-large button,
.hero-actions a,
.section-more,
.empty-link,
.player-action {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search button:hover,
.mobile-search button:hover,
.search-large button:hover,
.hero-actions a:hover,
.section-more:hover,
.empty-link:hover,
.player-action:hover {
  transform: translateY(-1px);
  background: #d97706;
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.22);
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 20px;
}

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

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.mobile-search input {
  padding: 12px 14px;
}

.mobile-search button {
  padding: 12px 18px;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  display: grid;
  align-items: center;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.45), rgba(2, 6, 23, 0.96)), radial-gradient(circle at 70% 35%, rgba(245, 158, 11, 0.25), transparent 35%);
  z-index: 2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 1.1s ease;
  background-size: cover;
  background-position: center;
  filter: blur(7px) brightness(0.42);
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-content {
  position: relative;
  z-index: 4;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 80px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  gap: 48px;
  align-items: center;
}

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

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  margin-bottom: 22px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 690px;
  color: #cbd5e1;
  font-size: clamp(17px, 2.4vw, 22px);
  line-height: 1.75;
}

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

.hero-actions a {
  padding: 15px 24px;
}

.hero-actions a.secondary {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--line);
}

.hero-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

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

.hero-panel-body {
  padding: 22px;
}

.hero-panel-body strong {
  display: block;
  font-size: 22px;
  margin-bottom: 10px;
}

.hero-panel-body span {
  color: var(--muted);
  line-height: 1.6;
}

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

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

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

.page-hero {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 1));
  border-bottom: 1px solid var(--line);
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 66px 0 56px;
}

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

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 18px;
}

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

.section.compact {
  padding-top: 34px;
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
}

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

.section-more,
.empty-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  white-space: nowrap;
}

.feature-grid,
.movie-grid,
.category-grid,
.tag-cloud {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card,
.category-card,
.info-panel,
.related-card,
.rank-row,
.detail-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.96));
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.22);
}

.movie-card-link {
  display: grid;
  min-height: 100%;
}

.poster-frame {
  position: relative;
  overflow: hidden;
  display: block;
  background: #0b1120;
  aspect-ratio: 16 / 10;
}

.feature-grid .poster-frame {
  aspect-ratio: 4 / 3;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover img,
.related-card:hover img,
.rank-row:hover img {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.movie-card:hover,
.category-card:hover,
.rank-row:hover,
.related-card:hover {
  border-color: rgba(245, 158, 11, 0.58);
  transform: translateY(-4px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.poster-play,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
}

.poster-play {
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: white;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 42px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  color: var(--accent);
  font-style: normal;
  font-weight: 800;
  border: 1px solid rgba(245, 158, 11, 0.34);
}

.movie-card-body {
  display: grid;
  gap: 9px;
  padding: 17px;
}

.movie-card-body strong {
  font-size: 18px;
  line-height: 1.35;
}

.movie-card-body small,
.rank-info small,
.meta-list span,
.breadcrumbs,
.movie-line {
  color: var(--muted);
}

.movie-line {
  display: -webkit-box;
  line-height: 1.55;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span,
.meta-pill,
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid var(--line);
}

.tag-row span {
  padding: 5px 9px;
  font-size: 12px;
}

.meta-pill {
  padding: 8px 12px;
}

.category-card {
  padding: 22px;
  display: grid;
  gap: 14px;
}

.category-card strong {
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.category-card span {
  color: var(--accent);
  font-weight: 700;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.68);
  border-radius: 22px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 13px 15px;
}

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

.rank-row a {
  display: grid;
  grid-template-columns: 74px 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
}

.rank-row img {
  width: 120px;
  height: 76px;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.35s ease;
}

.rank-num {
  color: var(--accent);
  font-size: 28px;
  font-weight: 900;
}

.rank-info {
  display: grid;
  gap: 6px;
  min-width: 0;
}

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

.rank-info em {
  color: var(--muted);
  font-style: normal;
}

.rank-row b {
  color: var(--accent);
  white-space: nowrap;
}

.tag-cloud {
  grid-template-columns: repeat(6, 1fr);
}

.tag-cloud a {
  justify-content: center;
  padding: 12px 14px;
  color: #e2e8f0;
}

.tag-cloud a:hover {
  color: white;
  background: var(--accent);
}

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

.search-large input {
  padding: 16px 18px;
  font-size: 17px;
}

.search-large button {
  padding: 16px 28px;
}

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

.breadcrumbs {
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  z-index: 4;
}

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

.player-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 20px 55px rgba(245, 158, 11, 0.45);
  font-size: 34px;
  padding-left: 6px;
}

.detail-card {
  padding: 24px;
  margin-top: 24px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.2;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-card h2,
.info-panel h2 {
  margin: 24px 0 12px;
  font-size: 24px;
}

.detail-card p,
.info-panel p {
  color: #cbd5e1;
  line-height: 1.88;
}

.sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
}

.info-panel {
  padding: 22px;
}

.info-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
}

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

.related-card a {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  align-items: center;
}

.related-card img {
  width: 94px;
  height: 68px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.35s ease;
}

.related-card strong,
.related-card span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.related-card span {
  color: var(--muted);
  margin-top: 5px;
  font-size: 13px;
}

.empty-state {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  padding: 60px 20px;
}

.empty-state p {
  color: var(--muted);
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  gap: 14px;
}

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

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

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

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

  .menu-button {
    display: block;
  }

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

  .feature-grid,
  .movie-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

@media (max-width: 680px) {
  .header-inner {
    height: 66px;
  }

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

  .hero {
    min-height: 82vh;
  }

  .hero-content {
    padding: 54px 0 74px;
    gap: 28px;
  }

  .hero-actions,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions a,
  .section-more,
  .search-large button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .feature-grid,
  .movie-grid,
  .category-grid,
  .tag-cloud,
  .sidebar {
    grid-template-columns: 1fr;
  }

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

  .rank-row a {
    grid-template-columns: 44px 90px minmax(0, 1fr);
  }

  .rank-row img {
    width: 90px;
    height: 64px;
  }

  .rank-row b {
    display: none;
  }

  .related-card a {
    grid-template-columns: 82px minmax(0, 1fr);
  }
}
