:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.76);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f59e0b;
  --accent-strong: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

.site-shell {
  min-height: 100vh;
}

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  color: #111827;
  background: linear-gradient(135deg, #facc15 0%, #f97316 100%);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.22);
}

.desktop-nav,
.mobile-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.desktop-nav a,
.mobile-nav a {
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input,
.search-panel input,
.filter-input,
.filter-select {
  width: 100%;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  width: 260px;
  padding: 11px 46px 11px 18px;
}

.header-search input:focus,
.search-panel input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
  background: rgba(15, 23, 42, 0.98);
}

.header-search button {
  position: absolute;
  right: 5px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #111827;
  background: var(--accent);
  cursor: pointer;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.86);
  cursor: pointer;
}

.mobile-nav-wrap {
  display: none;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.94);
}

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

.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 22px;
  align-items: stretch;
  flex-direction: column;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 640px;
  display: grid;
  align-items: center;
  margin: 34px auto 56px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.hero-slide {
  grid-area: 1 / 1;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: stretch;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-copy {
  position: relative;
  z-index: 2;
  padding: clamp(32px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  background: var(--accent-soft);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero h1,
.page-hero h1 {
  max-width: 780px;
  margin: 22px 0 18px;
  color: var(--text);
  font-size: clamp(38px, 6vw, 74px);
  line-height: 0.96;
  letter-spacing: -0.07em;
  font-weight: 950;
}

.hero-lede,
.page-hero p {
  max-width: 680px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.9;
}

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

.meta-row {
  margin: 20px 0 4px;
}

.meta-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(148, 163, 184, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.tag-pill {
  color: #fed7aa;
  background: rgba(245, 158, 11, 0.12);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, #facc15 0%, #f97316 100%);
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.22);
}

.btn-secondary {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
}

.hero-visual {
  position: relative;
  min-height: 640px;
  isolation: isolate;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.08) 45%, rgba(2, 6, 23, 0.22));
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 640px;
  object-fit: cover;
}

.hero-float-card {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  z-index: 4;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(16px);
}

.hero-float-card img {
  width: 72px;
  height: 98px;
  min-height: auto;
  border-radius: 14px;
  object-fit: cover;
}

.hero-float-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 16px;
}

.hero-float-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.hero-dots {
  position: absolute;
  left: clamp(32px, 5vw, 72px);
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

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

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

.page-hero {
  margin: 34px auto 36px;
  padding: clamp(32px, 5vw, 64px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 28rem),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.section {
  margin: 0 auto 58px;
}

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

.section-title h2,
.section-title h1 {
  margin: 12px 0 0;
  color: var(--text);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.section-title p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.46);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.30);
}

.movie-card a {
  display: block;
  height: 100%;
  color: inherit;
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.96);
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s ease;
}

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

.poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent);
}

.rating-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #111827;
  background: var(--accent);
  font-size: 13px;
  font-weight: 950;
}

.rank-badge {
  left: auto;
  right: 12px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 9px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
}

.card-desc {
  margin: 0;
  min-height: 52px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.card-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 16rem),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.44);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.category-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.8;
}

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

.category-mini-list span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(148, 163, 184, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, minmax(150px, 0.4fr));
  gap: 12px;
  margin: 0 0 22px;
}

.filter-input,
.filter-select,
.search-panel input {
  padding: 13px 16px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 94px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.44);
}

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

.rank-poster {
  width: 94px;
  height: 128px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 950;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.player-card,
.detail-card,
.side-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

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

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.14));
}

.play-overlay.is-hidden {
  display: none;
}

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #facc15 0%, #f97316 100%);
  box-shadow: 0 24px 64px rgba(245, 158, 11, 0.32);
  font-size: 34px;
  font-weight: 950;
  cursor: pointer;
}

.detail-card {
  margin-top: 20px;
  padding: clamp(22px, 4vw, 34px);
}

.detail-card h1 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.detail-lede {
  margin: 0 0 22px;
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.9;
}

.article-block {
  margin-top: 28px;
}

.article-block h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 24px;
  font-weight: 950;
}

.article-block p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 2;
}

.side-card {
  padding: 20px;
}

.side-card + .side-card {
  margin-top: 20px;
}

.side-card h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 20px;
  font-weight: 950;
}

.info-list {
  display: grid;
  gap: 10px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted-strong);
}

.info-list span:first-child {
  color: var(--muted);
}

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

.related-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  color: inherit;
}

.related-item img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

.related-item strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.related-item span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 24px;
}

.search-panel button {
  min-width: 112px;
  border-radius: 999px;
  color: #111827;
  background: var(--accent);
  font-weight: 950;
  cursor: pointer;
}

.search-note {
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 0.7fr);
  gap: 28px;
  padding: 42px 0;
  color: var(--muted);
}

.footer-inner h3 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
}

.footer-inner p,
.footer-inner a {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

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

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

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

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

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .hero,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 420px;
    order: -1;
  }

  .hero-visual img {
    min-height: 420px;
  }

  .hero-dots {
    left: 32px;
  }

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

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

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

@media (max-width: 680px) {
  .header-inner,
  main,
  .footer-inner,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

  .logo {
    font-size: 18px;
  }

  .hero {
    margin-top: 18px;
    border-radius: 22px;
  }

  .hero-copy {
    padding: 24px 20px 68px;
  }

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

  .hero-visual,
  .hero-visual img {
    min-height: 320px;
  }

  .hero-float-card {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

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

  .card-body {
    padding: 13px;
  }

  .rank-item {
    grid-template-columns: 42px 72px 1fr;
  }

  .rank-item .btn {
    display: none;
  }

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

  .rank-poster {
    width: 72px;
    height: 96px;
  }

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