:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-strong: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f97316;
  --accent-strong: #ea580c;
  --amber: #f59e0b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(249, 115, 22, 0.15), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(245, 158, 11, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  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 var(--line);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--amber));
  color: white;
  box-shadow: 0 12px 32px rgba(249, 115, 22, 0.35);
}

.brand-name {
  font-size: 21px;
  font-weight: 800;
  background: linear-gradient(90deg, #fb923c, #facc15);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 12px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 650;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(249, 115, 22, 0.95);
  transform: translateY(-1px);
}

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

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  padding: 0 14px;
}

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

.header-search button,
.mobile-search button {
  height: 42px;
  border: 0;
  border-radius: 13px;
  padding: 0 16px;
  color: #fff;
  background: var(--accent);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
}

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

.mobile-menu.is-open {
  display: block;
}

.mobile-menu-links,
.mobile-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0;
}

.mobile-categories a,
.subnav-pills a,
.sample-links a {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.62);
  padding: 7px 12px;
  font-size: 13px;
}

main {
  min-height: 70vh;
}

.hero-section {
  position: relative;
  overflow: hidden;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
  background:
    radial-gradient(circle at 72% 34%, rgba(249, 115, 22, 0.24), transparent 26rem),
    linear-gradient(135deg, #111827, #020617 72%);
}

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

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  transform: scale(1.04);
}

.hero-slide.active > img {
  animation: slowZoom 8s ease both;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 0 140px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fb923c;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.hero-content h1 {
  max-width: 780px;
  margin: 14px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 680px;
  margin: 0;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags {
  margin: 28px 0 34px;
}

.hero-tags span,
.hero-tags a,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-tags span:first-child,
.detail-tags span:first-child {
  background: var(--accent);
  border-color: var(--accent);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

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

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.34);
}

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

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

.small-actions .primary-button,
.small-actions .ghost-button {
  min-height: 42px;
}

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.58);
  font-size: 36px;
  line-height: 1;
}

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

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

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

.hero-thumbs {
  position: absolute;
  z-index: 5;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 58px;
  display: grid;
  grid-template-columns: repeat(3, 150px);
  gap: 12px;
}

.hero-thumb {
  min-height: 72px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #fff;
  text-align: left;
  background: rgba(15, 23, 42, 0.66);
  padding: 8px;
  backdrop-filter: blur(12px);
}

.hero-thumb img {
  width: 50px;
  height: 56px;
  border-radius: 11px;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.hero-thumb.active {
  border-color: rgba(249, 115, 22, 0.75);
  background: rgba(249, 115, 22, 0.2);
}

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

.page-main .section-wrap {
  padding-top: 34px;
}

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

.section-heading h2,
.page-hero h1,
.detail-text h1,
.detail-article h2 {
  margin: 8px 0 0;
  letter-spacing: -0.035em;
}

.section-heading h2 {
  font-size: clamp(26px, 4vw, 40px);
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow);
}

.category-tile {
  min-height: 210px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

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

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

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

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

.category-tile span {
  font-size: 22px;
  font-weight: 850;
}

.category-tile p {
  margin: 6px 0 0;
  color: var(--muted-strong);
  font-size: 14px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(249, 115, 22, 0.55);
  box-shadow: 0 24px 70px rgba(249, 115, 22, 0.12);
}

.poster-wrap,
.rank-poster,
.category-cover,
.detail-poster {
  position: relative;
  overflow: hidden;
  display: block;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.25), transparent 48%),
    linear-gradient(145deg, #1e293b, #020617);
}

.poster-wrap {
  aspect-ratio: 16 / 22;
}

.poster-wrap img,
.rank-poster img,
.category-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-meta-line {
  color: var(--muted);
  font-size: 12px;
}

.movie-card h2,
.rank-content h2,
.category-overview-card h2 {
  margin: 8px 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card h2 a:hover,
.rank-content h2 a:hover,
.category-overview-card h2 a:hover {
  color: #fb923c;
}

.movie-card p,
.rank-content p,
.category-overview-card p,
.page-hero p,
.detail-article p,
.footer-brand p {
  color: var(--muted-strong);
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  font-size: 14px;
}

.tag-row {
  color: var(--muted);
  font-size: 12px;
}

.tag-row a {
  color: #fb923c;
}

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

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

.rank-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 16px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.82);
  padding: 12px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.rank-card:hover {
  transform: translateY(-3px);
  border-color: rgba(249, 115, 22, 0.55);
}

.rank-poster {
  border-radius: 15px;
  min-height: 142px;
}

.rank-content {
  min-width: 0;
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 28px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--amber));
  font-weight: 900;
  font-size: 13px;
}

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

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

.page-hero.compact {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.page-hero h1 {
  max-width: 860px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 18px;
}

.filter-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.75);
  padding: 16px;
}

.filter-line {
  display: grid;
  grid-template-columns: 1fr 150px 150px 170px;
  gap: 12px;
}

.empty-state {
  display: none;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted-strong);
  text-align: center;
  padding: 26px;
  background: rgba(15, 23, 42, 0.86);
}

.empty-state.is-visible {
  display: block;
}

.subnav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  padding: 16px;
}

.category-cover {
  min-height: 220px;
  border-radius: 18px;
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 70px;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(330px, 0.9fr);
  gap: 24px;
  align-items: start;
}

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

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(249, 115, 22, 0.26), transparent 18rem),
    rgba(2, 6, 23, 0.28);
  color: #fff;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 18px 45px rgba(249, 115, 22, 0.42);
  font-size: 34px;
}

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

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  padding: 7px 12px;
  font-size: 13px;
}

.detail-info {
  display: grid;
  grid-template-columns: 142px 1fr;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
  padding: 18px;
  box-shadow: var(--shadow);
}

.detail-poster {
  min-height: 210px;
  border-radius: 18px;
}

.detail-text h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.one-line {
  color: var(--muted-strong);
  margin: 12px 0 18px;
}

.detail-meta {
  margin: 0;
  display: grid;
  gap: 10px;
}

.detail-meta div {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
}

.detail-meta dt {
  color: var(--muted);
}

.detail-meta dd {
  margin: 0;
  color: #fff;
}

.detail-tags {
  margin-top: 16px;
}

.detail-tags span {
  min-height: 30px;
  font-size: 12px;
}

.detail-article {
  width: 100%;
  margin-top: 0;
}

.detail-article h2 {
  font-size: 28px;
}

.detail-article p {
  margin: 14px 0 24px;
  font-size: 17px;
}

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

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

.footer-logo {
  margin-bottom: 12px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.footer-links h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-grid {
  display: grid;
  gap: 8px;
}

.footer-grid a {
  color: var(--muted);
  font-size: 14px;
}

.footer-grid a:hover {
  color: #fb923c;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 18px 0 26px;
  font-size: 13px;
}

@keyframes slowZoom {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.08);
  }
}

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

  .hero-thumbs {
    display: none;
  }

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

  .rank-grid,
  .rank-list,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .topbar {
    height: 64px;
  }

  .nav-links {
    display: none;
  }

  .menu-button {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding: 70px 0 90px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .filter-line {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .topbar,
  .mobile-menu,
  .section-wrap,
  .page-hero,
  .detail-main,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .hero-content {
    width: min(100% - 22px, 1180px);
  }

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

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

  .rank-poster {
    min-height: 126px;
  }

  .detail-info {
    padding: 14px;
  }

  .player-start span {
    width: 70px;
    height: 70px;
  }
}
