:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --accent: #f59e0b;
  --accent-deep: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --blue: #1e3a8a;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.22), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(30, 58, 138, 0.42), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 38%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.88), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #facc15);
  color: #111827;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.35);
}

.logo-text {
  font-size: clamp(1.25rem, 3vw, 1.85rem);
  background: linear-gradient(90deg, #fde68a, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--text);
}

.hero {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-track {
  position: relative;
  min-height: 74vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.64) 32%, transparent 72%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 112px 0 86px;
}

.hero-kicker,
.section-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fde68a;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  width: min(760px, 100%);
  margin: 18px 0 18px;
  font-size: clamp(2.6rem, 8vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.hero p {
  width: min(660px, 100%);
  margin: 0 0 26px;
  color: #e2e8f0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.8;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.52);
}

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

.hero-meta {
  margin-bottom: 30px;
}

.pill,
.hero-meta span,
.detail-meta span,
.card-tags span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  color: #fde68a;
  font-size: 0.82rem;
  font-weight: 800;
}

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

.btn,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #111827;
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.32);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
}

.btn:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(245, 158, 11, 0.28);
}

.hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.68);
  color: #fff;
  cursor: pointer;
}

.hero-control.prev {
  left: max(16px, calc((100vw - 1220px) / 2));
}

.hero-control.next {
  right: max(16px, calc((100vw - 1220px) / 2));
}

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

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

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

main,
.page-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 72px 0 0;
}

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

.section-title {
  margin: 10px 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.12;
}

.section-desc {
  width: min(720px, 100%);
  color: var(--muted);
  line-height: 1.9;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.search-panel input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.58);
  color: #fff;
  padding: 0 18px;
  outline: none;
}

.search-panel input:focus {
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

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

.category-card a {
  position: relative;
  display: block;
  min-height: 190px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.25), transparent 45%),
    linear-gradient(135deg, rgba(30, 58, 138, 0.68), rgba(15, 23, 42, 0.88));
  box-shadow: var(--shadow);
}

.category-card h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 1.38rem;
}

.category-card p {
  position: relative;
  min-height: 70px;
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.7;
}

.category-card strong {
  position: relative;
  color: #fde68a;
}

.category-glow {
  position: absolute;
  width: 140px;
  height: 140px;
  right: -44px;
  top: -44px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  filter: blur(6px);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 24%, rgba(0, 0, 0, 0.7));
  opacity: 0.75;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: #111827;
  font-weight: 900;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-rank {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #fde68a;
  font-style: normal;
  font-weight: 900;
}

.card-info {
  padding: 16px;
}

.card-info h3 {
  display: -webkit-box;
  min-height: 3em;
  margin: 0 0 10px;
  overflow: hidden;
  color: #fff;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.card-line {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--subtle);
  font-size: 0.9rem;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  gap: 8px;
  margin-bottom: 12px;
  color: var(--subtle);
  font-size: 0.78rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tags span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 0.72rem;
}

.page-hero {
  margin-top: 34px;
  padding: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 90% 0%, rgba(245, 158, 11, 0.18), transparent 26rem),
    linear-gradient(135deg, rgba(30, 58, 138, 0.72), rgba(15, 23, 42, 0.86));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 12px 0;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.03em;
}

.page-hero p {
  width: min(820px, 100%);
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

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

.breadcrumb a {
  color: #fde68a;
}

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

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

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

.detail-cover-info {
  padding: 20px;
}

.detail-cover-info .btn {
  width: 100%;
}

.detail-main h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-meta {
  margin-bottom: 22px;
}

.detail-panel {
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
}

.detail-panel h2 {
  margin: 0 0 14px;
  font-size: 1.3rem;
}

.detail-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 2;
}

.player-card {
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  color: #111827;
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 22px 54px rgba(245, 158, 11, 0.38);
  cursor: pointer;
}

.player-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.96);
}

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

.compact-link {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.compact-link:hover {
  border-color: rgba(245, 158, 11, 0.44);
  transform: translateY(-2px);
}

.compact-link img {
  width: 70px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.compact-link strong {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-link small {
  display: block;
  margin-top: 6px;
  color: var(--subtle);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 72px 88px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
}

.rank-num {
  font-size: 1.6rem;
  color: #fde68a;
  font-weight: 900;
  text-align: center;
}

.ranking-item img {
  width: 88px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
  background: #111827;
}

.rank-body h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.rank-body p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.empty-search {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
  text-align: center;
}

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

.site-footer {
  margin-top: 88px;
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 58, 138, 0.84), rgba(15, 23, 42, 0.98));
}

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

.footer-logo {
  font-size: 1.4rem;
  color: #fde68a;
}

.footer-brand p {
  width: min(560px, 100%);
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 12px;
  justify-content: end;
}

.footer-links a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.footer-links a:hover {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.45);
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  text-align: center;
}

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

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

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    inset: 72px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

  body.nav-open .main-nav {
    display: flex;
  }

  .nav-link {
    border-radius: 14px;
  }

  .hero,
  .hero-track,
  .hero-slide {
    min-height: 78vh;
  }

  .hero-control {
    display: none;
  }

  .section-head,
  .footer-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
  }

  .detail-cover {
    position: relative;
    top: auto;
    max-width: 420px;
  }

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

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

  .ranking-item {
    grid-template-columns: 44px 72px 1fr;
  }

  .ranking-item .btn-secondary {
    grid-column: 1 / -1;
  }

  .footer-links {
    justify-content: start;
  }
}

@media (max-width: 620px) {
  .header-inner,
  main,
  .page-shell,
  .footer-inner,
  .hero-content {
    width: min(100% - 24px, 1220px);
  }

  .logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .hero-content {
    padding: 96px 0 80px;
  }

  .hero h1,
  .hero h2 {
    font-size: clamp(2.25rem, 12vw, 4rem);
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

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

  .card-info {
    padding: 12px;
  }

  .card-line {
    display: none;
  }

  .page-hero {
    padding: 28px;
    border-radius: 26px;
  }

  .detail-panel {
    padding: 20px;
  }

  .play-button {
    width: 68px;
    height: 68px;
    font-size: 1.55rem;
  }

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

  .rank-num {
    text-align: left;
  }

  .ranking-item img {
    width: 100%;
    max-width: 150px;
  }
}
