:root {
  --amber-50: #fff7ed;
  --amber-100: #ffedd5;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --orange-600: #ea580c;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 12px 35px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 42%, #fffbeb 100%);
}

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

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

.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.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
}

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

.nav-link,
.dropdown-panel a,
.mobile-links a {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-panel a:hover,
.mobile-links a:hover {
  color: var(--amber-600);
}

.nav-dropdown {
  position: relative;
}

.dropdown-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.dropdown-panel {
  position: absolute;
  left: 0;
  top: 100%;
  width: 180px;
  padding: 10px;
  margin-top: 12px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.2s ease;
}

.dropdown-panel a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-search,
.mobile-search,
.search-panel,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.search-panel input,
.filter-bar input,
.filter-bar select {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  min-width: 0;
  background: #ffffff;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.header-search button,
.mobile-search button,
.search-panel button,
.small-button,
.primary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.search-panel button,
.primary-button,
.small-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.28);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.small-button:hover,
.header-search button:hover,
.mobile-search button:hover,
.search-panel button:hover {
  transform: translateY(-2px);
}

.mobile-menu-button {
  display: none;
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 16px 20px;
  background: #ffffff;
}

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

.mobile-links {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.hero {
  position: relative;
  height: 580px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-slide img,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.55) 48%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.detail-copy p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  line-height: 1.75;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 8px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  font-weight: 760;
}

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.active {
  width: 36px;
  background: #ffffff;
}

.page-stack {
  display: grid;
  gap: 70px;
  padding: 56px 0;
}

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

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
}

.section-icon {
  font-size: 32px;
}

.section-more {
  color: var(--amber-600);
  font-weight: 760;
}

.card-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card,
.rank-row,
.content-card,
.sidebar-card,
.search-panel,
.filter-bar,
.category-overview-card,
.soft-panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

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

.movie-card:hover .poster-link img,
.side-item:hover img,
.rank-row:hover img {
  transform: scale(1.08);
}

.badge,
.duration {
  position: absolute;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 750;
}

.badge {
  left: 10px;
  top: 10px;
  background: var(--amber-500);
}

.duration {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.68);
}

.card-info {
  padding: 16px;
}

.card-title,
.rank-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover,
.rank-title:hover {
  color: var(--amber-600);
}

.card-info p,
.rank-row p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 220px 1fr;
}

.movie-card-horizontal .poster-link {
  aspect-ratio: auto;
  min-height: 180px;
}

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

.soft-panel {
  padding: 34px;
}

.amber-panel {
  background: linear-gradient(135deg, #fff7ed, #fffbeb, #fef3c7);
}

.blue-panel {
  background: linear-gradient(135deg, #f0fdfa, #ecfeff, #eff6ff);
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
}

.category-tile span {
  display: block;
  font-size: 42px;
  margin-bottom: 12px;
}

.category-tile strong,
.category-overview-card h2 {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
}

.category-tile small,
.category-overview-card strong {
  color: var(--amber-600);
}

.category-overview-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 16px;
}

.category-large-icon {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 34px;
}

.page-hero {
  position: relative;
  padding: 88px 0;
  background: linear-gradient(135deg, #111827 0%, #7c2d12 55%, #f59e0b 100%);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  filter: blur(4px);
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.filter-bar,
.search-panel {
  padding: 18px;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 116px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
}

.rank-poster {
  display: block;
  aspect-ratio: 16 / 11;
  border-radius: 12px;
  overflow: hidden;
  background: #111827;
}

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

.rank-number {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  font-weight: 900;
  margin-bottom: -58px;
  margin-left: -10px;
  position: relative;
  z-index: 3;
}

.compact-rank .rank-row {
  grid-template-columns: 90px 1fr auto;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #111827;
}

.detail-bg {
  position: absolute;
  inset: 0;
  filter: blur(2px) scale(1.03);
}

.detail-bg-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.18));
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 32px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

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

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

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

.detail-copy h1 {
  margin-bottom: 20px;
}

.detail-meta {
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 28px;
}

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

.detail-content {
  display: grid;
  gap: 24px;
}

.content-card,
.player-card,
.sidebar-card {
  padding: 24px;
}

.content-card h2,
.sidebar-card h2 {
  margin: 0 0 14px;
}

.content-card p {
  color: #374151;
  line-height: 1.85;
}

.player-card {
  border-radius: 24px;
  background: #111827;
  box-shadow: var(--shadow);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.38);
  cursor: pointer;
}

.play-overlay span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.35);
  font-size: 30px;
}

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

.player-status {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud a,
.tag-cloud span {
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--amber-100);
  color: #92400e;
  font-weight: 650;
}

.detail-sidebar {
  position: relative;
}

.sidebar-card {
  position: sticky;
  top: 96px;
}

.side-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  margin-top: 14px;
  align-items: center;
}

.side-item img {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: #111827;
}

.side-item span {
  display: block;
  font-weight: 760;
}

.side-item small {
  color: var(--muted);
}

.search-summary {
  color: var(--muted);
  font-weight: 650;
}

.site-footer {
  color: #ffffff;
  background: linear-gradient(180deg, #1f2937, #111827);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.3fr;
  gap: 28px;
}

.footer-grid h2,
.footer-grid h3 {
  color: #fbbf24;
}

.footer-grid a {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  margin: 8px 0;
}

.footer-grid p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.75;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 34px;
  color: rgba(255, 255, 255, 0.58);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

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

  .mobile-menu-button {
    display: block;
  }

  .card-grid-four,
  .card-grid-three,
  .category-grid,
  .category-overview-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-main-grid,
  .detail-layout,
  .editor-layout,
  .horizontal-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(320px, 100%);
  }
}

@media (max-width: 640px) {
  .header-inner {
    min-height: 62px;
  }

  .logo {
    font-size: 20px;
  }

  .hero {
    height: 540px;
  }

  .hero-content p,
  .page-hero p,
  .detail-copy p {
    font-size: 16px;
  }

  .hero-actions,
  .section-heading,
  .filter-bar,
  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .card-grid-four,
  .card-grid-three,
  .card-grid-two,
  .category-grid,
  .category-overview-grid,
  .footer-grid,
  .rank-row,
  .movie-card-horizontal {
    grid-template-columns: 1fr;
  }

  .rank-row {
    align-items: stretch;
  }

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

  .detail-hero-inner {
    padding-bottom: 48px;
  }

  .content-card,
  .player-card,
  .sidebar-card,
  .soft-panel {
    padding: 18px;
  }
}
