:root {
  color-scheme: dark;
  --bg-950: #020617;
  --bg-900: #0f172a;
  --bg-850: #111827;
  --bg-800: #1e293b;
  --bg-700: #334155;
  --amber: #f59e0b;
  --amber-soft: #fbbf24;
  --emerald: #34d399;
  --rose: #fb7185;
  --cyan: #22d3ee;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --line: rgba(245, 158, 11, 0.18);
  --card: rgba(30, 41, 59, 0.86);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(20, 184, 166, 0.1), transparent 30rem),
    linear-gradient(180deg, var(--bg-900), var(--bg-950));
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  min-height: 72px;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--amber-soft);
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #0f172a;
  background: linear-gradient(135deg, var(--amber), var(--amber-soft));
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.nav-link {
  padding: 9px 12px;
  color: #cbd5e1;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-soft);
  background: rgba(245, 158, 11, 0.1);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.inline-filter input,
.inline-filter select,
.search-panel input,
.search-panel select {
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  outline: none;
}

.header-search input {
  width: 230px;
  padding: 10px 14px;
}

.header-search button,
.mobile-search button {
  padding: 10px 14px;
  color: #0f172a;
  font-weight: 700;
  background: var(--amber);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

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

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

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.mobile-search {
  margin-top: 8px;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
}

.hero-section {
  position: relative;
  height: 640px;
  overflow: hidden;
  background: var(--bg-950);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.76), rgba(2, 6, 23, 0.88)),
    linear-gradient(0deg, var(--bg-950), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  height: 100%;
  gap: 56px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--amber-soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.emerald {
  color: var(--emerald);
}

.eyebrow.rose {
  color: var(--rose);
}

.eyebrow.cyan {
  color: var(--cyan);
}

.hero-copy h1 {
  margin: 18px 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  color: var(--amber-soft);
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.75;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

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

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #0f172a;
  background: linear-gradient(135deg, var(--amber), var(--amber-soft));
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.26);
}

.ghost-btn {
  color: var(--text);
  border: 1px solid rgba(245, 158, 11, 0.38);
  background: rgba(30, 41, 59, 0.55);
}

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

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-poster img {
  height: 500px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 9px 14px;
  color: #0f172a;
  font-weight: 800;
  background: var(--amber-soft);
  border-radius: 999px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(226, 232, 240, 0.45);
  cursor: pointer;
}

.hero-dot.active {
  width: 34px;
  border-radius: 999px;
  background: var(--amber-soft);
}

.section-block {
  padding: 54px 0;
}

.quick-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: -42px;
  position: relative;
  z-index: 6;
  padding: 0;
}

.quick-card {
  padding: 22px;
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.quick-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--amber-soft);
  font-size: 18px;
}

.quick-card span {
  color: var(--muted);
  font-size: 14px;
}

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

.section-heading h2,
.page-hero h1,
.detail-content h1 {
  margin: 8px 0 0;
  color: var(--amber-soft);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-heading a {
  color: var(--amber-soft);
  font-weight: 700;
}

.compact-heading {
  margin-bottom: 18px;
}

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

.listing-grid {
  align-items: stretch;
}

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

.movie-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  height: 280px;
  overflow: hidden;
  background: var(--bg-800);
}

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

.movie-card:hover .movie-poster img,
.category-tile:hover img,
.horizontal-card:hover img {
  transform: scale(1.08);
}

.poster-gradient,
.tile-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 60%);
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  background: var(--amber-soft);
  border-radius: 999px;
}

.rank-badge {
  right: auto;
  left: 12px;
  background: var(--rose);
}

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

.movie-card h2,
.horizontal-card h2,
.category-overview-card h2 {
  margin: 0 0 10px;
  color: var(--amber-soft);
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p,
.horizontal-card p,
.category-overview-card p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 16px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.movie-meta span {
  padding: 5px 9px;
  background: rgba(15, 23, 42, 0.56);
  border-radius: 999px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-chip {
  padding: 6px 10px;
  color: #cbd5e1;
  font-size: 12px;
  background: rgba(51, 65, 85, 0.78);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.tag-chip:hover {
  color: #0f172a;
  background: var(--amber-soft);
}

.movie-card-compact .movie-poster {
  height: 210px;
}

.movie-card-compact .movie-card-body {
  padding: 14px;
}

.movie-card-compact h2 {
  font-size: 15px;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
  gap: 32px;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.92), rgba(51, 65, 85, 0.72));
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.horizontal-card:hover {
  transform: translateX(4px);
  border-color: rgba(52, 211, 153, 0.35);
}

.horizontal-cover {
  height: 118px;
  overflow: hidden;
  border-radius: 16px;
}

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

.ranking-panel,
.side-card,
.player-card,
.detail-content,
.category-overview-card,
.search-panel,
.page-hero {
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.ranking-panel {
  align-self: start;
  padding: 24px;
  position: sticky;
  top: 96px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 6px 12px;
  align-items: center;
  padding: 12px;
  background: rgba(15, 23, 42, 0.48);
  border-radius: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(245, 158, 11, 0.1);
  transform: translateX(4px);
}

.rank-num {
  grid-row: span 2;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #0f172a;
  font-weight: 900;
  background: var(--amber-soft);
  border-radius: 10px;
}

.rank-title {
  overflow: hidden;
  color: var(--text);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info {
  color: var(--muted);
  font-size: 13px;
}

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.category-tile img {
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-tile strong,
.category-tile em {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.category-tile strong {
  bottom: 70px;
  color: var(--amber-soft);
  font-size: 22px;
}

.category-tile em {
  bottom: 18px;
  color: #cbd5e1;
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
}

.page-main {
  padding: 34px 0 80px;
}

.page-hero {
  padding: clamp(30px, 6vw, 58px);
  margin-bottom: 34px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.12), transparent),
    rgba(30, 41, 59, 0.78);
}

.page-hero p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.8;
}

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

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

.inline-filter,
.search-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px;
  gap: 12px;
  margin-top: 24px;
}

.search-panel {
  grid-template-columns: minmax(240px, 1fr) repeat(3, 170px);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.inline-filter input,
.inline-filter select,
.search-panel input,
.search-panel select {
  width: 100%;
  padding: 13px 14px;
}

.empty-state {
  display: none;
  padding: 26px;
  color: var(--muted);
  text-align: center;
  background: rgba(30, 41, 59, 0.72);
  border-radius: 18px;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

.overview-cover {
  position: relative;
  height: 230px;
  overflow: hidden;
  border-radius: 18px;
}

.overview-cover img {
  height: 100%;
  object-fit: cover;
}

.overview-cover span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent);
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.overview-links a {
  padding: 6px 9px;
  color: #cbd5e1;
  font-size: 12px;
  background: rgba(51, 65, 85, 0.75);
  border-radius: 999px;
}

.text-link {
  min-height: auto;
  padding: 0;
  color: var(--amber-soft);
}

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

.detail-main {
  min-width: 0;
}

.player-card {
  padding: 14px;
  margin-bottom: 24px;
  background: rgba(2, 6, 23, 0.76);
}

.video-shell {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 18px;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--text);
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.22));
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  padding-left: 6px;
  color: #0f172a;
  font-size: 34px;
  background: linear-gradient(135deg, var(--amber), var(--amber-soft));
  border-radius: 50%;
  box-shadow: 0 20px 44px rgba(245, 158, 11, 0.3);
}

.play-layer strong {
  color: var(--amber-soft);
  font-size: 18px;
}

.detail-content {
  padding: clamp(22px, 4vw, 36px);
}

.detail-content h1 {
  margin-top: 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.detail-meta span {
  padding: 7px 12px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.68);
  border-radius: 999px;
}

.detail-content section {
  margin-top: 28px;
}

.detail-content h2,
.side-card h2 {
  margin: 0 0 12px;
  color: var(--amber-soft);
  font-size: 22px;
}

.detail-content p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.9;
}

.review-box {
  padding: 22px;
  background: rgba(51, 65, 85, 0.48);
  border-radius: 18px;
}

.review-box p {
  font-style: italic;
}

.detail-tags {
  margin-top: 28px;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 18px;
  position: sticky;
  top: 96px;
}

.side-card {
  padding: 18px;
}

.poster-side img {
  max-height: 430px;
  object-fit: cover;
  border-radius: 18px;
}

.info-side dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  color: #cbd5e1;
}

.info-side dt {
  color: #64748b;
}

.info-side a {
  color: var(--amber-soft);
}

.full-rank-section {
  padding-bottom: 0;
}

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

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

.footer-logo {
  margin-bottom: 12px;
  color: var(--amber-soft);
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--amber-soft);
  font-size: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

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

  .hero-content,
  .detail-layout,
  .two-column-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .detail-side,
  .ranking-panel {
    position: static;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .hero-section {
    height: 580px;
  }

  .quick-panel,
  .movie-grid,
  .small-grid,
  .category-grid,
  .category-overview-grid,
  .footer-grid,
  .long-rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .site-logo {
    font-size: 18px;
  }

  .hero-section {
    height: 560px;
  }

  .hero-content {
    gap: 0;
  }

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

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

  .quick-panel,
  .movie-grid,
  .small-grid,
  .category-grid,
  .category-overview-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-card {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .horizontal-cover {
    height: 110px;
  }

  .movie-poster {
    height: 260px;
  }

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

  .rank-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }
}
