:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --orange: #f97316;
  --amber: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  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;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(249, 115, 22, 0.14), transparent 30rem),
    radial-gradient(circle at 82% 16%, rgba(245, 158, 11, 0.1), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
}

.nav-shell,
.strip-inner,
.footer-inner,
.content-section,
.page-hero,
.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand {
  font-size: 21px;
  background: linear-gradient(90deg, #fb923c, #fcd34d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.4);
  font-size: 15px;
}

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

.nav-link {
  position: relative;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fed7aa;
}

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

.header-search {
  display: flex;
  align-items: center;
  width: 260px;
  height: 40px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.5);
}

.header-search input,
.search-page-form input,
.filter-panel input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  padding: 0 12px 0 16px;
}

.header-search button,
.search-page-form button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  cursor: pointer;
  font-weight: 700;
}

.header-search button {
  align-self: stretch;
  padding: 0 14px;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(249, 115, 22, 0.18);
  border-radius: 10px;
  padding: 8px 11px;
}

.category-strip {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.strip-inner {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0;
}

.strip-inner a,
.mobile-panel a {
  color: var(--muted);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.strip-inner a {
  padding: 7px 13px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid transparent;
  font-size: 13px;
  white-space: nowrap;
}

.strip-inner a:hover,
.mobile-panel a:hover {
  color: #fff;
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.16);
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-panel a {
  padding: 10px 12px;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
}

.mobile-panel input {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(51, 65, 85, 0.55);
}

.mobile-panel button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  padding: 0 14px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.72) 36%, rgba(15, 23, 42, 0.2) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 42%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 68px;
  width: min(680px, calc(100% - 48px));
}

.eyebrow {
  margin: 0 0 10px;
  color: #fb923c;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.75);
}

.hero-desc {
  max-width: 620px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

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

.hero-tags {
  margin-top: 20px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.14);
  font-size: 12px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

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

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

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
}

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

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: #fb923c;
}

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

.intro-section {
  padding-top: 72px;
}

.section-title {
  max-width: 760px;
  margin-bottom: 30px;
}

.section-title h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.prose-section h2,
.detail-player-section h2 {
  margin: 0;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section-title h2,
.page-hero h1,
.detail-info h1 {
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
}

.section-title p,
.page-hero p,
.prose-section p,
.detail-one-line,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.8;
}

.section-title > p:last-child {
  margin-top: 16px;
  font-size: 17px;
}

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

.section-heading.tight {
  margin-bottom: 18px;
}

.section-heading h2,
.detail-player-section h2,
.prose-section h2 {
  font-size: clamp(25px, 3vw, 36px);
}

.section-heading a {
  color: #fb923c;
  font-weight: 800;
}

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

.category-card,
.category-overview-card,
.filter-panel,
.search-page-form,
.prose-section,
.detail-player-section,
.ranking-item,
.movie-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.82));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.category-card,
.category-overview-card {
  min-height: 150px;
  padding: 22px;
  border-radius: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.5);
}

.category-card span,
.category-title-link {
  display: inline-flex;
  margin-bottom: 12px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

.poster-link img {
  transition: transform 0.35s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.poster-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 1;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.95);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

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

.movie-card-body h2 {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.35;
}

.movie-card-body h2 a:hover,
.ranking-info h2 a:hover {
  color: #fb923c;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 9px 0 12px;
  overflow: hidden;
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  color: var(--subtle);
  font-size: 12px;
}

.movie-meta span + span::before {
  content: "·";
  margin-right: 10px;
  color: rgba(148, 163, 184, 0.55);
}

.tag-row {
  margin-top: 11px;
}

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

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

.ranking-item {
  position: relative;
  display: grid;
  grid-template-columns: 82px 52px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
}

.ranking-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

.rank-number {
  color: #fb923c;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.ranking-info h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

.ranking-info p {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--subtle);
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page-hero,
.detail-hero {
  padding: 58px 0 18px;
}

.page-hero.slim {
  max-width: 880px;
  text-align: center;
}

.filter-panel {
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 18px;
}

.filter-panel input,
.search-page-form input {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
}

.search-page-form {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 18px;
}

.search-page-form button {
  border-radius: 14px;
  padding: 0 22px;
}

.search-results .empty-state {
  padding: 30px;
  border-radius: 20px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
}

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

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.mini-links a {
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--subtle);
  font-size: 14px;
  margin-bottom: 22px;
}

.breadcrumb a {
  color: #fb923c;
}

.detail-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(249, 115, 22, 0.28);
  border-radius: 24px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-info {
  padding-bottom: 12px;
}

.detail-one-line {
  max-width: 820px;
  margin: 18px 0;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(51, 65, 85, 0.55);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
}

.detail-player-section,
.prose-section {
  border-radius: 24px;
  padding: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 20px;
  background: #000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

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

.player-trigger {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.16));
  cursor: pointer;
}

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

.player-trigger span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.45);
  font-size: 32px;
  padding-left: 4px;
}

.prose-section h2 + p {
  margin-top: 12px;
}

.prose-section p + h2 {
  margin-top: 28px;
}

.prose-section p {
  font-size: 17px;
}

.related-grid .movie-card.compact .movie-card-body p {
  display: none;
}

.site-footer {
  margin-top: 50px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), #020617);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-brand {
  margin-bottom: 14px;
  color: #fff;
  font-size: 20px;
}

.site-footer p,
.site-footer li {
  color: var(--subtle);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 16px;
}

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

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

.copyright {
  border-top: 1px solid var(--line);
  padding: 18px 16px;
  color: #64748b;
  text-align: center;
  font-size: 13px;
}

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

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

  .home-ranking {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
  }

  .nav-shell {
    justify-content: space-between;
  }

  .hero-carousel {
    min-height: 78vh;
  }

  .hero-content {
    bottom: 84px;
  }

  .hero-dots {
    left: 24px;
    right: auto;
    bottom: 38px;
  }

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

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

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

  .section-heading,
  .search-page-form {
    align-items: stretch;
    flex-direction: column;
  }

  .ranking-item {
    grid-template-columns: 68px 42px minmax(0, 1fr);
    gap: 12px;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .hero-content h1 {
    font-size: 36px;
  }

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

  .movie-grid {
    gap: 12px;
  }

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

  .ranking-info p,
  .tag-row {
    display: none;
  }
}
