:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c31;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --weak: #64748b;
  --brand: #f59e0b;
  --brand-strong: #d97706;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 28rem), var(--bg);
  color: var(--text);
  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 {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

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

.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));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-nav {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 22px;
  letter-spacing: -0.04em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-panel a {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: var(--brand);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(51, 65, 85, 0.62);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 8px 8px 8px 14px;
}

.search-form input {
  width: 170px;
  background: transparent;
  color: #fff;
  border: 0;
  outline: 0;
}

.search-form button,
.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
}

.search-form button,
.btn-primary {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.28);
}

.search-form button:hover,
.btn-primary:hover {
  background: var(--brand-strong);
}

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

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(51, 65, 85, 0.58);
  border-radius: 12px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  gap: 14px;
  flex-wrap: wrap;
}

.mobile-panel.is-open {
  display: flex;
}

.hero {
  position: relative;
  height: clamp(420px, 62vw, 620px);
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.02);
}

.hero-shade,
.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.86) 26%, rgba(2, 6, 23, 0.34) 62%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%);
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: #fff;
  line-height: 1.08;
  font-size: clamp(34px, 6vw, 64px);
  letter-spacing: -0.06em;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.hero-intro {
  max-width: 640px;
  color: #e2e8f0;
  font-size: clamp(16px, 2.1vw, 20px);
  margin: 18px 0;
}

.hero-tags,
.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-meta span,
.tag-list a {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  background: rgba(2, 6, 23, 0.52);
  border-radius: 50%;
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.78);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 32px;
  border-radius: 999px;
  background: var(--brand);
}

.content-section,
.category-band,
.rank-section,
.subpage,
.player-section,
.prose-section {
  padding-top: 56px;
}

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

.section-head.compact {
  margin-bottom: 18px;
}

.section-head h2,
.category-overview h2,
.mini-rank h2,
.player-section h2,
.prose-section h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.category-overview p {
  color: var(--muted);
  margin: 6px 0 0;
}

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

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

.category-tile {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.94) 55%, rgba(30, 41, 59, 0.86));
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.52);
}

.category-tile span {
  font-size: 21px;
  color: #fff;
  font-weight: 900;
}

.category-tile small {
  color: #cbd5e1;
}

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

.small-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.movie-card {
  min-width: 0;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.poster-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #1e293b;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 55%);
  opacity: 0.86;
}

.poster-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.poster-year,
.poster-region {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.64);
  font-size: 12px;
  font-weight: 700;
}

.poster-year {
  right: 9px;
  top: 9px;
}

.poster-region {
  left: 9px;
  bottom: 9px;
}

.card-body {
  padding: 14px;
}

.card-body h2 {
  color: #fff;
  font-size: 16px;
  line-height: 1.32;
  margin: 0 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body h2 {
  color: var(--brand);
}

.card-body p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--weak);
  font-size: 12px;
}

.card-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(51, 65, 85, 0.72);
  border-radius: 7px;
  padding: 3px 7px;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 64px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.86);
}

.rank-num {
  color: var(--brand);
  font-weight: 900;
  font-size: 18px;
}

.rank-row img {
  width: 64px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rank-main strong {
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-main em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero {
  padding-top: 56px;
  padding-bottom: 8px;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  max-width: 900px;
}

.page-hero p {
  max-width: 760px;
  font-size: 17px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #cbd5e1;
}

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

.filter-panel {
  padding-top: 30px;
  padding-bottom: 24px;
}

.page-filter {
  width: 100%;
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(15, 23, 42, 0.92);
  border-radius: 16px;
  padding: 16px 18px;
  outline: 0;
}

.empty-state {
  display: none;
  text-align: center;
  color: var(--muted);
  padding: 48px 0;
}

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

.category-overview-list {
  display: grid;
  gap: 36px;
}

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

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  padding-top: 36px;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 64px 86px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ranking-card:hover {
  border-color: rgba(245, 158, 11, 0.46);
  transform: translateX(4px);
}

.ranking-index {
  color: var(--brand);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.ranking-card img {
  width: 86px;
  height: 112px;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-card span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ranking-card strong {
  color: #fff;
  font-size: 18px;
}

.ranking-card em,
.ranking-card small {
  color: var(--muted);
  font-style: normal;
}

.ranking-card em {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ranking-side {
  display: grid;
  gap: 18px;
  align-self: start;
  position: sticky;
  top: 100px;
}

.mini-rank {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
  padding: 18px;
}

.mini-rank h2 {
  font-size: 21px;
  margin-bottom: 12px;
}

.mini-rank div {
  display: grid;
  gap: 10px;
}

.mini-rank a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding-bottom: 8px;
}

.mini-rank a:hover strong {
  color: var(--brand);
}

.mini-rank span {
  color: var(--weak);
  white-space: nowrap;
}

.detail-page {
  background: var(--bg);
}

.detail-hero {
  position: relative;
  min-height: 580px;
  overflow: hidden;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) saturate(1.05);
  transform: scale(1.05);
  opacity: 0.58;
}

.detail-head {
  position: relative;
  z-index: 2;
  padding-top: 54px;
  padding-bottom: 54px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: end;
}

.detail-poster {
  width: 280px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-copy h1 {
  font-size: clamp(36px, 6vw, 62px);
}

.detail-one {
  color: #e2e8f0;
  font-size: 18px;
  max-width: 760px;
}

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

.detail-meta strong {
  color: #fff;
}

.tag-list {
  margin-bottom: 26px;
}

.tag-list a:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.22);
}

.movie-player {
  position: relative;
  background: #000;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.2));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
  font-size: 42px;
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.3);
  transform: translateX(4px);
}

.prose-section {
  max-width: 960px;
}

.prose-section h2 {
  font-size: 28px;
  margin: 0 0 12px;
}

.prose-section p {
  color: #cbd5e1;
  margin: 0 0 26px;
  font-size: 17px;
}

.site-footer {
  margin-top: 72px;
  background: #0f172a;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 48px 0;
}

.footer-grid h2 {
  color: #fff;
  font-size: 18px;
  margin: 0 0 14px;
}

.footer-grid p,
.footer-grid a {
  color: var(--muted);
  font-size: 14px;
}

.footer-grid a:hover {
  color: var(--brand);
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--weak);
  font-size: 13px;
  text-align: center;
  padding: 18px;
}

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

  .mobile-toggle {
    display: block;
  }

  .category-grid,
  .rank-list,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ranking-layout {
    grid-template-columns: 1fr;
  }

  .ranking-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .site-nav {
    height: 66px;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text small {
    display: none;
  }

  .hero-content {
    bottom: 58px;
  }

  .hero-arrow {
    display: none;
  }

  .section-head,
  .detail-grid {
    grid-template-columns: 1fr;
    display: grid;
    align-items: start;
  }

  .category-grid,
  .rank-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .card-body {
    padding: 12px;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-grid {
    gap: 22px;
  }

  .detail-poster {
    width: 190px;
  }

  .ranking-card {
    grid-template-columns: 42px 72px 1fr;
    gap: 12px;
  }

  .ranking-card img {
    width: 72px;
    height: 96px;
  }

  .play-circle {
    width: 72px;
    height: 72px;
    font-size: 34px;
  }
}
