:root {
  color-scheme: dark;
  --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: #f59e0b;
  --accent-strong: #d97706;
  --green: #22c55e;
  --purple: #a855f7;
  --red: #ef4444;
  --blue: #3b82f6;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 28rem), linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
}

.nav-shell,
.footer-shell,
.layout-shell,
.search-band {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  color: #111827;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.24);
  font-size: 15px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-weight: 650;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a,
.mini-link,
.card-kicker a,
.hero-kicker a {
  transition: color 0.22s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover,
.mini-link:hover,
.card-kicker a:hover,
.hero-kicker a:hover {
  color: var(--accent);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.76);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: #fff;
}

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

.mobile-nav a {
  display: block;
  padding: 12px 8px;
  color: var(--muted);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.84) 38%, rgba(2, 6, 23, 0.18) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.9), transparent 72%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 66px;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
}

.hero-kicker,
.eyebrow {
  color: var(--accent);
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  max-width: 820px;
  margin: 12px 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

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

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

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
  backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.primary-button {
  background: var(--accent);
  color: #111827;
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.24);
}

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

.primary-button:hover {
  background: #fbbf24;
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.76);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: 24px;
  align-items: center;
  margin-top: -42px;
  padding: 24px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.94));
  box-shadow: var(--shadow);
  position: relative;
  z-index: 3;
}

.search-band h2,
.section-heading h2,
.page-hero h1,
.detail-content h2,
.side-card h2,
.category-overview-card h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.search-band p,
.page-hero p,
.category-overview-card p,
.detail-content p,
.wide-content p,
.card-body p,
.footer-brand p {
  color: var(--muted);
  line-height: 1.75;
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span {
  color: var(--accent);
  font-weight: 700;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  padding: 0 18px;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
}

.search-box input:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.layout-shell {
  padding: 64px 0 0;
}

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

.section-block {
  margin-bottom: 76px;
}

.section-heading,
.section-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.section-heading span {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.14);
  color: var(--accent);
  font-weight: 800;
}

.section-heading h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-heading.with-more {
  justify-content: space-between;
}

.section-heading.with-more > a {
  color: var(--accent);
  font-weight: 760;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 24px 52px rgba(245, 158, 11, 0.1);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #020617;
}

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

.movie-card:hover .poster-link img,
.wide-item:hover img {
  transform: scale(1.08);
}

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent 52%);
}

.score-pill,
.genre-pill,
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.score-pill {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  backdrop-filter: blur(8px);
}

.genre-pill {
  position: absolute;
  right: 10px;
  top: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 8px;
  background: var(--accent);
  color: #111827;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.9);
  color: #111827;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 15px;
}

.card-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
}

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

.card-body h3 a:hover,
.wide-content h3 a:hover,
.prev-next a:hover {
  color: var(--accent);
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 13px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

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

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 10px;
  color: rgba(148, 163, 184, 0.48);
}

.compact-card .card-body p {
  display: none;
}

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

.category-card,
.category-overview-card,
.page-hero,
.side-card,
.detail-content {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.96));
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.22);
}

.category-card {
  padding: 20px;
  min-height: 160px;
}

.category-card a {
  display: grid;
  gap: 10px;
}

.category-card span,
.category-overview-card h2 {
  color: var(--accent);
  font-size: 20px;
  font-weight: 840;
}

.category-card strong {
  line-height: 1.55;
}

.category-card p {
  margin: 16px 0 0;
  color: var(--subtle);
  font-size: 14px;
  line-height: 1.7;
}

.category-card p a {
  display: inline;
  color: var(--muted);
}

.wide-list {
  display: grid;
  gap: 16px;
}

.wide-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.92));
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.wide-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(90deg, rgba(51, 65, 85, 0.8), rgba(30, 41, 59, 0.95));
}

.wide-thumb {
  display: block;
  width: 112px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
}

.wide-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.wide-content h3 {
  margin: 10px 0 8px;
  font-size: 21px;
}

.wide-content p {
  display: -webkit-box;
  margin: 0 0 14px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-badge {
  min-width: 34px;
  min-height: 24px;
  padding: 4px 8px;
  background: var(--purple);
  color: #fff;
}

.inline-score {
  position: static;
  background: var(--accent);
  color: #111827;
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
  padding: 34px;
}

.small-hero {
  min-height: 220px;
}

.page-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(34px, 5vw, 56px);
}

.category-search {
  min-width: min(380px, 100%);
}

.category-overview-card {
  padding: 24px;
}

.category-main-link {
  display: block;
}

.category-overview-card ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.category-overview-card li a:hover {
  color: var(--accent);
}

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

.breadcrumbs a {
  color: var(--muted);
}

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

.player-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.55fr);
  gap: 24px;
  align-items: stretch;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.14), rgba(0, 0, 0, 0.58)), linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 60%);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.22s ease;
}

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

.play-button {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: var(--accent);
  color: #111827;
  font-size: 30px;
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.25);
}

.player-overlay strong {
  font-size: 20px;
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.detail-panel {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
}

.detail-panel img {
  width: 150px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.detail-panel h1 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.detail-panel p {
  color: var(--muted);
  line-height: 1.75;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  margin-top: 28px;
  margin-bottom: 76px;
}

.detail-content,
.side-card {
  padding: 28px;
}

.detail-content h2,
.side-card h2 {
  margin-bottom: 14px;
  color: #fff;
}

.detail-content p {
  margin: 0 0 26px;
  font-size: 17px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.side-card dt {
  color: var(--subtle);
}

.side-card dd {
  margin: 0;
  color: var(--text);
}

.prev-next {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.search-empty {
  display: none;
  margin: 18px 0 0;
  color: var(--accent);
  font-weight: 700;
}

.search-empty.is-visible {
  display: block;
}

.site-footer {
  margin-top: 76px;
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 0.8fr 0.8fr;
  gap: 36px;
  padding: 44px 0;
}

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

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

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

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

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 16px;
    font-size: 14px;
  }

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

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

  .player-hero,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-toggle {
    display: block;
  }

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

  .brand {
    font-size: 20px;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    bottom: 78px;
  }

  .hero-arrow {
    display: none;
  }

  .search-band,
  .page-hero,
  .footer-shell,
  .detail-panel {
    grid-template-columns: 1fr;
  }

  .search-band,
  .page-hero {
    align-items: stretch;
  }

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

  .detail-panel img {
    width: 100%;
    max-width: 210px;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .footer-shell,
  .layout-shell,
  .search-band,
  .footer-bottom {
    width: min(100% - 24px, 1280px);
  }

  .hero h1,
  .hero h2 {
    font-size: 42px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-meta span {
    min-height: 28px;
    padding: 4px 9px;
    font-size: 13px;
  }

  .movie-grid,
  .dense-grid,
  .latest-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .wide-item {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .wide-thumb {
    width: 88px;
  }

  .card-body p {
    min-height: auto;
  }

  .page-hero,
  .detail-content,
  .side-card {
    padding: 22px;
  }

  .player-overlay strong {
    font-size: 16px;
    padding: 0 12px;
    text-align: center;
  }
}
