:root {
  color-scheme: light;
  --bg: #f8fafc;
  --text: #1f2937;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.24);
  --card: #ffffff;
  --dark: #0f172a;
  --amber: #d97706;
  --orange: #ea580c;
  --blue: #2563eb;
  --purple: #7c3aed;
  --radius: 24px;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  color: #ffffff;
  transition: background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.site-header.is-scrolled,
.inner-page .site-header {
  color: var(--text);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

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

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

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
}

.brand-text {
  font-size: 1.25rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 700;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
  opacity: 0.92;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--amber);
  opacity: 1;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  color: currentColor;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 999px;
}

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

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(245, 158, 11, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.70) 42%, rgba(2, 6, 23, 0.34) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, transparent 34%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 720px;
  margin: 0 auto;
  padding: 148px 0 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

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

.hero-badges a,
.hero-badges span,
.detail-meta a,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  font-weight: 700;
  font-size: 0.9rem;
}

.hero-badges a:first-child,
.detail-meta a:first-child {
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 820px;
  margin: 18px 0 0;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero-copy h1 + h2 {
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 4.6rem);
}

.hero-copy p {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.26);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(14px);
}

.hero-actions,
.detail-actions {
  margin-top: 30px;
}

.hero-controls {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 92px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 2rem;
  line-height: 1;
  backdrop-filter: blur(14px);
}

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

.hero-dots button {
  width: 30px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.is-active {
  background: #ffffff;
}

.hero-search {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 28px;
  width: min(760px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(18px);
}

.hero-search input,
.filter-panel input,
.filter-panel select,
.inline-filter input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  color: var(--text);
  background: #ffffff;
}

.hero-search input {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
}

.hero-search button {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 800;
}

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

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

.section-head span,
.page-hero span,
.category-overview-card span,
.detail-article h2 + p + h2 {
  color: var(--amber);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head h2,
.page-hero h1 {
  margin: 2px 0 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-head > a {
  color: var(--amber);
  font-weight: 900;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: var(--radius);
  color: #ffffff;
  box-shadow: var(--shadow);
  background: #111827;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.5s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.10));
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 1.35rem;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.8);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.14);
}

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

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

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

.card-poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent);
}

.card-year {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
}

.card-content {
  padding: 16px;
}

.card-meta {
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-meta a {
  color: var(--amber);
  font-weight: 800;
}

.movie-card h3,
.rank-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card h3 a:hover,
.rank-card h3 a:hover {
  color: var(--amber);
}

.movie-card p,
.rank-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.card-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-tags {
  margin-top: 12px;
}

.card-tags span,
.tag-cloud a {
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 0.78rem;
  font-weight: 800;
}

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

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

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

.rank-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  padding: 12px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.rank-cover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 3 / 4;
  background: #111827;
}

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

.rank-cover span {
  position: absolute;
  top: 8px;
  left: 8px;
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 900;
}

.rank-info {
  align-self: center;
}

.page-hero {
  min-height: 360px;
  padding: 132px 0 72px;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(217, 119, 6, 0.35), transparent 28%),
    linear-gradient(135deg, #020617 0%, #111827 54%, #1f2937 100%);
}

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

.page-hero p {
  max-width: 720px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.08rem;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 26px;
  padding: 22px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.category-cover {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 16 / 10;
  background: #111827;
}

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

.category-overview-card h2 {
  margin: 6px 0 10px;
  font-size: 1.75rem;
}

.category-overview-card p {
  color: var(--muted);
}

.mini-card-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.mini-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: #f8fafc;
  font-weight: 800;
}

.mini-card img {
  width: 56px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.filter-panel input,
.filter-panel select,
.inline-filter input {
  min-height: 48px;
  padding: 0 16px;
}

.search-filter {
  grid-template-columns: minmax(240px, 1fr) 220px;
}

.year-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.year-filter button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  background: #f1f5f9;
  font-weight: 800;
}

.year-filter button.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.inline-filter {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 16px 0 0;
  padding: 26px;
  border-radius: 22px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: blur(2px);
  transform: scale(1.04);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.62)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98), transparent 48%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  padding: 132px 0 70px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.36);
  background: #111827;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.2rem, 5vw, 5rem);
  line-height: 1;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.detail-copy > p {
  max-width: 780px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.12rem;
}

.player-section {
  padding-top: 56px;
}

.player-stage {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-stage video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05), rgba(2, 6, 23, 0.66));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-stage.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-button {
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 22px 50px rgba(217, 119, 6, 0.32);
  transition: transform 0.25s ease;
}

.player-button:hover {
  transform: scale(1.08);
}

.player-button span {
  display: inline-block;
  margin-left: 5px;
  font-size: 2.1rem;
}

.detail-article {
  max-width: 900px;
  padding: 32px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-article h2 {
  margin: 0 0 12px;
  font-size: 1.55rem;
  font-weight: 900;
}

.detail-article h2:not(:first-child) {
  margin-top: 28px;
}

.detail-article p {
  margin: 0;
  color: #475569;
  font-size: 1.05rem;
}

.tag-cloud {
  margin-top: 26px;
}

.site-footer {
  margin-top: 86px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #111827, #020617);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 38px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
}

.footer-logo {
  color: #ffffff;
}

.footer-brand p {
  max-width: 360px;
  margin: 18px 0 0;
  color: #94a3b8;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.footer-columns h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1rem;
}

.footer-columns ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-columns li + li {
  margin-top: 9px;
}

.footer-columns a:hover {
  color: #f59e0b;
}

.footer-bottom {
  padding: 18px 16px 28px;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: #94a3b8;
}

[hidden] {
  display: none !important;
}

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

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

  .preview-list,
  .full-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border-radius: 22px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
  }

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

  .main-nav a {
    padding: 12px 10px;
  }

  .hero-copy {
    min-height: 700px;
    padding-top: 122px;
    padding-bottom: 190px;
  }

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

  .hero-search {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

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

  .category-overview-card,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    gap: 26px;
  }

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

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

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

@media (max-width: 560px) {
  .header-inner,
  .section-wrap,
  .home-row,
  .hero-copy,
  .hero-controls,
  .page-hero > div,
  .detail-layout,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .hero-copy h1,
  .hero-copy h2,
  .detail-copy h1 {
    letter-spacing: -0.045em;
  }

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

  .rank-card {
    grid-template-columns: 88px 1fr;
  }

  .mini-card-row {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .detail-article {
    padding: 22px;
  }
}
