:root {
  color-scheme: dark;
  --bg: #05070d;
  --bg-soft: #0d111d;
  --panel: rgba(17, 24, 39, 0.72);
  --panel-strong: rgba(31, 41, 55, 0.88);
  --line: rgba(255, 255, 255, 0.08);
  --muted: #9ca3af;
  --text: #f9fafb;
  --amber: #f59e0b;
  --amber-2: #f97316;
  --green: #22c55e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  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 34rem),
    radial-gradient(circle at 80% 0%, rgba(249, 115, 22, 0.11), transparent 28rem),
    linear-gradient(180deg, #030712 0%, #0b1020 48%, #05070d 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;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(3, 7, 18, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  box-shadow: 0 12px 34px rgba(245, 158, 11, 0.28);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text strong {
  font-size: 1.18rem;
  letter-spacing: 0.02em;
}

.logo-text em {
  margin-top: -2px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.78rem;
}

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

.nav-link,
.header-search,
.mobile-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #d1d5db;
  font-weight: 700;
  transition: 0.2s ease;
}

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
  color: white;
  background: rgba(245, 158, 11, 0.12);
}

.header-search {
  padding: 10px 16px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.2);
}

.nav-dropdown {
  position: relative;
}

.nav-more {
  border: 0;
  cursor: pointer;
  background: transparent;
  font: inherit;
}

.nav-dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  display: none;
  min-width: 180px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.96);
  box-shadow: var(--shadow);
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  display: grid;
  gap: 4px;
}

.nav-dropdown-panel a {
  padding: 9px 12px;
  border-radius: 12px;
  color: #d1d5db;
}

.nav-dropdown-panel a:hover {
  background: rgba(245, 158, 11, 0.12);
  color: white;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(31, 41, 55, 0.7);
  color: white;
  font-size: 1.4rem;
}

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

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

.mobile-nav.open {
  display: grid;
}

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

.hero {
  position: relative;
  margin-top: 26px;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 34px;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.65fr);
  align-items: end;
  gap: 32px;
  padding: 64px;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
  pointer-events: none;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.95) 0%, rgba(3, 7, 18, 0.72) 42%, rgba(3, 7, 18, 0.34) 100%),
    linear-gradient(0deg, rgba(3, 7, 18, 0.92), transparent 42%);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.02);
}

.hero-content,
.hero-poster-card {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.section-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2.35rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero p {
  max-width: 680px;
  margin: 22px 0 0;
  color: #e5e7eb;
  font-size: 1.08rem;
}

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

.button-primary,
.button-secondary,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.button-primary,
.play-button {
  border: 0;
  color: #111827;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  box-shadow: 0 16px 42px rgba(245, 158, 11, 0.25);
}

.button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: white;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.button-primary:hover,
.button-secondary:hover,
.play-button:hover {
  transform: translateY(-2px);
}

.hero-poster-card {
  align-self: center;
  justify-self: end;
  width: min(320px, 100%);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(16px);
}

.hero-poster-card .poster-frame {
  border-radius: 24px;
}

.hero-dots {
  position: absolute;
  left: 64px;
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--amber);
}

.quick-search {
  margin: -38px auto 54px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: min(820px, calc(100% - 48px));
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.86);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.quick-search input,
.filter-input {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: white;
  font: inherit;
}

.quick-search input {
  padding: 15px 20px;
}

.quick-search button,
.filter-button {
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  cursor: pointer;
}

.content-section {
  margin: 64px 0;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-more {
  display: inline-flex;
  min-width: max-content;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.05);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.62);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(31, 41, 55, 0.82);
}

.poster-link {
  display: block;
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 22px 22px 0 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.28), transparent 30%),
    linear-gradient(135deg, #1f2937, #111827 55%, #030712);
}

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

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

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

.quality-badge,
.rank-badge,
.status-pill {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.quality-badge {
  right: 12px;
  top: 12px;
  padding: 4px 9px;
  color: #111827;
  background: var(--amber);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  color: white;
  background: rgba(239, 68, 68, 0.92);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.22);
}

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

.movie-meta-line,
.detail-meta,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.movie-card h2 {
  margin: 9px 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.footer-links a:hover,
.breadcrumb a:hover {
  color: var(--amber);
}

.movie-card p {
  margin: 0;
  min-height: 3.9em;
  color: #cbd5e1;
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag-row span,
.detail-tag {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.1);
  font-size: 0.78rem;
  font-weight: 700;
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(249, 115, 22, 0.05)),
    rgba(17, 24, 39, 0.68);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.94rem;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 72px 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.65);
}

.rank-number {
  font-size: 1.7rem;
  font-weight: 1000;
  color: var(--amber);
  text-align: center;
}

.rank-thumb {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: linear-gradient(135deg, #1f2937, #030712);
}

.rank-row h2 {
  margin: 0 0 6px;
  font-size: 1.08rem;
}

.rank-row p {
  margin: 0;
  color: #cbd5e1;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.72);
}

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

.filter-button {
  min-width: 110px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: stretch;
  margin: 28px 0 50px;
}

.player-panel,
.detail-side,
.text-panel {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(17, 24, 39, 0.7);
  box-shadow: var(--shadow);
}

.player-panel {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.28), rgba(3, 7, 18, 0.82));
  cursor: pointer;
  z-index: 3;
}

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

.play-button {
  min-height: 62px;
  padding: 0 30px;
  border: 0;
  cursor: pointer;
  font-size: 1.02rem;
}

.player-info {
  padding: 24px;
}

.breadcrumb {
  margin-bottom: 16px;
}

.detail-title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-lead {
  margin: 0;
  color: #d1d5db;
  font-size: 1.08rem;
}

.detail-side {
  overflow: hidden;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #1f2937, #020617);
}

.detail-side-content {
  padding: 22px;
}

.detail-side-content dl {
  display: grid;
  grid-template-columns: 4em 1fr;
  gap: 10px 12px;
  margin: 0;
}

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

.detail-side-content dd {
  margin: 0;
  color: #f3f4f6;
}

.text-panel {
  padding: 30px;
  margin-bottom: 30px;
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 1.55rem;
}

.text-panel p {
  color: #d1d5db;
  font-size: 1.03rem;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.72);
}

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

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.site-footer p,
.footer-bottom {
  color: var(--muted);
}

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

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

.empty-state {
  display: none;
  padding: 36px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
}

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

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

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

  .detail-side {
    max-width: 360px;
  }
}

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

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

  .site-header-inner {
    min-height: 66px;
  }

  .hero {
    min-height: 660px;
    border-radius: 26px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 34px 24px 72px;
    align-items: end;
  }

  .hero-poster-card {
    justify-self: start;
    width: 190px;
    padding: 10px;
  }

  .hero-dots {
    left: 24px;
    bottom: 28px;
  }

  .quick-search,
  .filter-panel {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .quick-search {
    margin-top: 20px;
    width: 100%;
  }

  .quick-search button,
  .filter-button {
    min-height: 48px;
  }

  .section-heading {
    display: grid;
  }

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

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

  .rank-row {
    grid-template-columns: 52px 74px 1fr;
  }

  .rank-row .button-secondary {
    grid-column: 2 / 4;
  }
}

@media (max-width: 520px) {
  main,
  .site-header-inner,
  .mobile-nav,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .logo-mark {
    width: 38px;
    height: 38px;
  }

  .logo-text strong {
    font-size: 1.02rem;
  }

  .hero h1 {
    font-size: 2.45rem;
  }

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

  .detail-title {
    font-size: 2.25rem;
  }

  .player-info,
  .text-panel {
    padding: 20px;
  }
}
