:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
}

* {
  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;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
}

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

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

button,
input {
  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);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 18px rgba(17, 24, 39, 0.08);
}

.nav-wrap {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-800);
  font-weight: 800;
  font-size: 22px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-800));
  color: var(--white);
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--gray-700);
  font-weight: 600;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.text-link:hover {
  color: var(--amber-700);
}

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

.nav-search input,
.search-panel input,
.mobile-panel input {
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  padding: 10px 16px;
  outline: none;
  background: var(--white);
}

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

.nav-search button,
.search-panel button,
.mobile-panel button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--amber-600);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.mobile-panel.open {
  display: grid;
  gap: 12px;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
}

.mobile-panel input {
  min-width: 0;
  flex: 1;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: var(--gray-900);
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px) saturate(1.15);
  transform: scale(1.08);
}

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 28%, rgba(245, 158, 11, 0.32), transparent 32%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.3));
}

.hero-inner {
  position: relative;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--amber-500);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.lead {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.hero-tags,
.detail-meta,
.rank-meta,
.card-meta,
.tag-row,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.hero-tags a,
.detail-meta span,
.tag-row span,
.rank-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 13px;
}

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

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

.primary-btn {
  min-height: 44px;
  padding: 0 24px;
  color: var(--white);
  background: var(--amber-600);
  box-shadow: 0 14px 24px rgba(217, 119, 6, 0.32);
}

.ghost-btn {
  min-height: 44px;
  padding: 0 22px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-3px);
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.hero-poster img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

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

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

.hero-dot.active {
  background: var(--amber-500);
}

.quick-cats {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.quick-cats-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.quick-cats a {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--amber-50);
  color: var(--amber-800);
  font-weight: 700;
}

.section {
  padding: 76px 0;
}

.warm-section {
  background: linear-gradient(180deg, var(--amber-50), var(--white));
}

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

.section-title h2,
.player-section h2,
.detail-article h2,
.detail-side h2,
.split-layout h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.text-link {
  color: var(--amber-700);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--gray-200);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(17, 24, 39, 0.72);
  font-weight: 800;
  font-size: 13px;
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 8px;
  color: var(--amber-700);
  font-size: 13px;
  font-weight: 800;
}

.card-body h2 {
  margin: 0 0 8px;
  min-height: 48px;
  font-size: 18px;
  line-height: 1.3;
}

.card-body p {
  min-height: 68px;
  margin: 0 0 14px;
  color: var(--gray-500);
  font-size: 14px;
}

.tag-row span {
  background: var(--gray-100);
  color: var(--gray-700);
}

.compact-card .card-body h2 {
  min-height: 0;
}

.compact-card .card-body p {
  min-height: 0;
}

.rank-section {
  color: var(--white);
  background:
    radial-gradient(circle at 10% 20%, rgba(245, 158, 11, 0.18), transparent 28%),
    linear-gradient(135deg, var(--gray-900), #2b1706);
}

.split-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.35fr;
  gap: 48px;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 80px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wide-rank .rank-item {
  background: var(--white);
  color: var(--gray-900);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: var(--white);
  background: var(--amber-600);
  font-weight: 900;
}

.rank-cover img {
  width: 80px;
  height: 108px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-item h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.rank-item p {
  margin: 0 0 8px;
  color: var(--gray-300);
  font-size: 14px;
}

.wide-rank .rank-item p {
  color: var(--gray-500);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--gray-900);
}

.slim-hero,
.category-hero {
  padding: 96px 0;
  background:
    radial-gradient(circle at 80% 12%, rgba(245, 158, 11, 0.28), transparent 32%),
    linear-gradient(135deg, var(--gray-900), #4a2503);
}

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

.category-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card a {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 220px;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  background: var(--gray-200);
}

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

.category-info {
  padding: 28px;
}

.category-info h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.category-info p {
  margin: 0 0 22px;
  color: var(--gray-500);
}

.category-info span {
  color: var(--amber-700);
  font-weight: 800;
}

.detail-hero {
  min-height: 560px;
}

.detail-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 42px;
  align-items: center;
  padding: 70px 0;
}

.detail-poster img {
  width: 300px;
  height: 420px;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.breadcrumb {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.detail-tags {
  margin: 18px 0 26px;
}

.player-section {
  background: var(--white);
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--white);
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.64));
  cursor: pointer;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--amber-600);
  box-shadow: 0 0 0 12px rgba(217, 119, 6, 0.18);
  font-size: 30px;
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: var(--white);
  font-weight: 700;
}

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

.detail-article,
.detail-side {
  border-radius: 24px;
  background: var(--white);
  padding: 30px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.detail-article p {
  margin: 14px 0 28px;
  color: var(--gray-700);
  font-size: 17px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  margin: 20px 0 0;
}

.detail-side dt {
  color: var(--gray-500);
}

.detail-side dd {
  margin: 0;
  font-weight: 700;
}

.search-panel {
  display: flex;
  gap: 12px;
  max-width: 680px;
}

.search-panel input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
}

.site-footer {
  color: var(--gray-300);
  background: var(--gray-900);
}

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

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.site-footer a {
  display: block;
  margin: 8px 0;
}

.footer-bottom {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: var(--gray-500);
}

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

  .menu-toggle {
    display: block;
  }

  .hero-inner,
  .split-layout,
  .detail-head,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 24px;
    padding: 70px 0 90px;
  }

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

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

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

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

  .hero-carousel,
  .hero-inner {
    min-height: 720px;
  }

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

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

  .section {
    padding: 52px 0;
  }

  .section-title {
    align-items: start;
    flex-direction: column;
  }

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

  .rank-item {
    grid-template-columns: 46px 66px 1fr;
  }

  .rank-cover img {
    width: 66px;
    height: 88px;
  }

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

  .category-covers {
    height: 180px;
  }

  .detail-poster img {
    width: 230px;
    height: 322px;
  }

  .search-panel,
  .mobile-panel form {
    flex-direction: column;
  }
}
