:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #1e293b;
  --bg-card-soft: #26344a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.08), transparent 30%), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(var(--max), calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #f97316);
  color: white;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.35);
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

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

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.nav-search {
  width: 260px;
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.nav-search input,
.mobile-search input,
.big-search input,
.filter-input,
.filter-select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.nav-search input {
  padding: 10px 14px;
}

.nav-search button,
.mobile-search button,
.big-search button {
  border: 0;
  color: white;
  background: var(--accent);
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 800;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.7);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #e2e8f0;
  border-radius: 99px;
}

.mobile-panel {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-panel[hidden] {
  display: none;
}

.mobile-link {
  display: block;
  padding: 10px 0;
}

.mobile-search {
  display: flex;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

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

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

.hero-track,
.hero-slide,
.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-backdrop {
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.42) 100%),
    var(--hero-image);
  background-position: center;
  background-size: cover;
  filter: saturate(1.05);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 20%, rgba(251, 191, 36, 0.2), transparent 28%), linear-gradient(180deg, transparent, #020617 96%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.48fr);
  align-items: center;
  gap: 56px;
  padding: 100px 0 82px;
}

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

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--accent-2);
  background: rgba(245, 158, 11, 0.13);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 20px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 720px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 21px);
}

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

.hero-tags {
  margin: 24px 0 30px;
}

.hero-tags span,
.detail-meta span,
.card-meta span {
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 0 22px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--accent), #f97316);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.28);
}

.ghost-button {
  color: #e2e8f0;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.66);
}

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

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

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5));
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-control {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: white;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid var(--line);
  font-size: 28px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: rgba(226, 232, 240, 0.34);
}

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

.search-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.search-band-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.7fr);
  gap: 28px;
  align-items: center;
  padding: 32px 0;
}

.search-band h2 {
  margin: 10px 0 0;
  font-size: clamp(22px, 3vw, 34px);
}

.big-search {
  display: flex;
  overflow: hidden;
  border-radius: 18px;
  background: #020617;
  border: 1px solid var(--line);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.big-search input {
  padding: 18px 20px;
}

.big-search button {
  min-width: 112px;
}

.content-section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.soft-section,
.editor-section {
  width: 100%;
  padding-left: max(16px, calc((100vw - var(--max)) / 2));
  padding-right: max(16px, calc((100vw - var(--max)) / 2));
  background: rgba(15, 23, 42, 0.42);
}

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

.section-head h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
}

.section-more {
  color: var(--accent-2);
  font-weight: 900;
}

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

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

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.movie-card-large .card-media {
  aspect-ratio: 16 / 10.5;
}

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

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

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 36%, rgba(0, 0, 0, 0.72));
}

.media-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.media-chip {
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.92);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 52px;
  color: white;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: var(--accent-2);
}

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

.card-meta {
  gap: 8px;
  margin-bottom: 12px;
}

.card-meta span {
  padding: 3px 8px;
  font-size: 12px;
}

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

.tag-row span {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
}

.movie-card-horizontal .card-media {
  aspect-ratio: auto;
  height: 100%;
  min-height: 152px;
}

.movie-card-horizontal .card-title {
  min-height: auto;
}

.movie-card-compact .card-body p,
.movie-card-compact .tag-row {
  display: none;
}

.movie-card-compact .card-title {
  min-height: 44px;
  font-size: 15px;
}

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

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

.category-tile,
.category-overview-hero {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  border-radius: 24px;
  padding: 22px;
  isolation: isolate;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: #0f172a;
}

.category-tile::before,
.category-overview-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--tile-image);
  background-position: center;
  background-size: cover;
  transition: transform 0.45s ease;
}

.category-tile::after,
.category-overview-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.9));
}

.category-tile:hover::before,
.category-overview-hero:hover::before {
  transform: scale(1.08);
}

.category-tile span,
.category-overview-hero span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile p,
.category-overview-hero p {
  margin: 8px 0 0;
  color: #cbd5e1;
  font-size: 14px;
}

.rail-row {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
}

.rail-item {
  flex: 0 0 340px;
  scroll-snap-align: start;
}

.page-hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.small-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 80px 0 24px;
}

.small-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.small-hero p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
}

.category-overview-list {
  display: grid;
  gap: 32px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.mini-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.filter-panel {
  position: sticky;
  top: 86px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 180px)) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
}

.global-filter {
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(120px, 160px)) auto;
}

.filter-input,
.filter-select {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.62);
}

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

.filter-count {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

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

.long-rank .movie-card-horizontal {
  grid-template-columns: 210px minmax(0, 1fr);
}

.side-panel,
.detail-side,
.prose-card,
.player-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.side-panel,
.detail-side {
  position: sticky;
  top: 96px;
  padding: 18px;
}

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

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

.detail-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.52)),
    var(--detail-image);
  background-position: center;
  background-size: cover;
  filter: blur(2px) saturate(1.08);
  transform: scale(1.02);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, var(--bg));
}

.detail-shell {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.breadcrumb {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: #cbd5e1;
  font-size: 14px;
  margin-bottom: 24px;
}

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

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 820px;
  color: #dbeafe;
  font-size: 20px;
}

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

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

.detail-content {
  padding-top: 34px;
}

.watch-main {
  min-width: 0;
}

.player-card {
  overflow: hidden;
  padding: 10px;
  margin-bottom: 24px;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  font-weight: 900;
  font-size: 18px;
}

.video-player.is-playing .play-cover {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: var(--accent-2);
  box-shadow: 0 20px 48px rgba(245, 158, 11, 0.38);
}

.prose-card {
  padding: 26px;
}

.prose-card p {
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 17px;
}

.prose-card p:last-child {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #020617;
}

.footer-grid {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 220px;
  gap: 42px;
}

.footer-brand p {
  max-width: 520px;
  margin: 18px 0 0;
  color: var(--muted);
}

.footer-group h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.footer-group a {
  display: block;
  color: var(--muted);
  margin: 8px 0;
  font-size: 14px;
}

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

.footer-bottom {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  color: var(--muted-2);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 14px;
}

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

@media (max-width: 1040px) {
  .nav-search {
    display: none;
  }

  .hero-content,
  .detail-layout,
  .watch-layout,
  .two-column-layout,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-poster {
    max-width: 340px;
  }

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

  .filter-panel,
  .global-filter {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

  .filter-count {
    grid-column: 1 / -1;
  }

  .side-panel,
  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .desktop-nav {
    display: none;
  }

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

  .brand-subtitle {
    display: none;
  }

  .hero-carousel {
    min-height: 760px;
  }

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

  .hero-poster {
    width: min(100%, 280px);
  }

  .search-band-inner,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .big-search {
    flex-direction: column;
  }

  .small-hero {
    display: block;
  }

  .content-section {
    padding: 46px 0;
  }

  .section-head {
    display: block;
  }

  .featured-grid,
  .compact-grid,
  .full-grid,
  .more-grid,
  .category-grid,
  .mini-card-grid,
  .filter-panel,
  .global-filter {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal .card-media {
    min-height: auto;
    aspect-ratio: 16 / 10;
  }

  .detail-shell {
    padding-top: 40px;
  }

  .detail-info h1 {
    font-size: 34px;
  }

  .rail-item {
    flex-basis: 82vw;
  }
}
