:root {
  color-scheme: dark;
  --page-bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --brand: #f59e0b;
  --brand-strong: #f97316;
  --brand-soft: rgba(245, 158, 11, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  font-family: 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;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem),
    linear-gradient(180deg, #0f172a 0%, #111827 42%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.38);
  backdrop-filter: blur(18px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.26);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-weight: 650;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #ffffff;
}

.nav-cta {
  padding: 10px 18px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.36);
}

.nav-cta:hover {
  background: rgba(245, 158, 11, 0.28);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.8);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--panel-line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted);
}

.mobile-nav a:hover {
  background: rgba(51, 65, 85, 0.85);
}

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

.hero {
  position: relative;
  height: 640px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.22)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.62) 34%, transparent 100%);
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 72px 0 76px;
}

.hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: end;
  gap: 42px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #fbbf24;
  font-size: 18px;
  font-weight: 800;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.78;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  font-size: 13px;
  font-weight: 700;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.24);
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 44px rgba(245, 158, 11, 0.32);
}

.btn.secondary {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.hero-side {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-side-title {
  color: #fbbf24;
  font-weight: 900;
}

.hero-mini-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 94px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.hero-mini-card:hover {
  transform: translateX(-3px);
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(30, 41, 59, 0.88);
}

.hero-mini-card img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 13px;
}

.hero-mini-card strong {
  display: block;
  margin-bottom: 5px;
  line-height: 1.3;
}

.hero-mini-card span {
  color: var(--subtle);
  font-size: 13px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(14px);
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-1px);
}

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

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  transition: width 0.25s ease, background-color 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--brand);
}

.section {
  padding: 64px 0;
}

.section.tight {
  padding-top: 38px;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: #fbbf24;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--subtle);
  line-height: 1.8;
}

.library-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px;
  gap: 14px;
  margin-bottom: 22px;
}

.search-box,
.select-box {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 15px;
  color: var(--text);
  outline: none;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.search-box:focus,
.select-box:focus {
  border-color: rgba(245, 158, 11, 0.62);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.filter-button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.78);
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.filter-button:hover,
.filter-button.active {
  color: #ffffff;
  border-color: rgba(245, 158, 11, 0.56);
  background: rgba(245, 158, 11, 0.18);
}

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.26);
  transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.36);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
}

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

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 46%);
}

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(245, 158, 11, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.movie-card:hover .play-float {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(245, 158, 11, 0.92);
  font-size: 12px;
  font-weight: 850;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
  transition: color 0.25s ease;
}

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

.card-text {
  flex: 1;
  margin: 0 0 14px;
  color: var(--subtle);
  font-size: 14px;
  line-height: 1.72;
}

.card-meta {
  color: var(--subtle);
  font-size: 13px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 176px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 85% 15%, rgba(245, 158, 11, 0.22), transparent 9rem),
    rgba(15, 23, 42, 0.88);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.25);
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.42);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--subtle);
  line-height: 1.72;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 68px 96px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 126px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.88);
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(30, 41, 59, 0.82);
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.22);
}

.rank-item img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 16px;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-item p {
  margin: 8px 0 0;
  color: var(--subtle);
  font-size: 14px;
  line-height: 1.6;
}

.page-hero {
  padding: 72px 0 46px;
  background:
    radial-gradient(circle at 25% 5%, rgba(245, 158, 11, 0.18), transparent 28rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0));
}

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

.breadcrumb a {
  color: #fbbf24;
}

.page-hero h1 {
  max-width: 960px;
  margin: 0;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.86fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-panel {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.22)),
    rgba(0, 0, 0, 0.28);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 20px 46px rgba(245, 158, 11, 0.34);
  font-size: 34px;
  transition: transform 0.25s ease;
}

.play-button:hover {
  transform: scale(1.06);
}

.player-info {
  padding: 24px;
}

.player-info h2,
.detail-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.player-info p,
.detail-panel p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.86;
}

.detail-panel {
  padding: 22px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: 18px;
  background: rgba(15, 23, 42, 0.8);
}

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

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.tag {
  padding: 7px 10px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.24);
  font-size: 13px;
}

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

.empty-state {
  display: none;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.8);
}

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

.site-footer {
  margin-top: 64px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.72);
}

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

.footer-grid h3 {
  margin: 0 0 14px;
}

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

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

.footer-bottom {
  padding: 20px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

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

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

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

  .hero-side {
    display: none;
  }
}

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

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    height: 620px;
  }

  .hero-content {
    padding: 60px 0 72px;
  }

  .hero-arrow {
    display: none;
  }

  .section-head {
    display: block;
  }

  .library-tools {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .category-grid,
  .rank-list,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 54px 82px 1fr;
    gap: 12px;
  }

  .rank-item img {
    width: 82px;
    height: 82px;
  }

  .page-hero {
    padding-top: 48px;
  }
}
