:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(245, 158, 11, 0.18);
  --line-strong: rgba(245, 158, 11, 0.36);
  --text: #fff7ed;
  --muted: rgba(254, 243, 199, 0.72);
  --muted-soft: rgba(254, 243, 199, 0.52);
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --amber-deep: #d97706;
  --purple: #581c87;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 28rem),
    radial-gradient(circle at top right, rgba(126, 34, 206, 0.28), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(88, 28, 135, 0.9), rgba(15, 23, 42, 0.94));
  backdrop-filter: blur(18px);
}

.nav-inner {
  width: min(100% - 32px, 1240px);
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.logo-text,
.footer-logo {
  font-size: 1.22rem;
  background: linear-gradient(90deg, #fde68a, #f59e0b, #fde68a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--amber-light), var(--amber-deep));
  box-shadow: 0 0 26px rgba(245, 158, 11, 0.48);
}

.logo:hover .logo-mark {
  animation: spin-glow 1.2s linear infinite;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.nav-links a,
.mobile-menu a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover {
  color: var(--amber-light);
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 260px;
}

.nav-search input {
  width: 100%;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  padding: 0 72px 0 18px;
  outline: none;
}

.nav-search input:focus {
  border-color: var(--amber-light);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.nav-search button {
  position: absolute;
  right: 5px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  padding: 0 13px;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(100% - 32px, 1240px);
  margin: 0 auto;
  padding: 14px 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-menu a {
  display: block;
  padding: 10px 0;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-image {
  position: absolute;
  inset: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.24)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 46%, rgba(2, 6, 23, 0.45) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, 1240px);
  min-height: 70vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 0 84px;
}

.hero-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 16px;
  color: var(--amber-light);
  font-weight: 700;
  font-size: 0.92rem;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 7vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.8;
}

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

.hero-meta span,
.detail-meta span,
.movie-meta-line span,
.tag-row span,
.info-chip,
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.58);
  padding: 6px 10px;
  font-size: 0.82rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  padding: 0 26px;
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.3);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(15, 23, 42, 0.52);
  padding: 0 24px;
}

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

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

.hero-dots button {
  width: 38px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--amber-light);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.62);
}

main {
  min-height: 66vh;
}

.section {
  padding: 64px 0;
}

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

.section-heading > div {
  display: grid;
  gap: 8px;
}

.heading-bar {
  width: 42px;
  height: 5px;
  display: block;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--amber-light), var(--amber-deep));
}

.section-heading h2,
.page-hero h1,
.category-card h2,
.copy-block h2,
.related h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.16;
}

.section-heading p,
.page-hero p,
.category-card p,
.copy-block p,
.empty-state {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  min-height: 38px;
  border: 1px solid var(--line);
  color: var(--amber-light);
  padding: 0 16px;
  background: rgba(245, 158, 11, 0.08);
  white-space: nowrap;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: var(--line-strong);
  background: rgba(15, 23, 42, 0.88);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(88, 28, 135, 0.22));
}

.compact-card .poster-link {
  aspect-ratio: 16 / 10;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.movie-card:hover img {
  transform: scale(1.08);
  filter: saturate(1.12) contrast(1.04);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 52%);
  opacity: 0.82;
}

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--amber-light), var(--amber-deep));
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.35);
  transform: scale(0.92);
  transition: transform 0.2s ease;
}

.movie-card:hover .play-badge {
  transform: scale(1.08);
}

.card-rank {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-light), var(--amber-deep));
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.35);
}

.movie-card-body {
  padding: 16px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.movie-card h2 {
  margin: 0 0 10px;
  font-size: 1.02rem;
  line-height: 1.35;
}

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

.movie-card p {
  min-height: 3.3em;
  margin: 0 0 12px;
  color: var(--muted-soft);
  font-size: 0.92rem;
  line-height: 1.65;
}

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

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.2), transparent 18rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(88, 28, 135, 0.52));
  padding: 24px;
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
}

.category-card h2,
.category-card p,
.category-card .category-card-foot {
  position: relative;
  z-index: 1;
}

.category-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 76px 1fr auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.62);
  padding: 10px 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  transform: translateX(6px);
  border-color: var(--line-strong);
  background: rgba(15, 23, 42, 0.9);
}

.rank-num {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-light), var(--amber-deep));
}

.rank-row img {
  width: 76px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.rank-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rank-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em {
  color: var(--muted-soft);
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: var(--amber-light);
  font-weight: 900;
}

.page-hero {
  padding: 74px 0 42px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted-soft);
  font-size: 0.92rem;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px 160px;
  gap: 12px;
  margin: 24px 0 28px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.84);
  padding: 0 14px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber-light);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.empty-state {
  display: none;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  padding: 30px;
  text-align: center;
  background: rgba(15, 23, 42, 0.55);
}

.detail-shell {
  padding: 44px 0 70px;
}

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

.detail-main,
.detail-side,
.copy-block,
.player-card {
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.detail-main {
  overflow: hidden;
}

.detail-title {
  padding: 26px;
}

.detail-title h1 {
  font-size: clamp(2rem, 5vw, 4.2rem);
}

.player-card {
  overflow: hidden;
  border-radius: 0 0 var(--radius) var(--radius);
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 18rem),
    linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  z-index: 3;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--amber-light), var(--amber-deep));
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.42);
  cursor: pointer;
  font-size: 2rem;
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 16px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.player:hover .player-controls,
.player.is-playing .player-controls,
.player:focus-within .player-controls {
  opacity: 1;
}

.progress {
  width: 100%;
  accent-color: var(--amber);
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: white;
}

.control-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-controls button {
  min-width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.player-controls button:hover {
  background: rgba(245, 158, 11, 0.42);
}

.time-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
}

.copy-block {
  margin-top: 24px;
  padding: 26px;
}

.copy-block + .copy-block {
  margin-top: 18px;
}

.copy-block h2 {
  font-size: 1.48rem;
  margin-bottom: 12px;
}

.copy-block p {
  font-size: 1.02rem;
}

.detail-side {
  padding: 20px;
}

.detail-cover {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
}

.info-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.info-list div {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.12);
  padding-bottom: 12px;
  color: var(--muted);
}

.info-list strong {
  color: var(--text);
}

.related {
  margin-top: 34px;
}

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

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

.footer-grid p {
  max-width: 460px;
  margin: 14px 0 0;
  color: var(--muted-soft);
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--amber-light);
  font-size: 1rem;
}

.footer-links {
  display: grid;
  gap: 9px;
  color: var(--muted);
}

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

.footer-bottom {
  width: min(100% - 32px, 1240px);
  margin: 36px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  color: var(--muted-soft);
  font-size: 0.92rem;
  text-align: center;
}

@keyframes spin-glow {
  to {
    transform: rotate(360deg);
  }
}

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

  .nav-search {
    margin-left: auto;
  }

  .nav-toggle {
    display: block;
  }

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

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

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

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

@media (max-width: 760px) {
  .nav-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-search {
    order: 3;
    width: 100%;
  }

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

  .section {
    padding: 44px 0;
  }

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

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

  .movie-card-body {
    padding: 13px;
  }

  .movie-card p {
    display: none;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .rank-row img {
    width: 58px;
    height: 44px;
  }

  .rank-score {
    display: none;
  }

  .detail-title,
  .copy-block,
  .detail-side {
    padding: 18px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .movie-grid.dense,
  .movie-grid.small {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

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