* {
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --bg-soft: #172033;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-strong: #d97706;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 30%),
    linear-gradient(180deg, #0f172a 0%, #111827 48%, #0f172a 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.32);
}

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

.nav-link,
.mobile-link {
  color: var(--soft);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--accent);
  background: rgba(245, 158, 11, 0.10);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.10);
  color: #fff;
  cursor: pointer;
}

.menu-button span {
  width: 18px;
  height: 2px;
  margin: 4px auto;
  display: block;
  background: currentColor;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 8px 24px 20px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.76) 43%, rgba(15, 23, 42, 0.28) 100%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.42) 45%, rgba(15, 23, 42, 0.10) 100%);
}

.hero-inner {
  position: absolute;
  inset: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px 86px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 44px;
  align-items: end;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  padding: 7px 13px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.movie-title h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.movie-title p {
  max-width: 760px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.75;
}

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

.hero-meta span,
.meta-row span,
.movie-meta span,
.breadcrumb a,
.breadcrumb span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--soft);
  background: rgba(148, 163, 184, 0.12);
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.play-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.play-button {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.28);
}

.ghost-button {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.58);
}

.primary-button:hover,
.ghost-button:hover,
.play-button:hover {
  transform: translateY(-2px) scale(1.02);
}

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

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

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

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

.hero-dot.is-active {
  width: 44px;
  background: var(--accent);
}

.main-section,
.page-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

.page-section.compact {
  padding-top: 36px;
}

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

.section-header h2,
.section-header h1 {
  margin: 10px 0 0;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.03em;
}

.section-header p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-link,
.wide-link {
  display: block;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.poster-wrap img,
.wide-media img,
.player-poster img,
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.poster-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.12));
  transition: opacity 0.25s ease;
}

.poster-wrap em {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  font-size: 12px;
  font-style: normal;
  backdrop-filter: blur(10px);
}

.movie-link h3,
.wide-content h3,
.rank-content h3,
.related-card h3 {
  margin: 12px 0 5px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-link p,
.wide-content p,
.rank-content p,
.related-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.movie-link:hover .poster-wrap img,
.wide-link:hover img,
.category-tile:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.movie-link:hover .poster-mask {
  opacity: 1;
}

.movie-link:hover h3,
.wide-link:hover h3,
.rank-card:hover h3,
.related-card:hover h3 {
  color: var(--accent);
}

.feature-band {
  background: rgba(15, 23, 42, 0.42);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.wide-link {
  height: 100%;
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.58);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.wide-link:hover {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(15, 23, 42, 0.86);
  transform: translateY(-3px);
}

.wide-media {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  border-radius: 16px;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(245, 158, 11, 0.88);
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.32);
}

.wide-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-list span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 260px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.22);
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.42;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.22));
}

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

.category-tile span {
  width: max-content;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  font-size: 13px;
  font-weight: 700;
}

.category-tile strong {
  margin-bottom: 8px;
  font-size: 24px;
}

.category-tile p {
  margin: 0;
  color: var(--soft);
  line-height: 1.7;
}

.search-panel {
  margin: 28px 0 32px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.62);
}

.search-box span {
  color: var(--accent);
  font-size: 22px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-box input::placeholder {
  color: #64748b;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.chip {
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.58);
  cursor: pointer;
}

.chip:hover,
.chip.is-active {
  color: #fff;
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.18);
}

.result-text {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px 22px;
}

.category-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 72px 110px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-card:hover {
  border-color: rgba(245, 158, 11, 0.42);
  transform: translateY(-2px);
}

.rank-number {
  font-size: 24px;
  font-weight: 900;
  color: #fbbf24;
  text-align: center;
}

.rank-card img {
  width: 110px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-content p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-detail {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px 80px;
}

.breadcrumb {
  margin-bottom: 22px;
}

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

.movie-hero {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 34px;
  align-items: end;
  margin-bottom: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: #020617;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.24));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-cover-inner {
  display: grid;
  place-items: center;
  gap: 14px;
}

.player-cover-inner strong {
  font-size: clamp(22px, 3vw, 34px);
}

.player-cover-inner p {
  max-width: 520px;
  margin: 0;
  color: var(--soft);
}

.player-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.player-poster img {
  aspect-ratio: 2 / 3;
}

.movie-title {
  margin: 26px 0 0;
}

.movie-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
}

.detail-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.60);
}

.detail-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-panel p,
.side-panel p {
  color: var(--soft);
  line-height: 1.9;
}

.detail-panel + .detail-panel {
  margin-top: 22px;
}

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

.related-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  object-fit: cover;
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-list a {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
}

.side-list a:hover {
  color: var(--accent);
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
}

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

.footer-links {
  display: grid;
  gap: 10px;
  min-width: 160px;
}

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

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 28px;
  color: #64748b;
  font-size: 13px;
}

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

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

  .movie-hero,
  .movie-content {
    grid-template-columns: 1fr;
  }

  .player-poster {
    max-width: 320px;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero-carousel {
    height: 720px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    align-items: end;
    gap: 28px;
  }

  .hero-poster {
    display: none;
  }

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

  .wide-link {
    grid-template-columns: 1fr;
  }

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

  .rank-card .primary-button {
    display: none;
  }

  .rank-card img {
    width: 86px;
    height: 62px;
  }

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

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

@media (max-width: 560px) {
  .header-inner,
  .main-section,
  .page-section,
  .page-hero,
  .category-layout,
  .movie-detail {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .section-header {
    display: block;
  }

  .hero-actions {
    display: grid;
  }

  .primary-button,
  .ghost-button,
  .play-button {
    width: 100%;
  }
}
