:root {
  color-scheme: dark;
  --bg-deep: #020617;
  --bg-panel: #0f172a;
  --bg-soft: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

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

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

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

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), #f97316);
  color: #fff;
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.28);
}

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

.brand-text strong {
  font-size: 22px;
  letter-spacing: 0.04em;
}

.brand-text em {
  font-size: 11px;
  color: #fde68a;
  font-style: normal;
  opacity: 0.88;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.nav-link {
  color: #e2e8f0;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-category {
  color: #cbd5e1;
  font-size: 14px;
}

.header-search,
.mobile-search,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.page-filter input {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  border-radius: 999px;
  outline: none;
  padding: 11px 16px;
  min-width: 230px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.page-filter input:focus {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.header-search button,
.mobile-search button,
.search-page-form button {
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  background: var(--amber);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: none;
  background: transparent;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  margin: 7px 0;
  border-radius: 99px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px;
}

.mobile-links {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(2, 6, 23, 0.68) 45%, rgba(2, 6, 23, 0.1) 100%), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 42%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 760px;
  padding-top: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--amber);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.25);
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
  margin: 22px 0 16px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.hero-tags span,
.detail-meta span,
.card-meta span,
.tag-row span {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  color: #dbeafe;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary {
  background: var(--amber);
  color: #fff;
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.28);
}

.btn-primary:hover {
  background: var(--amber-dark);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

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

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

.section-head h2,
.article-panel h2,
.side-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(25px, 3vw, 36px);
}

.section-head p,
.article-panel p,
.side-panel,
.category-overview-card p,
.category-tile p,
.site-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 38px 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);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.78));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-gradient {
  opacity: 1;
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.88);
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--amber);
  color: #fff;
  font-size: 24px;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--amber);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h2 a {
  transition: color 0.2s ease;
}

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

.card-body p {
  margin: 0 0 14px;
  min-height: 44px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-meta span {
  color: var(--muted-strong);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 2px 18px;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.rail-item {
  flex: 0 0 280px;
}

.rail-actions {
  display: flex;
  gap: 10px;
}

.rail-actions button {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  color: #fff;
  background: rgba(51, 65, 85, 0.9);
  font-size: 28px;
  cursor: pointer;
}

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

.category-tile,
.category-overview-card,
.article-panel,
.side-panel,
.player-card {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.category-tile {
  padding: 22px;
  min-height: 150px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-tile span {
  display: block;
  margin-bottom: 10px;
  color: #fff;
  font-size: 21px;
  font-weight: 850;
}

.ranking-block {
  background: rgba(15, 23, 42, 0.45);
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.42);
  padding: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-list a:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.46);
}

.ranking-list strong {
  color: var(--amber);
  font-size: 22px;
}

.ranking-list span {
  font-weight: 800;
}

.ranking-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

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

.page-hero,
.detail-hero {
  position: relative;
  background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.18), transparent 34%), linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.94));
  border-bottom: 1px solid var(--line);
}

.small-hero {
  padding: 76px 0 52px;
}

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

.breadcrumb a {
  color: #fbbf24;
}

.page-filter {
  margin-top: 26px;
}

.page-filter input,
.search-page-form input {
  min-width: min(520px, 100%);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 20px;
  align-items: center;
}

.category-overview-card h2 {
  margin: 0 0 10px;
}

.category-poster-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.category-poster-stack img {
  aspect-ratio: 3 / 4;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.detail-hero {
  padding: 64px 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 62px);
}

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

.large-tags span {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
  color: #fde68a;
}

.player-section {
  padding: 44px 0 18px;
}

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

.video-player,
.player-cover,
.player-cover img {
  width: 100%;
  height: 100%;
}

.video-player {
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  cursor: pointer;
  z-index: 5;
  background: #000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
  object-fit: cover;
  opacity: 0.62;
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  border: none;
  border-radius: 999px;
  background: var(--amber);
  color: #fff;
  font-size: 38px;
  box-shadow: 0 22px 48px rgba(245, 158, 11, 0.35);
  cursor: pointer;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 26px;
}

.article-panel,
.side-panel {
  padding: 26px;
}

.article-panel p {
  margin-bottom: 26px;
  color: #dbeafe;
  font-size: 17px;
}

.side-panel dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 13px 16px;
  margin: 0;
}

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

.side-panel dd {
  margin: 0;
  color: #e2e8f0;
}

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

.search-results {
  display: grid;
  gap: 16px;
}

.search-result-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.78);
}

.search-result-card img {
  width: 96px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.search-result-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.search-result-card p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  color: #fff;
  font-size: 26px;
  margin-bottom: 12px;
}

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

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

.footer-links a {
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
}

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

.is-filtered-out {
  display: none;
}

.empty-state {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.78);
  padding: 24px;
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

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

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

  .category-overview-grid,
  .content-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: 540px;
  }

  .hero-content {
    padding: 84px 16px 80px;
    justify-content: flex-end;
  }

  .hero-arrow {
    display: none;
  }

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

  .ranking-list,
  .footer-grid,
  .detail-layout,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 280px;
  }

  .category-poster-stack {
    max-width: 240px;
  }
}

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

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

  .hero h1,
  .hero h2,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero p,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

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

  .rail-item {
    flex-basis: 240px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-result-card {
    grid-template-columns: 78px 1fr;
  }

  .search-result-card img {
    width: 78px;
  }
}
