:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --orange: #f97316;
  --amber: #f59e0b;
  --dark: #111827;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

img,
video {
  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;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--orange), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #fff;
  font-size: 14px;
  box-shadow: 0 12px 22px rgba(249, 115, 22, 0.28);
}

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

.nav-link {
  color: #4b5563;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--orange);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.header-search input,
.mobile-search input {
  width: 190px;
  border: 0;
  outline: 0;
  padding: 8px 12px;
  background: transparent;
}

.header-search button,
.mobile-search button,
.search-panel button,
.filter-bar button {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--soft);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--dark);
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-panel.open {
  display: block;
}

.mobile-link {
  display: block;
  padding: 12px 0;
  font-weight: 800;
  border-bottom: 1px solid var(--line);
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.mobile-search input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: 540px;
  margin: 28px auto 56px;
  overflow: hidden;
  border-radius: 30px;
  background: radial-gradient(circle at 30% 30%, rgba(249, 115, 22, 0.35), transparent 36%), #111827;
  box-shadow: var(--shadow);
}

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.88) 0%, rgba(17, 24, 39, 0.58) 44%, rgba(17, 24, 39, 0.18) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.45), transparent 50%);
}

.hero-content {
  position: absolute;
  left: clamp(28px, 7vw, 80px);
  bottom: clamp(34px, 8vw, 76px);
  max-width: 680px;
  color: #fff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(249, 115, 22, 0.13);
  color: var(--orange);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.hero-kicker {
  background: var(--orange);
  color: #fff;
}

.hero-content h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 70px);
  line-height: 1.05;
  font-weight: 950;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.mini-tags span {
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 13px;
  font-weight: 800;
}

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

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

.primary-btn {
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #fff;
  box-shadow: 0 16px 26px rgba(249, 115, 22, 0.26);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.ghost-btn.dark {
  color: var(--text);
  border-color: var(--line);
  background: #fff;
}

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

.hero-controls {
  position: absolute;
  right: 26px;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 3;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dots button.active {
  width: 24px;
  background: #fff;
}

.section-block {
  margin: 0 auto 64px;
}

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

.section-head h2,
.page-hero h1,
.detail-intro h1 {
  margin: 12px 0 0;
  color: var(--dark);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 950;
}

.section-head p,
.page-hero p,
.detail-intro p {
  color: var(--muted);
}

.text-link {
  color: var(--orange);
  font-weight: 900;
}

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #374151);
}

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

.card-link:hover .poster-wrap img {
  transform: scale(1.07);
}

.year-badge,
.rank-mark {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.year-badge {
  right: 12px;
  background: rgba(17, 24, 39, 0.72);
}

.rank-mark {
  left: 12px;
  background: var(--orange);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
}

.card-body h2 {
  display: -webkit-box;
  min-height: 52px;
  margin: 8px 0;
  overflow: hidden;
  color: var(--dark);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 950;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.mini-tags span {
  background: var(--soft);
  color: #64748b;
}

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

.category-tile,
.category-main-link,
.category-panel {
  display: block;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.category-tile,
.category-main-link {
  padding: 24px;
  min-height: 190px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-main-link:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-tile span,
.category-main-link span {
  color: var(--orange);
  font-weight: 900;
}

.category-tile h2,
.category-main-link h2 {
  margin: 12px 0 10px;
  font-size: 24px;
  font-weight: 950;
}

.category-tile p,
.category-main-link p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.category-samples {
  display: grid;
  gap: 8px;
  padding: 0 24px 24px;
  color: #475569;
  font-size: 14px;
}

.tone-orange,
.tone-red,
.tone-amber,
.tone-purple,
.tone-pink,
.tone-indigo,
.tone-slate,
.tone-cyan,
.tone-emerald,
.tone-blue {
  position: relative;
  overflow: hidden;
}

.tone-orange::before,
.tone-red::before,
.tone-amber::before,
.tone-purple::before,
.tone-pink::before,
.tone-indigo::before,
.tone-slate::before,
.tone-cyan::before,
.tone-emerald::before,
.tone-blue::before {
  content: "";
  position: absolute;
  inset: auto -30px -40px auto;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  opacity: 0.18;
  background: var(--orange);
}

.tone-red::before { background: #ef4444; }
.tone-amber::before { background: #f59e0b; }
.tone-purple::before { background: #8b5cf6; }
.tone-pink::before { background: #ec4899; }
.tone-indigo::before { background: #6366f1; }
.tone-slate::before { background: #334155; }
.tone-cyan::before { background: #06b6d4; }
.tone-emerald::before { background: #10b981; }
.tone-blue::before { background: #3b82f6; }

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

.compact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  border-radius: 18px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.compact-card img {
  width: 64px;
  height: 86px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.compact-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.compact-info strong,
.compact-info em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-info strong {
  color: var(--dark);
  font-size: 16px;
  font-style: normal;
  font-weight: 950;
}

.compact-info em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.small-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.page-main {
  padding-bottom: 28px;
}

.page-hero {
  margin-bottom: 42px;
  padding: 72px 0;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(245, 158, 11, 0.08)), #fff;
  border-bottom: 1px solid var(--line);
}

.rank-hero {
  background: linear-gradient(135deg, #111827, #374151);
  color: #fff;
}

.rank-hero h1,
.rank-hero p {
  color: #fff;
}

.search-hero {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.category-hero {
  background: linear-gradient(135deg, #fff, #fff7ed);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}

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

.filter-bar,
.search-panel {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.filter-bar input,
.filter-bar select,
.search-panel input,
.search-panel select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  outline: 0;
  background: #fff;
}

.filter-bar input,
.search-panel input {
  flex: 1;
}

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

.ranking-row a {
  display: grid;
  grid-template-columns: 56px 76px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.ranking-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #fff;
  font-size: 18px;
  font-weight: 950;
}

.ranking-row img {
  width: 76px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  background: #111827;
}

.ranking-info {
  display: grid;
  gap: 4px;
}

.ranking-info strong {
  color: var(--dark);
  font-size: 20px;
  font-weight: 950;
}

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

.ranking-info b,
.ranking-action {
  color: var(--orange);
  font-weight: 900;
}

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

.detail-hero {
  padding: 46px 0;
  background: radial-gradient(circle at 72% 20%, rgba(249, 115, 22, 0.18), transparent 30%), linear-gradient(135deg, #fff, #fff7ed);
  border-bottom: 1px solid var(--line);
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: #111827;
}

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

.detail-intro h1 {
  max-width: 850px;
  font-size: clamp(36px, 5vw, 62px);
}

.detail-intro p {
  max-width: 780px;
  margin: 18px 0 20px;
  font-size: 18px;
}

.detail-tags span {
  background: #fff;
  color: #475569;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.player-section {
  margin-top: 40px;
}

.player-card {
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.player-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  color: #fff;
}

.player-heading h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 950;
}

.player-heading span {
  color: rgba(255, 255, 255, 0.72);
}

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

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

.play-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.62));
  color: #fff;
  cursor: pointer;
}

.static-player.is-playing .play-mask {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 20px 34px rgba(249, 115, 22, 0.34);
  font-size: 28px;
}

.play-mask strong {
  font-size: 18px;
}

.detail-content {
  margin-top: 34px;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
}

.detail-text-card {
  padding: 26px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

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

.detail-text-card p {
  margin: 0;
  color: #475569;
}

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

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

.facts-card dt {
  color: var(--muted);
  font-weight: 800;
}

.facts-card dd {
  margin: 0;
  color: var(--dark);
  font-weight: 900;
}

.search-summary {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 800;
}

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

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

.site-footer p {
  max-width: 520px;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 950;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #475569;
  font-weight: 800;
}

.copyright {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

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

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

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

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

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

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

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

  .brand {
    font-size: 20px;
  }

  .hero-carousel {
    width: min(100% - 24px, 1180px);
    height: 560px;
    margin-top: 18px;
    border-radius: 22px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.32));
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 74px;
  }

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

  .hero-controls {
    left: 22px;
    right: 22px;
    justify-content: space-between;
  }

  .section-head,
  .copyright,
  .player-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-panel-grid,
  .rank-grid,
  .footer-grid,
  .detail-text-grid {
    grid-template-columns: 1fr;
  }

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

  .filter-bar,
  .search-panel {
    flex-direction: column;
  }

  .ranking-row a {
    grid-template-columns: 42px 66px 1fr;
  }

  .ranking-action {
    display: none;
  }

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

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

@media (max-width: 480px) {
  .category-movie-grid {
    grid-template-columns: 1fr;
  }

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