:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(30, 41, 59, 0.62);
  --panel-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --orange: #f97316;
  --orange-deep: #dc2626;
  --blue: #38bdf8;
  --green: #22c55e;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #111827 100%);
  color: var(--text);
  min-height: 100vh;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

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

.brand span:last-child,
.footer-brand strong {
  font-size: 1.15rem;
  background: linear-gradient(90deg, #fb923c, #ef4444);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.26);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.mobile-link {
  color: var(--muted);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: rgba(249, 115, 22, 0.96);
}

.nav-toggle {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
}

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

.mobile-panel.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 12px 14px;
  background: rgba(30, 41, 59, 0.72);
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, transform 1.4s ease;
  transform: scale(1.04);
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.16) 100%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.18) 50%, rgba(15, 23, 42, 0.36) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 72vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 96px 0 132px;
  max-width: 1180px;
}

.eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.22);
}

.hero h1 {
  max-width: 760px;
  margin: 20px 0 18px;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.8;
}

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

.hero-meta a,
.hero-meta span,
.detail-meta span,
.rank-tags a,
.rank-tags span,
.movie-meta a,
.movie-meta span {
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(51, 65, 85, 0.78);
  color: #fff;
  font-size: 0.86rem;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 15px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.26);
}

.ghost-btn {
  color: #fff;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.wide-card:hover,
.category-card:hover,
.category-tile:hover {
  transform: translateY(-3px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  transition: all 0.2s ease;
}

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

.hero-control.prev {
  left: 20px;
}

.hero-control.next {
  right: 20px;
}

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

.hero-dot {
  width: 18px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: all 0.2s ease;
}

.hero-dot.active {
  width: 38px;
  background: var(--orange);
}

.hero-search {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 72px;
  width: min(640px, calc(100% - 32px));
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.hero-search input,
.inline-filter input,
.inline-filter select {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: 0;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 13px;
}

.hero-search input {
  flex: 1;
  padding: 0 14px;
}

.hero-search button,
.inline-filter button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  border-radius: 13px;
  font-weight: 800;
}

.hero-search button {
  padding: 0 20px;
}

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

.section-wrap {
  padding: 64px 0;
}

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

.section-title.compact {
  align-items: start;
  display: block;
}

.section-title span {
  display: block;
  color: var(--orange);
  font-weight: 800;
  margin-bottom: 8px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  letter-spacing: -0.03em;
}

.section-title a {
  color: var(--orange);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.14);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(249, 115, 22, 0.74);
  box-shadow: 0 24px 58px rgba(249, 115, 22, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.9), rgba(15, 23, 42, 0.96));
}

.poster,
.wide-bg,
.rank-poster,
.detail-cover,
.detail-backdrop {
  background-size: cover;
  background-position: center;
}

.poster {
  position: absolute;
  inset: 0;
  transition: transform 0.32s ease;
}

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

.poster-shade,
.wide-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 62%);
}

.poster-badge,
.poster-year {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 9px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(8px);
}

.poster-badge {
  left: 10px;
  top: 10px;
}

.poster-year {
  right: 10px;
  bottom: 10px;
  background: rgba(249, 115, 22, 0.88);
}

.movie-body {
  padding: 15px;
}

.movie-body h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-body h3 a:hover,
.rank-main h3 a:hover {
  color: var(--orange);
}

.movie-body p {
  min-height: 3.2em;
  margin: 0 0 12px;
  color: var(--dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.6;
}

.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.movie-tags span,
.detail-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.14);
  font-size: 0.78rem;
}

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

.wide-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.72);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.wide-bg {
  position: absolute;
  inset: 0;
  transition: transform 0.34s ease;
}

.wide-card:hover .wide-bg {
  transform: scale(1.08);
}

.wide-content {
  position: absolute;
  inset: auto 20px 20px 20px;
  display: grid;
  gap: 10px;
}

.wide-content strong {
  font-size: 1.5rem;
}

.wide-content em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

.wide-content span {
  color: #fff;
  font-weight: 700;
}

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

.category-tile,
.category-card {
  display: grid;
  gap: 10px;
  min-height: 148px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.88));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-card:hover {
  border-color: rgba(249, 115, 22, 0.64);
}

.category-tile span,
.category-card h2 {
  margin: 0;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
}

.category-tile em,
.category-card p {
  color: var(--dim);
  font-style: normal;
  line-height: 1.7;
}

.category-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  font-weight: 900;
}

.split-section {
  display: grid;
  grid-template-columns: 1.65fr 0.9fr;
  gap: 30px;
}

.latest-list,
.ranking-list,
.rank-aside {
  display: grid;
  gap: 14px;
}

.rank-aside {
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
}

.ranking-row {
  display: grid;
  grid-template-columns: 52px 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
}

.rank-no {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
}

.rank-poster {
  width: 82px;
  height: 110px;
  border-radius: 14px;
  background-color: #1e293b;
}

.rank-main h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.rank-main p {
  margin: 0 0 10px;
  color: var(--dim);
  line-height: 1.6;
}

.rank-score {
  color: #facc15;
  font-size: 1.35rem;
  font-weight: 900;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 0;
  padding: 52px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 24rem),
    linear-gradient(145deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 900px;
  margin: 18px 0 14px;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.06rem;
}

.inline-filter {
  margin-top: 26px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 150px 140px;
  gap: 10px;
}

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

.inline-filter button {
  min-height: 48px;
  padding: 0 18px;
}

.empty-state {
  display: none;
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: var(--panel);
}

.empty-state.show {
  display: block;
}

.detail-main {
  overflow: hidden;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  filter: blur(8px);
  transform: scale(1.04);
  opacity: 0.56;
}

.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72)),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.24) 60%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 44px;
  padding: 72px 0;
}

.detail-cover {
  min-height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background-color: #1e293b;
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--dim);
  margin-bottom: 20px;
}

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

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.detail-one-line {
  max-width: 860px;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.8;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle, rgba(249, 115, 22, 0.2), transparent 22rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.84));
  transition: opacity 0.22s ease;
}

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

.play-mark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  box-shadow: 0 20px 40px rgba(249, 115, 22, 0.28);
  font-size: 2rem;
}

.player-cover strong {
  font-size: 1.6rem;
}

.player-cover em {
  color: var(--muted);
  font-style: normal;
}

.detail-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.detail-copy article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
}

.detail-copy h2 {
  margin: 0 0 16px;
  font-size: 1.55rem;
}

.detail-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.site-footer {
  margin-top: 42px;
  padding: 56px 0 24px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.42);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--dim);
}

.footer-grid p {
  max-width: 520px;
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer-grid a:hover {
  color: var(--orange);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.hidden-by-filter {
  display: none !important;
}

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

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

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

  .nav-toggle {
    display: flex;
  }

  .hero-control {
    display: none;
  }

  .hero-content {
    padding-bottom: 160px;
  }

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

  .hero-search {
    display: grid;
  }

  .hero-search input,
  .hero-search button {
    min-height: 46px;
  }

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

  .wide-grid,
  .split-section,
  .detail-copy,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .rank-aside {
    position: static;
  }

  .detail-cover {
    min-height: 360px;
    max-width: 280px;
  }

  .page-hero {
    padding: 34px;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 760px;
  }

  .hero-content {
    min-height: 760px;
    padding: 96px 0 170px;
  }

  .hero h1 {
    letter-spacing: -0.04em;
  }

  .section-wrap {
    padding: 44px 0;
  }

  .section-title {
    display: block;
  }

  .section-title a {
    display: inline-flex;
    margin-top: 12px;
  }

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

  .movie-body {
    padding: 12px;
  }

  .wide-grid {
    gap: 14px;
  }

  .ranking-row {
    grid-template-columns: 42px 64px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
    font-size: 1rem;
  }

  .rank-poster {
    width: 64px;
    height: 88px;
  }

  .rank-tags {
    gap: 6px;
  }

  .rank-tags span:nth-child(n+4),
  .rank-tags a:nth-child(n+4) {
    display: none;
  }

  .page-hero {
    margin-top: 24px;
    padding: 26px;
    border-radius: 24px;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-layout {
    padding: 48px 0;
    gap: 26px;
  }

  .detail-cover {
    max-width: none;
    min-height: 420px;
  }

  .player-cover strong {
    max-width: 80%;
    text-align: center;
    font-size: 1.2rem;
  }

  .play-mark {
    width: 62px;
    height: 62px;
    font-size: 1.5rem;
  }
}
