:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --amber: #f59e0b;
  --orange: #ea580c;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--slate-50), #f3f4f6 45%, var(--slate-100));
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s ease;
}

.brand:hover {
  transform: scale(1.03);
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 10px 26px rgba(234, 88, 12, 0.32);
}

.brand-text strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: #94a3b8;
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  color: #cbd5e1;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.22);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.15);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

.hero {
  position: relative;
  height: min(72vh, 640px);
  min-height: 430px;
  overflow: hidden;
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-bg,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.55) 44%, rgba(2, 6, 23, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 56px 0;
}

.hero-copy {
  width: min(760px, 100%);
  color: #fff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-copy p {
  max-width: 760px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tags span,
.tag-cloud a {
  padding: 6px 12px;
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 16px 28px rgba(234, 88, 12, 0.28);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.5);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 20px;
  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;
}

.hero-dot.active {
  width: 28px;
  background: #fff;
}

.search-section {
  margin-top: -44px;
  position: relative;
  z-index: 5;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 180px 160px auto;
  gap: 14px;
  align-items: end;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.search-field label,
.inline-search span {
  display: block;
  margin-bottom: 6px;
  color: var(--slate-700);
  font-size: 13px;
  font-weight: 800;
}

.search-field input,
.search-field select,
.inline-search input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.search-field input:focus,
.search-field select:focus,
.inline-search input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.search-results {
  margin-top: 22px;
}

.search-results:not(:empty) {
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-results h2 {
  margin: 0 0 18px;
  color: var(--slate-900);
}

.section {
  padding: 72px 0 0;
}

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

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

.section-head h1,
.section-head h2,
.page-hero h1,
.category-panel h1,
.story-card h2,
.side-card h2 {
  margin: 0;
  color: var(--slate-900);
  line-height: 1.15;
}

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

.section-link {
  color: var(--orange);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--slate-800);
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 65%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.card-badge,
.card-score {
  position: absolute;
  z-index: 2;
  top: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  left: 10px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.card-score {
  right: 10px;
  background: rgba(2, 6, 23, 0.72);
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: var(--orange);
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--slate-100);
}

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

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

.category-tile,
.category-panel {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
  min-height: 150px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.category-tile::after,
.category-panel::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 900;
}

.category-tile strong,
.category-panel p {
  position: relative;
  z-index: 1;
  display: block;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-weight: 500;
}

.accent-amber { background: linear-gradient(135deg, #f59e0b, #9a3412); }
.accent-orange { background: linear-gradient(135deg, #fb923c, #7c2d12); }
.accent-rose { background: linear-gradient(135deg, #f43f5e, #881337); }
.accent-pink { background: linear-gradient(135deg, #ec4899, #831843); }
.accent-violet { background: linear-gradient(135deg, #8b5cf6, #3b0764); }
.accent-emerald { background: linear-gradient(135deg, #10b981, #064e3b); }
.accent-blue { background: linear-gradient(135deg, #3b82f6, #1e3a8a); }
.accent-cyan { background: linear-gradient(135deg, #06b6d4, #164e63); }
.accent-indigo { background: linear-gradient(135deg, #6366f1, #312e81); }
.accent-slate { background: linear-gradient(135deg, #475569, #020617); }

.section-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.ranking-box,
.story-card,
.side-card {
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.ranking-box {
  position: sticky;
  top: 104px;
  padding: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 82px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: var(--slate-50);
}

.rank-no {
  color: var(--orange);
  font-size: 20px;
  font-weight: 900;
}

.rank-item img {
  width: 82px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info strong {
  display: -webkit-box;
  color: var(--slate-900);
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.rank-info small {
  color: var(--muted);
}

.page-hero {
  padding: 56px 0 18px;
}

.page-hero p {
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: #f8fafc;
  font-size: 14px;
}

.page-hero .breadcrumb,
.category-panel .breadcrumb {
  color: var(--muted);
}

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

.sep {
  color: #94a3b8;
}

.category-panels {
  display: grid;
  gap: 22px;
  padding: 28px 0 40px;
}

.category-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 210px;
}

.category-panel h1 {
  color: #fff;
  font-size: 34px;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-samples a {
  position: relative;
  z-index: 1;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.list-tools {
  padding-top: 18px;
}

.inline-search {
  display: block;
  max-width: 420px;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: var(--slate-950);
}

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-shade {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.7) 48%, rgba(2, 6, 23, 0.36));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 52px 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy p {
  color: #e2e8f0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-section {
  padding-top: 56px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: var(--shadow);
}

.video-element {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 16px;
  color: #fff;
  text-align: center;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.player-overlay strong {
  padding: 0 20px;
  font-size: clamp(18px, 3vw, 34px);
}

.play-circle {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 36px rgba(234, 88, 12, 0.34);
  font-size: 36px;
}

.movie-player.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
}

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

.story-card h2,
.side-card h2 {
  margin-bottom: 12px;
  font-size: 24px;
}

.story-card p {
  margin: 0 0 24px;
  color: #334155;
  font-size: 17px;
}

.side-card {
  position: sticky;
  top: 104px;
}

.side-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.side-card dl div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

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

.side-card dd {
  margin: 0;
  color: var(--slate-900);
  font-weight: 700;
}

.pager-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.pager-links a {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 12px;
  color: #fff;
  background: var(--slate-800);
  font-weight: 800;
}

.ranking-page {
  display: grid;
  gap: 16px;
  padding-bottom: 50px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.ranking-cover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.ranking-cover img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.ranking-cover span {
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  font-weight: 900;
}

.ranking-content h2 {
  margin: 0 0 8px;
  color: var(--slate-900);
}

.ranking-content p {
  margin: 0 0 12px;
  color: var(--muted);
}

.site-footer {
  margin-top: 80px;
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 44px 0;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 14px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.footer-grid p {
  max-width: 520px;
  margin: 0;
  color: #94a3b8;
}

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

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 7px 0;
  color: #94a3b8;
}

.footer-grid a:hover {
  color: #fbbf24;
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

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

@media (max-width: 1100px) {
  .movie-grid,
  .compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .section-split,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .ranking-box,
  .side-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 520px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .section-head,
  .category-panel {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .detail-poster {
    max-width: 320px;
  }

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

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

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

  .header-inner {
    min-height: 66px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

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

  .brand-text small {
    display: none;
  }

  .hero-content {
    padding: 38px 0 58px;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-grid.small-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 36px 78px 1fr;
  }

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

  .detail-hero-inner {
    padding: 36px 0;
  }

  .story-card,
  .side-card {
    padding: 20px;
  }
}
