:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.84);
  --panel-strong: #1e293b;
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --orange: #ea580c;
  --pink: #f472b6;
  --cyan: #22d3ee;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at 82% 12%, rgba(234, 88, 12, 0.12), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

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

.header-inner {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.24);
  font-size: 16px;
}

.logo-text {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fbbf24, #fb923c, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  color: var(--soft);
  flex: 1 1 auto;
}

.desktop-nav a {
  transition: color 0.2s ease;
  white-space: nowrap;
}

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

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.top-search input,
.mobile-search input,
.hero-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.top-search input::placeholder,
.mobile-search input::placeholder,
.hero-search input::placeholder,
.filter-bar input::placeholder {
  color: #64748b;
}

.top-search button,
.mobile-search button,
.hero-search button,
.primary-button,
.ghost-button,
.filter-button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.top-search button,
.mobile-search button,
.hero-search button,
.primary-button,
.filter-button {
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.20);
}

.top-search button {
  padding: 8px 14px;
  font-size: 13px;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  font-size: 24px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.55);
}

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.mobile-search button {
  padding: 8px 14px;
}

main {
  min-height: 60vh;
}

.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.hero-carousel {
  position: relative;
  max-width: 1280px;
  min-height: 680px;
  margin: 0 auto;
  padding: 76px 24px 120px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(44px);
  opacity: 0.5;
  pointer-events: none;
}

.hero-glow-left {
  top: 80px;
  left: -180px;
  background: rgba(245, 158, 11, 0.25);
}

.hero-glow-right {
  right: -160px;
  bottom: 80px;
  background: rgba(234, 88, 12, 0.20);
}

.hero-slides {
  position: relative;
  z-index: 1;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.72fr);
  gap: 38px;
  align-items: center;
  min-height: 520px;
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.92)),
    radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.20), transparent 28rem);
  box-shadow: var(--shadow);
  padding: 36px;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 0.55s ease both;
}

.hero-copy {
  order: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fbbf24;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #fbbf24, #fb923c, #fde68a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text {
  max-width: 740px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.7;
}

.hero-image-panel {
  position: relative;
  order: 2;
  overflow: hidden;
  border-radius: 30px;
  background: #111827;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
  aspect-ratio: 16 / 10;
}

.hero-image-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.88));
}

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

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

.primary-button,
.ghost-button,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  min-height: 46px;
}

.primary-button:hover,
.top-search button:hover,
.hero-search button:hover,
.filter-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.28);
}

.ghost-button {
  border: 1px solid rgba(251, 191, 36, 0.24);
  background: rgba(15, 23, 42, 0.70);
  color: #fde68a;
}

.ghost-button:hover {
  transform: translateY(-1px);
  background: rgba(245, 158, 11, 0.12);
}

.hero-dots {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.hero-dots button {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.34);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.hero-search {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 46px;
  width: min(780px, calc(100% - 48px));
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
}

.hero-search input {
  padding: 0 18px;
  font-size: 16px;
}

.hero-search button {
  padding: 12px 22px;
  white-space: nowrap;
}

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

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

.section-heading h2,
.page-heading h1,
.detail-info h1 {
  margin: 0;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.page-heading h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.page-heading p,
.section-heading p,
.category-card p,
.detail-lead,
.detail-text p,
.site-footer p {
  color: var(--muted);
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.86);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(251, 191, 36, 0.30);
  box-shadow: 0 24px 66px rgba(0, 0, 0, 0.32);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.movie-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111827;
}

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

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

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.76));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-cover::after {
  opacity: 1;
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.64);
  color: #fbbf24;
  backdrop-filter: blur(8px);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.34);
}

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

.movie-card-body h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

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

.movie-card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: #94a3b8;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #94a3b8;
  font-size: 12px;
}

.movie-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.76);
  font-size: 12px;
}

.hero-tags span {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.16);
}

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

.category-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.76);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.30);
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #fff;
}

.category-card p {
  margin: 0;
  font-size: 14px;
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  height: 92px;
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px auto;
  gap: 12px;
  margin: 24px 0 34px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.66);
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.filter-button {
  padding: 0 20px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: #fbbf24;
}

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

.player-box {
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(2, 6, 23, 0.28);
  cursor: pointer;
}

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

.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.player-play {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  font-size: 32px;
  box-shadow: 0 18px 50px rgba(234, 88, 12, 0.38);
}

.player-title-row {
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #cbd5e1;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-info {
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  background: rgba(30, 41, 59, 0.70);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
}

.detail-info h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
  margin-bottom: 18px;
}

.detail-lead {
  margin: 0 0 20px;
  font-size: 18px;
}

.detail-text {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.detail-panel {
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-panel h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 24px;
}

.detail-panel p {
  margin: 0;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 64px 150px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.74);
}

.ranking-number {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.ranking-item img {
  width: 150px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-item h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-item p {
  margin: 0;
  color: var(--muted);
}

.no-results {
  display: none;
  margin: 24px 0;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
}

.no-results.is-visible {
  display: block;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.96));
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-brand p {
  max-width: 520px;
  margin: 16px 0 0;
}

.footer-links h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.footer-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.footer-links a {
  color: var(--muted);
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 32px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.10);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .top-search {
    margin-left: auto;
  }

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

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

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

@media (max-width: 860px) {
  .header-inner {
    height: auto;
    min-height: 68px;
    padding: 12px 18px;
    flex-wrap: wrap;
  }

  .logo-text {
    font-size: 20px;
  }

  .top-search {
    display: none;
  }

  .hero-carousel {
    min-height: auto;
    padding: 34px 18px 112px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 24px;
  }

  .hero-image-panel {
    order: 1;
  }

  .hero-copy {
    order: 2;
  }

  .hero-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .hero-search input {
    min-height: 44px;
  }

  .section-heading,
  .page-heading {
    align-items: start;
    flex-direction: column;
  }

  .movie-grid,
  .category-grid,
  .detail-layout,
  .detail-text,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

  .ranking-item .primary-button {
    grid-column: 2 / -1;
  }
}

@media (max-width: 540px) {
  .page-wrap {
    padding: 38px 16px 64px;
  }

  .movie-grid {
    gap: 18px;
  }

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

  .category-thumbs {
    height: 112px;
  }

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

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