:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --rose: #fb7185;
  --cyan: #22d3ee;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.13), transparent 28rem),
    radial-gradient(circle at 80% 8%, rgba(34, 211, 238, 0.09), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

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

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.28);
}

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

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

.brand-text em {
  margin-top: -4px;
  color: #fde68a;
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #e2e8f0;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.1);
  transform: translateY(-1px);
}

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

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

.top-search input {
  padding: 7px 4px 7px 12px;
}

.top-search button,
.inline-filter button {
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  cursor: pointer;
  white-space: nowrap;
}

.top-search button {
  padding: 7px 14px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

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

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

.mobile-panel-inner {
  display: grid;
  gap: 10px;
  padding: 16px 0;
}

.mobile-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-category-links a {
  color: #fde68a;
  font-size: 14px;
}

.hero-carousel {
  position: relative;
  height: min(680px, calc(100vh - 76px));
  min-height: 540px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-backdrop,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.36) 100%),
    linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  align-items: center;
  gap: 54px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted-2);
  font-size: 18px;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-meta span,
.movie-meta span,
.tag-row span,
.tag-row a {
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(15, 23, 42, 0.66);
}

.hero-tags span,
.detail-meta span {
  padding: 7px 11px;
}

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

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.24);
}

.ghost-btn,
.section-more {
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.6);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.62);
  transform: translateY(-50%);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dots button {
  width: 32px;
  height: 4px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.34);
}

.hero-dots button.is-active {
  background: var(--amber-light);
}

.quick-strip {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.56);
}

.quick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 0;
}

.quick-grid a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(251, 191, 36, 0.42);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  transform: translateY(-5px);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.05);
  filter: saturate(1.12);
}

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.76) 100%);
}

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  background: var(--amber-light);
}

.movie-info {
  padding: 16px;
}

.movie-meta {
  margin-bottom: 9px;
}

.movie-meta span,
.tag-row span,
.tag-row a {
  padding: 4px 8px;
  font-size: 12px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.card-title a:hover {
  color: var(--amber-light);
}

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

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: #0f172a;
}

.category-tile {
  min-height: 180px;
  padding: 24px;
}

.category-tile::before,
.category-overview-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62)),
    var(--tile-image) center / cover;
  transition: transform 0.35s ease;
}

.category-tile:hover::before,
.category-overview-card:hover::before {
  transform: scale(1.04);
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 1;
}

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

.category-tile p {
  max-width: 320px;
  margin: 0;
  color: var(--muted-2);
}

.rank-panel {
  padding-bottom: 10px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
}

.rank-row:hover {
  border-color: rgba(251, 191, 36, 0.36);
}

.rank-row strong {
  color: var(--amber-light);
  font-size: 24px;
}

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

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

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 64px;
  background:
    radial-gradient(circle at 12% 24%, rgba(251, 191, 36, 0.18), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.94));
  border-bottom: 1px solid var(--line);
}

.small-hero h1,
.rank-hero h1 {
  max-width: 840px;
}

.inline-filter {
  display: flex;
  max-width: 620px;
  gap: 10px;
  margin-top: 28px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.46);
}

.inline-filter input {
  padding: 12px 10px 12px 18px;
}

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

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

.breadcrumb a:hover {
  color: var(--amber-light);
}

.breadcrumb.light {
  margin: 0 0 22px;
  color: rgba(226, 232, 240, 0.82);
}

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

.category-overview-card {
  min-height: 260px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 24px;
}

.category-overview-card > * {
  position: relative;
  z-index: 1;
}

.category-cover {
  display: block;
  border-radius: 18px;
  background: var(--tile-image) center / cover;
  box-shadow: var(--shadow);
}

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

.category-overview-card p {
  margin: 0 0 18px;
  color: var(--muted-2);
}

.preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-links a {
  max-width: 180px;
  overflow: hidden;
  padding: 6px 10px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  color: #fde68a;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(15, 23, 42, 0.76);
}

.detail-hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-image: var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  align-items: center;
  gap: 48px;
  padding: 76px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

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

.detail-layout {
  padding: 52px 0 72px;
}

.player-section,
.detail-content {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.25);
}

.player-section {
  padding: 22px;
}

.player-section h2,
.detail-content h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: #111827;
  font-size: 32px;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.32);
}

.player-overlay strong {
  font-size: 24px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.detail-content {
  margin-top: 28px;
  padding: 28px;
}

.detail-content p {
  margin: 0 0 24px;
  color: var(--muted-2);
  font-size: 17px;
}

.related-grid .movie-card.compact .movie-info p {
  min-height: 42px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), #020617);
}

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

.footer-brand {
  margin-bottom: 12px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
}

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

.site-footer nav {
  display: grid;
  gap: 8px;
}

.site-footer a:hover {
  color: var(--amber-light);
}

.footer-bottom {
  padding: 18px 0 28px;
  color: #64748b;
  text-align: center;
}

.is-hidden-card {
  display: none !important;
}

@media (max-width: 1080px) {
  .top-search {
    display: none;
  }

  .hero-content {
    grid-template-columns: 1fr 300px;
  }

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

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

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

  .hero-carousel {
    height: auto;
    min-height: 680px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 30px;
    padding: 48px 0 72px;
  }

  .hero-poster {
    max-width: 260px;
    transform: none;
  }

  .hero-control {
    top: auto;
    bottom: 72px;
  }

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

  .category-overview-card,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

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

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

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

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

  .movie-grid,
  .category-grid,
  .rank-list,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

  .inline-filter {
    border-radius: 24px;
    flex-direction: column;
  }

  .inline-filter button {
    min-height: 44px;
  }

  .rank-row {
    grid-template-columns: 48px 1fr;
  }

  .rank-row em {
    grid-column: 2;
  }

  .player-section,
  .detail-content {
    padding: 16px;
  }
}
