:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(41, 37, 36, 0.12);
  --shadow-soft: 0 8px 22px rgba(41, 37, 36, 0.10);
  --radius-xl: 24px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--stone-800);
  background: linear-gradient(180deg, var(--amber-50), var(--stone-50) 28%, #ffffff 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(231, 229, 228, 0.85);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.nav-shell,
.hero-inner,
.section-shell,
.footer-shell,
.page-hero-inner,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber-500), var(--stone-700));
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.28);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 18px;
  letter-spacing: 0.01em;
}

.brand-text small {
  margin-top: 4px;
  color: var(--stone-500);
  font-size: 12px;
}

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

.main-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--stone-600);
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--amber-600);
  background: var(--amber-50);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--amber-50);
  cursor: pointer;
}

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

.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: var(--stone-900);
}

.hero-media,
.hero-media img,
.hero-media::after {
  position: absolute;
  inset: 0;
}

.hero-media {
  background: radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.48), transparent 34%), linear-gradient(135deg, #1c1917, #44403c);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
}

.hero-media::after {
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.48) 54%, rgba(0, 0, 0, 0.18)), linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.16));
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  padding: 72px 0 58px;
}

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

.eyebrow,
.hero-tags span,
.detail-tags span,
.card-region,
.category-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.hero-tags span:first-child,
.category-badge {
  padding: 8px 12px;
  color: #fff;
  background: var(--amber-500);
}

.hero-tags span:not(:first-child) {
  padding: 8px 12px;
  color: #fff;
  background: rgba(41, 37, 36, 0.78);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: var(--amber-500);
  box-shadow: 0 14px 28px rgba(217, 119, 6, 0.28);
}

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

.btn-primary:hover {
  background: var(--amber-600);
  box-shadow: 0 18px 34px rgba(217, 119, 6, 0.36);
}

.btn-secondary {
  color: #fff;
  background: rgba(68, 64, 60, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.section-shell {
  padding: 56px 0;
}

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

.section-title h2,
.section-title h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  color: var(--stone-800);
}

.section-title p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--stone-600);
  line-height: 1.75;
}

.section-title h2::before,
.section-title h1::before {
  content: "";
  width: 8px;
  height: 32px;
  display: inline-block;
  margin-right: 12px;
  border-radius: 999px;
  vertical-align: -6px;
  background: var(--amber-500);
}

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

.movie-card {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: radial-gradient(circle at 25% 18%, rgba(245, 158, 11, 0.35), transparent 32%), linear-gradient(135deg, var(--stone-700), var(--stone-900));
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

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

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

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

.card-region {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 8px;
  color: #fff;
  font-weight: 700;
  background: var(--amber-500);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.card-hover {
  position: absolute;
  inset: auto 0 0;
  padding: 38px 12px 12px;
  color: #fff;
  font-size: 12px;
  line-height: 1.55;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-hover {
  opacity: 1;
  transform: translateY(0);
}

.movie-card strong {
  overflow: hidden;
  color: var(--stone-800);
  font-size: 15px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.movie-card:hover strong {
  color: var(--amber-600);
}

.movie-card em {
  overflow: hidden;
  color: var(--stone-500);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--stone-500);
  font-size: 12px;
}

.card-meta b,
.card-meta i {
  font-style: normal;
  font-weight: 500;
}

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--stone-800);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-image,
.category-image img,
.category-image::after {
  position: absolute;
  inset: 0;
}

.category-image {
  background: linear-gradient(135deg, var(--stone-700), var(--amber-600));
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
}

.category-image::after {
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.16));
}

.category-content {
  position: relative;
  z-index: 2;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  color: #fff;
}

.category-content strong {
  margin-bottom: 8px;
  font-size: 22px;
}

.category-content em {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.filter-panel {
  margin-bottom: 28px;
  padding: 24px;
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.filter-head {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.filter-head h2 {
  margin: 0;
  font-size: 22px;
}

.search-box {
  display: grid;
  gap: 6px;
}

.search-box span,
.filter-row strong {
  color: var(--stone-600);
  font-size: 13px;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--stone-200);
  border-radius: 12px;
  color: var(--stone-800);
  outline: none;
  background: #fff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.filter-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 12px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-buttons button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  color: var(--stone-700);
  background: #fff;
  cursor: pointer;
  transition: color 0.2s ease, border 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.filter-buttons button:hover,
.filter-buttons button.is-active {
  color: #fff;
  border-color: var(--amber-500);
  background: var(--amber-500);
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.18);
}

.page-hero {
  color: #fff;
  background: linear-gradient(135deg, var(--amber-600), var(--stone-800));
}

.page-hero-inner {
  padding: 72px 0;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--amber-100);
  font-size: 18px;
  line-height: 1.75;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 64px 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--stone-200);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border 0.2s ease;
}

.ranking-row:hover {
  transform: translateY(-2px);
  border-color: var(--amber-400);
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  background: var(--stone-800);
}

.ranking-row:nth-child(-n+3) .rank-no {
  background: linear-gradient(135deg, var(--amber-500), var(--stone-700));
}

.rank-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--stone-700), var(--amber-600));
}

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

.rank-info strong {
  display: block;
  margin-bottom: 4px;
  font-size: 17px;
}

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

.rank-action {
  padding: 10px 14px;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  background: var(--amber-500);
}

.detail-shell {
  padding: 32px 0 64px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  color: var(--stone-500);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--amber-600);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.content-card,
.side-card {
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.player-card {
  overflow: hidden;
  background: #000;
}

.video-wrap {
  position: relative;
  background: #000;
}

.video-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.48));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 800;
  background: var(--amber-500);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.video-wrap.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-state {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.content-card {
  margin-top: 22px;
  padding: 28px;
}

.content-card h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

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

.detail-meta span,
.detail-tags span {
  padding: 7px 10px;
  color: var(--stone-700);
  background: var(--stone-100);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
}

.content-card h2,
.side-card h2 {
  margin: 26px 0 12px;
  color: var(--stone-800);
  font-size: 22px;
}

.content-card h2:first-child,
.side-card h2:first-child {
  margin-top: 0;
}

.content-card p {
  margin: 0 0 14px;
  color: var(--stone-600);
  line-height: 1.9;
}

.side-card {
  padding: 18px;
}

.detail-poster {
  overflow: hidden;
  margin-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--stone-700), var(--amber-600));
}

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

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

.side-list .movie-card {
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 12px;
}

.side-list .poster-frame {
  border-radius: 10px;
}

.side-list .movie-card em,
.side-list .card-meta,
.side-list .card-hover,
.side-list .card-region {
  display: none;
}

.site-footer {
  color: var(--stone-200);
  background: linear-gradient(135deg, var(--stone-900), var(--stone-800), #78350f);
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.8fr;
  gap: 38px;
  padding: 44px 0;
}

.brand-footer .brand-text strong {
  color: #fff;
}

.footer-brand p {
  max-width: 420px;
  color: var(--stone-200);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-links h2 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 18px;
}

.footer-links a {
  color: var(--stone-200);
  font-size: 14px;
}

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

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(231, 229, 228, 0.14);
  color: var(--stone-200);
  text-align: center;
  font-size: 13px;
}

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

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

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

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--stone-200);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

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

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

  .filter-head,
  .detail-grid,
  .footer-shell {
    grid-template-columns: 1fr;
  }

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

  .rank-action {
    grid-column: 3;
    width: max-content;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .hero-inner,
  .section-shell,
  .footer-shell,
  .page-hero-inner,
  .detail-shell {
    width: min(100% - 24px, 1180px);
  }

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

  .brand-text small {
    display: none;
  }

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

  .section-shell {
    padding: 38px 0;
  }

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

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

  .filter-panel,
  .content-card {
    padding: 18px;
  }

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

  .ranking-row {
    grid-template-columns: 38px 52px 1fr;
    gap: 10px;
  }

  .rank-action {
    grid-column: 1 / -1;
  }
}
