:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --gold: #f59e0b;
  --gold-2: #fb923c;
  --red: #ef4444;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.12), transparent 28rem),
    radial-gradient(circle at 90% 20%, rgba(251, 146, 60, 0.10), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 0 36px rgba(245, 158, 11, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong,
.footer-logo {
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(90deg, #fde68a, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

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

.main-nav > a,
.nav-dropdown > button {
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 15px;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: 0.22s ease;
}

.main-nav > a:hover,
.main-nav > a.active,
.nav-dropdown:hover > button {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 180px;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.22s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  padding: 9px 10px;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.dropdown-panel a:hover {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 300px;
}

.header-search input,
.quick-search-panel input,
.filter-panel input,
.filter-panel select,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.88);
  color: var(--text);
  border-radius: 13px;
  padding: 11px 13px;
  outline: none;
  transition: 0.22s ease;
}

.header-search input:focus,
.quick-search-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.header-search button,
.quick-search-panel button,
.search-panel button {
  border: 0;
  border-radius: 13px;
  padding: 11px 16px;
  color: white;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  cursor: pointer;
  font-weight: 700;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  padding: 10px 12px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
}

.mobile-nav a {
  display: block;
  padding: 12px;
  border-radius: 12px;
  color: #cbd5e1;
}

.mobile-nav a:hover {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.hero-carousel {
  min-height: 76vh;
  position: relative;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

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

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

.hero-bg-missing,
.image-missing {
  background:
    radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.30), transparent 15rem),
    linear-gradient(135deg, #111827, #020617 70%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 30%, rgba(2, 6, 23, 0.10) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 76vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 340px;
  align-items: center;
  gap: 54px;
  padding: 80px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: #fbbf24;
  font-weight: 800;
  margin-bottom: 16px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: white;
}

.hero-copy p {
  margin: 20px 0 0;
  max-width: 660px;
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.75;
}

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

.hero-meta {
  margin: 22px 0 14px;
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #dbeafe;
}

.hero-tags,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tags a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.20);
  font-size: 13px;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.22s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.25);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.38);
}

.ghost-button {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.ghost-button:hover {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.12);
}

.ghost-button.small {
  min-height: 38px;
  font-size: 14px;
}

.hero-card {
  display: block;
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.24);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

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

.hero-card span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.56);
  color: white;
  font-weight: 700;
}

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

.hero-dots button {
  width: 26px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dots button.active {
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
}

.quick-search-panel {
  margin-top: -40px;
  position: relative;
  z-index: 8;
}

.quick-search-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(245, 158, 11, 0.20);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-inner form,
.search-panel,
.filter-panel {
  display: flex;
  gap: 10px;
}

.quick-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-links a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.10);
}

.content-section {
  padding: 70px 0;
}

.soft-section {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.34), transparent);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.section-title > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title h2 {
  margin: 0;
  color: white;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
}

.section-icon {
  color: #fbbf24;
  font-size: 20px;
}

.section-more {
  color: #fbbf24;
  font-weight: 700;
}

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

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

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

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.22), transparent 10rem),
    linear-gradient(135deg, #1e293b, #020617);
}

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

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

.poster-play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.56);
  color: white;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(6px);
  transition: 0.22s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red), var(--gold));
  color: white;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.22);
}

.movie-info {
  padding: 15px;
}

.movie-info h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
}

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

.movie-info p {
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.movie-meta {
  gap: 7px;
  color: var(--muted-2);
  font-size: 12px;
  margin-bottom: 12px;
}

.tag-row {
  gap: 6px;
}

.tag-row span {
  padding: 4px 7px;
  font-size: 12px;
}

.movie-card.horizontal {
  display: grid;
  grid-template-columns: 135px minmax(0, 1fr);
}

.movie-card.horizontal .poster-wrap {
  aspect-ratio: auto;
  min-height: 188px;
}

.movie-card.horizontal .movie-info p {
  min-height: auto;
}

.side-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

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

.sidebar-box,
.category-overview-block,
.detail-article,
.detail-sidebar {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
}

.sidebar-box h2,
.sidebar-box h3 {
  margin: 0 0 16px;
  color: white;
  font-size: 22px;
}

.category-links {
  display: grid;
  gap: 10px;
}

.category-links a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.62);
  color: #cbd5e1;
}

.category-links a:hover {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
}

.category-links b {
  color: var(--muted);
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  padding: 74px 0 54px;
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.16), transparent 24rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.62));
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 0 0 14px;
  color: white;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.75;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fbbf24;
}

.overview-list {
  display: grid;
  gap: 28px;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.category-overview-head h2 {
  margin: 0 0 6px;
  color: white;
  font-size: 26px;
}

.category-overview-head p {
  margin: 0;
  color: var(--muted);
}

.filter-panel,
.search-panel {
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
}

.filter-panel input,
.search-panel input {
  flex: 1 1 auto;
}

.filter-panel select,
.search-panel select {
  flex: 0 0 180px;
}

.empty-state,
.search-summary {
  color: var(--muted);
  margin: 16px 0 24px;
}

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

.ranking-list .movie-card:not(.horizontal) {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
}

.ranking-list .movie-card:not(.horizontal) .poster-wrap {
  aspect-ratio: auto;
  min-height: 170px;
}

.detail-top {
  padding: 36px 0 52px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.92));
  border-bottom: 1px solid var(--line);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 28px;
  align-items: start;
}

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(245, 158, 11, 0.20);
  background: #000;
  box-shadow: var(--shadow);
}

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

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: white;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.35);
}

.video-box.playing .big-play {
  opacity: 0;
  pointer-events: none;
}

.player-message {
  position: absolute;
  left: 16px;
  bottom: 16px;
  right: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  color: #e2e8f0;
  font-size: 14px;
}

.detail-poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #1e293b, #020617);
  box-shadow: var(--shadow);
}

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

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

.detail-article h1 {
  margin: 0 0 18px;
  color: white;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 900;
}

.detail-article h2 {
  margin: 30px 0 12px;
  color: white;
  font-size: 24px;
}

.detail-article p {
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.9;
}

.one-line {
  padding: 18px;
  border-left: 4px solid var(--gold);
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.10);
}

.detail-tags {
  margin-top: 24px;
}

.detail-sidebar dl {
  display: grid;
  gap: 11px;
  margin: 0;
}

.detail-sidebar dt {
  color: var(--muted-2);
  font-size: 13px;
}

.detail-sidebar dd {
  margin: -8px 0 6px;
  color: var(--text);
}

.site-footer {
  padding: 50px 0;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.92);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 28px;
}

.site-footer p {
  color: var(--muted);
  max-width: 520px;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: white;
}

.site-footer a {
  display: block;
  color: var(--muted);
  margin: 8px 0;
}

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

.footer-links {
  columns: 2;
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

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

  .hero-content,
  .side-layout,
  .detail-grid,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .detail-poster {
    max-width: 300px;
  }

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

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

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

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

  .brand-icon {
    width: 40px;
    height: 40px;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel,
  .hero-content {
    min-height: 82vh;
  }

  .hero-content {
    padding: 56px 0 86px;
    gap: 26px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .quick-search-panel {
    margin-top: 18px;
  }

  .quick-search-inner,
  .quick-search-inner form,
  .quick-links,
  .filter-panel,
  .search-panel {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .filter-panel select,
  .search-panel select {
    flex: 1 1 auto;
  }

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

  .movie-info {
    padding: 12px;
  }

  .movie-info h3 {
    font-size: 15px;
  }

  .movie-info p {
    display: none;
  }

  .movie-card.horizontal,
  .ranking-list .movie-card:not(.horizontal) {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .movie-card.horizontal .poster-wrap,
  .ranking-list .movie-card:not(.horizontal) .poster-wrap {
    min-height: 146px;
  }

  .category-overview-head,
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .content-section {
    padding: 44px 0;
  }

  .page-hero {
    padding: 52px 0 38px;
  }

  .detail-actions {
    margin-top: 16px;
  }

  .big-play {
    width: 68px;
    height: 68px;
  }
}
