:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --accent: #fbbf24;
  --accent-strong: #f59e0b;
  --accent-soft: rgba(251, 191, 36, 0.14);
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --wrap: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.11), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(14, 165, 233, 0.12), transparent 30rem),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.nav-wrap {
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: white;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), #fb7185);
  box-shadow: 0 12px 32px rgba(251, 191, 36, 0.28);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.nav-link {
  white-space: nowrap;
  color: var(--muted);
  font-size: 14px;
  transition: color 0.2s ease;
}

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

.nav-search {
  position: relative;
  width: 250px;
  flex: 0 0 auto;
}

.nav-search input,
.mobile-search input,
.filter-input {
  width: 100%;
  color: white;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 44px 10px 16px;
  outline: none;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-input:focus {
  border-color: rgba(251, 191, 36, 0.76);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12);
}

.nav-search button {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: white;
  background: transparent;
  border: 0;
  font-size: 24px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-link {
  display: block;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.mobile-search {
  display: flex;
  gap: 10px;
}

.mobile-search input {
  padding-right: 16px;
}

.mobile-search button,
.btn,
.play-button,
.filter-button {
  color: #111827;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 18px 42px rgba(251, 191, 36, 0.22);
  cursor: pointer;
  font-weight: 800;
}

.mobile-search button {
  padding: 0 18px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  isolation: isolate;
  background: #020617;
}

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

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

.hero-backdrop {
  position: absolute;
  inset: -22px;
  background-position: center;
  background-size: cover;
  filter: blur(8px) brightness(0.42);
  transform: scale(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.94)),
    linear-gradient(180deg, rgba(15, 23, 42, 0.3), #020617);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto;
  min-height: 70vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  align-items: center;
  gap: 48px;
  padding: 86px 0 62px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero-desc {
  max-width: 760px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
}

.btn.secondary {
  color: white;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

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

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

.hero-tags span,
.tag-row span,
.pill {
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.hero-poster img {
  aspect-ratio: 2 / 2.75;
  object-fit: cover;
}

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

.hero-poster-info {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 18px;
}

.hero-poster-info strong {
  display: block;
  font-size: 20px;
}

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

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

.hero-dot.active {
  background: var(--accent);
}

.section {
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.section.alt {
  width: 100%;
  max-width: none;
  background: rgba(15, 23, 42, 0.42);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section.alt > .section-inner {
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto;
}

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

.section-title h2,
.page-hero h1,
.video-title h1 {
  margin: 10px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-title p,
.page-hero p,
.video-title p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.text-link {
  color: var(--accent);
  font-weight: 800;
}

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

.category-tile {
  min-height: 150px;
  padding: 20px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.13), rgba(14, 165, 233, 0.08)),
    rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.48);
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(14, 165, 233, 0.12)),
    rgba(15, 23, 42, 0.95);
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-tile p {
  margin: 0;
  color: var(--subtle);
  font-size: 14px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.48);
  background: rgba(15, 23, 42, 0.96);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.98);
}

.poster-link img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.play-badge,
.duration {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.play-badge {
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  color: #111827;
  background: var(--accent);
}

.duration {
  right: 12px;
  bottom: 12px;
  padding: 6px 9px;
  color: white;
  background: rgba(2, 6, 23, 0.74);
}

.movie-info {
  padding: 16px;
}

.meta-row,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--subtle);
  font-size: 13px;
}

.movie-info h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.movie-info h3 a:hover,
.rank-body h3 a:hover {
  color: var(--accent);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 140px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.66);
  transition: background 0.22s ease, border-color 0.22s ease;
}

.rank-item:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(251, 191, 36, 0.42);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 14px;
}

.rank-thumb img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.rank-body h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-body p {
  margin: 0 0 8px;
  color: var(--muted);
}

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.96));
  border-bottom: 1px solid var(--line);
}

.page-hero-inner {
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto;
  padding: 66px 0 42px;
}

.filter-bar {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

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

.video-hero {
  position: relative;
  overflow: hidden;
  background: #020617;
  border-bottom: 1px solid var(--line);
}

.video-bg {
  position: absolute;
  inset: -20px;
  background-position: center;
  background-size: cover;
  filter: blur(10px) brightness(0.35);
  transform: scale(1.05);
}

.video-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.98)),
    linear-gradient(180deg, rgba(15, 23, 42, 0.15), #020617);
}

.video-hero-inner {
  position: relative;
  z-index: 2;
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px;
  padding: 64px 0;
}

.video-cover {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.video-cover img {
  aspect-ratio: 2 / 2.85;
  object-fit: cover;
}

.video-title {
  align-self: center;
}

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

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

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

.player-panel {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  background: #000;
}

.player-shell video {
  width: 100%;
  min-height: 420px;
  max-height: 72vh;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.56));
  pointer-events: none;
}

.play-button {
  pointer-events: auto;
  width: 86px;
  height: 86px;
  font-size: 30px;
}

.player-shell.playing .player-overlay {
  display: none;
}

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

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

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

.article-panel p {
  margin: 0 0 18px;
  color: var(--muted);
}

.side-panel {
  position: sticky;
  top: 96px;
}

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

.side-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.side-card strong {
  display: block;
  line-height: 1.35;
}

.side-card span {
  color: var(--subtle);
  font-size: 13px;
}

.empty-state {
  display: none;
  padding: 34px;
  color: var(--muted);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
}

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

.footer-grid {
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  margin-bottom: 14px;
}

.site-footer p {
  color: var(--subtle);
  margin: 0;
}

.site-footer h3 {
  margin: 0 0 12px;
}

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

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

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

.footer-bottom {
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  color: var(--subtle);
  border-top: 1px solid var(--line);
}

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

  .menu-toggle {
    display: block;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 72px;
  }

  .hero-poster {
    max-width: 360px;
  }

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

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

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

  .video-cover {
    max-width: 320px;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .hero h1 {
    font-size: 38px;
  }

  .hero-inner {
    min-height: auto;
    padding-bottom: 82px;
  }

  .section {
    padding: 42px 0;
  }

  .section-head,
  .filter-bar {
    grid-template-columns: 1fr;
    display: grid;
  }

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

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

  .rank-item {
    grid-template-columns: 42px 92px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-num {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 13px;
  }

  .rank-body p {
    display: none;
  }

  .player-shell video {
    min-height: 260px;
  }

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

@media (max-width: 480px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .detail-actions {
    display: grid;
  }

  .btn {
    width: 100%;
  }
}
