:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.76);
  --bg-card-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(251, 191, 36, 0.34);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --emerald: #10b981;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.12), transparent 32rem),
    radial-gradient(circle at 82% 8%, rgba(244, 63, 94, 0.12), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #0f172a 45%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 80%);
}

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

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

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(51, 65, 85, 0.72);
  background: rgba(2, 6, 23, 0.93);
  backdrop-filter: blur(18px);
}

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

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

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  box-shadow: 0 16px 36px rgba(244, 63, 94, 0.22);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong {
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.brand-text small {
  color: var(--subtle);
  font-size: 12px;
}

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

.nav-link,
.mobile-nav-link {
  border-radius: 12px;
  color: #d1d5db;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: #fff;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(51, 65, 85, 0.72);
  padding: 10px 16px 18px;
  background: rgba(2, 6, 23, 0.98);
}

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

.mobile-nav-link {
  display: block;
  padding: 12px 14px;
}

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

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

.hero-slide.is-active {
  opacity: 1;
  z-index: 2;
}

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #020617 6%, rgba(2, 6, 23, 0.78) 44%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(to right, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.2) 62%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 3;
  width: min(1280px, calc(100% - 32px));
  padding: 0 0 72px;
  transform: translateX(-50%);
}

.hero-kicker,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.7;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  padding: 6px 11px;
  color: #fde68a;
  font-size: 12px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.12);
}

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

.primary-btn,
.ghost-btn,
.quick-search button,
.watch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn,
.quick-search button,
.watch-link {
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #fb7185);
  box-shadow: 0 16px 38px rgba(251, 191, 36, 0.24);
}

.ghost-btn {
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #fff;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(14px);
}

.primary-btn:hover,
.ghost-btn:hover,
.quick-search button:hover,
.watch-link:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 10px;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
}

.hero-dot {
  width: 42px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(135deg, #fbbf24, #fb7185);
}

.quick-search-section,
.section-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-search-section {
  margin-top: -34px;
  position: relative;
  z-index: 6;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 460px);
  gap: 24px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.quick-search-panel p {
  margin: 0;
  color: var(--subtle);
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  outline: none;
  padding: 12px 14px;
  color: #fff;
  background: rgba(2, 6, 23, 0.56);
}

.quick-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(251, 191, 36, 0.58);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}

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

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

.section-heading.compact {
  margin-bottom: 16px;
}

.section-heading h2,
.page-hero h1,
.detail-info h1,
.content-card h2 {
  margin: 0;
  font-weight: 950;
  letter-spacing: -0.05em;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-card);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.32);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 22;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(251, 191, 36, 0.22), transparent 35%),
    linear-gradient(135deg, #0f172a, #1e293b);
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.score-badge,
.rank-mark {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.score-badge {
  top: 12px;
  right: 12px;
  min-width: 44px;
  height: 32px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.score-badge.large {
  top: 16px;
  right: 16px;
  min-width: 56px;
  height: 40px;
  font-size: 18px;
}

.rank-mark {
  left: 12px;
  top: 12px;
  min-width: 36px;
  height: 32px;
  color: #fff;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(12px);
}

.movie-card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-meta,
.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 750;
}

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

.movie-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.movie-card h3 a:hover {
  color: #fbbf24;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  padding: 4px 9px;
  font-size: 11px;
}

.watch-link {
  justify-self: start;
  min-height: 36px;
  margin-top: 2px;
  padding: 0 13px;
  font-size: 13px;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-card);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile {
  min-height: 190px;
  padding: 20px;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
}

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

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile span {
  margin-top: 72px;
  font-size: 24px;
  font-weight: 950;
}

.category-tile small {
  max-width: 260px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.two-column-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.compact-list,
.rank-list {
  display: grid;
  gap: 14px;
}

.compact-list .movie-card,
.rank-list .movie-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: stretch;
}

.compact-list .movie-poster,
.rank-list .movie-poster {
  aspect-ratio: auto;
  height: 100%;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(244, 63, 94, 0.16), rgba(15, 23, 42, 0.84)),
    #0f172a;
}

.slim-hero {
  min-height: 330px;
}

.ranking-hero {
  background:
    radial-gradient(circle at 78% 16%, rgba(251, 191, 36, 0.24), transparent 26rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(2, 6, 23, 0.94));
}

.page-hero-content {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 70px;
}

.page-hero h1 {
  max-width: 820px;
  font-size: clamp(38px, 6vw, 68px);
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.category-overview-card {
  padding: 18px;
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.category-thumbs img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  object-fit: cover;
  background: #1e293b;
}

.category-overview-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.category-overview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px 220px;
  gap: 14px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: var(--subtle);
  font-size: 13px;
  font-weight: 800;
}

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

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

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
  filter: blur(12px) saturate(1.2);
  transform: scale(1.06);
}

.detail-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(to top, #020617 2%, rgba(2, 6, 23, 0.68) 46%, rgba(2, 6, 23, 0.28)),
    linear-gradient(to right, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.42));
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-cover {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  max-width: 860px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
}

.detail-one-line {
  max-width: 860px;
  margin: 20px 0;
  color: #e2e8f0;
  font-size: 20px;
  line-height: 1.75;
}

.detail-meta-row {
  margin-bottom: 16px;
  font-size: 14px;
}

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

.player-section {
  scroll-margin-top: 96px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

.player-cover.is-hidden {
  display: none;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.player-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.62));
}

.play-circle {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #0f172a;
  font-size: 34px;
  background: linear-gradient(135deg, #fbbf24, #fb7185);
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.42);
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.content-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  background: var(--bg-card);
}

.content-card h2 {
  margin-bottom: 14px;
  font-size: 28px;
}

.content-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(51, 65, 85, 0.72);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}

.footer-inner strong {
  font-size: 22px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: var(--subtle);
  line-height: 1.65;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
}

.footer-inner nav a {
  color: var(--subtle);
  font-weight: 700;
}

.footer-inner nav a:hover {
  color: #fbbf24;
}

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

  .detail-layout {
    grid-template-columns: 280px 1fr;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .hero {
    min-height: 620px;
  }

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

  .quick-search-panel,
  .two-column-section,
  .detail-content-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

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

  .detail-cover {
    max-width: 320px;
  }

  .footer-inner nav {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .header-inner {
    width: min(100% - 24px, 1280px);
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content,
  .hero-dots,
  .quick-search-section,
  .section-wrap,
  .page-hero-content,
  .detail-inner {
    width: min(100% - 24px, 1280px);
  }

  .hero-actions,
  .quick-search {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions a,
  .quick-search button {
    width: 100%;
  }

  .quick-search-panel {
    padding: 18px;
  }

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

  .compact-list .movie-card,
  .rank-list .movie-card {
    grid-template-columns: 96px 1fr;
  }

  .movie-card h3 {
    font-size: 18px;
  }

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

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

  .detail-one-line {
    font-size: 17px;
  }

  .player-shell {
    border-radius: 18px;
  }

  .play-circle {
    width: 74px;
    height: 74px;
    font-size: 28px;
  }
}
