:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --bg-card-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #f97316;
  --accent-2: #fb923c;
  --gold: #facc15;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.14), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

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

img {
  max-width: 100%;
  height: auto;
}

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

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  color: #111827;
  box-shadow: 0 12px 34px rgba(249, 115, 22, 0.34);
}

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

.nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 15px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: #fff;
  background: rgba(249, 115, 22, 0.18);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

.header-search input,
.filter-form input,
.filter-form select {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.86);
  color: var(--text);
  border-radius: 999px;
  padding: 11px 14px;
  outline: none;
  min-width: 210px;
}

.header-search button,
.filter-form button,
.btn,
.play-button {
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.filter-form button:hover,
.btn:hover,
.play-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.36);
}

.menu-button {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 24px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  margin-top: 26px;
  border-radius: 34px;
  border: 1px solid var(--line);
  background: #050816;
  box-shadow: var(--shadow);
}

.hero-slide {
  display: none;
  position: relative;
  min-height: 620px;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
}

.hero-slide.active {
  display: grid;
}

.hero-media {
  position: absolute;
  inset: 0;
  opacity: 0.5;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.36)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 48%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid rgba(249, 115, 22, 0.32);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.07em;
  font-weight: 950;
}

.hero p {
  max-width: 680px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.85;
}

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

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

.hero-panel {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 46px;
}

.hero-poster {
  width: min(390px, 86%);
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.62);
  transform: rotate(2deg);
}

.hero-poster img,
.poster img,
.movie-thumb img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.68);
}

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

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

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

.section {
  margin: 54px 0;
}

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

.section-title {
  margin: 12px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 950;
  letter-spacing: -0.05em;
}

.section-desc {
  color: var(--muted);
  max-width: 760px;
  line-height: 1.75;
}

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

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

.movie-card,
.category-card,
.info-card,
.rank-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(30, 41, 59, 0.9);
}

.poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-title {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-meta,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #cbd5e1;
  font-size: 12px;
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
}

.tag.hot,
.badge.hot {
  background: rgba(249, 115, 22, 0.16);
  color: #fed7aa;
}

.movie-line {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.category-card {
  min-height: 190px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 950;
}

.category-card p {
  color: var(--muted);
  line-height: 1.7;
}

.filter-bar {
  margin: 26px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filter-form input {
  flex: 1 1 320px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  padding: 12px;
}

.rank-number {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  font-weight: 950;
}

.movie-thumb {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

.page-hero {
  margin-top: 28px;
  padding: clamp(32px, 7vw, 72px);
  border-radius: 34px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(37, 99, 235, 0.12)),
    rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 14px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 860px;
  color: #cbd5e1;
  line-height: 1.85;
  font-size: 18px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  margin-bottom: 54px;
}

.player-card,
.detail-card {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.34)),
    rgba(2, 6, 23, 0.55);
  cursor: pointer;
  z-index: 3;
}

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

.play-button {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  font-size: 30px;
  padding-left: 23px;
  display: grid;
  place-items: center;
}

.player-info,
.detail-copy {
  padding: 24px;
}

.player-info h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-copy h2 {
  margin: 26px 0 12px;
  font-size: 26px;
  font-weight: 900;
}

.detail-copy p,
.player-info p {
  color: #cbd5e1;
  line-height: 1.9;
  margin: 0 0 14px;
}

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

.side-panel {
  display: grid;
  gap: 18px;
  align-content: start;
}

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

.related-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.72);
}

.related-item img {
  width: 70px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.related-item strong {
  display: block;
  margin-bottom: 6px;
}

.related-item span {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.62);
}

.footer-inner {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.empty-state {
  display: none;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(15, 23, 42, 0.76);
}

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

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

  .header-search {
    display: none;
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-button {
    display: block;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.76);
  }

  .hero,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide.active {
    display: block;
  }

  .hero-copy {
    padding: 46px 26px 86px;
  }

  .hero-panel {
    display: none;
  }

  .hero-dots {
    left: 26px;
  }

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

  .category-grid,
  .rank-list,
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  main,
  .header-inner,
  .footer-inner {
    width: min(100% - 22px, 1320px);
  }

  .logo {
    font-size: 19px;
  }

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

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

  .movie-title {
    font-size: 15px;
  }

  .movie-line {
    display: none;
  }

  .section-head {
    display: block;
  }

  .rank-card {
    grid-template-columns: 82px 1fr;
  }

  .filter-form input,
  .filter-form button,
  .filter-form select {
    width: 100%;
  }
}
