:root {
  --brand: #f59e0b;
  --brand-dark: #d97706;
  --ink: #1f2937;
  --muted: #6b7280;
  --soft: #f9fafb;
  --card: #ffffff;
  --line: #e5e7eb;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

body {
  background: #f9fafb;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.site-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  color: #111827;
}

.brand-mark,
.footer-logo span {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 0.95rem;
  border-radius: 0.8rem;
  font-weight: 650;
  color: #4b5563;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #92400e;
  background: #fef3c7;
}

.mobile-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.8rem;
  background: #f3f4f6;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.28rem;
}

.mobile-toggle span {
  width: 1.3rem;
  height: 2px;
  background: #111827;
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  padding: 0 1rem 1rem;
}

.mobile-menu.is-open {
  display: grid;
  gap: 0.4rem;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
  padding: 0 1rem;
  max-width: 1280px;
}

.eyebrow {
  width: max-content;
  margin-bottom: 1rem;
  padding: 0.42rem 0.75rem;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(252, 211, 77, 0.42);
  border-radius: 999px;
  font-weight: 800;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(2.3rem, 6vw, 4.8rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin-bottom: 1rem;
}

.hero-meta {
  font-size: 1.05rem;
  color: #fde68a;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-desc {
  max-width: 720px;
  color: #f3f4f6;
  font-size: 1.15rem;
  line-height: 1.9;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.primary-btn,
.ghost-btn,
.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.75rem 1.15rem;
  border-radius: 0.9rem;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.36);
}

.primary-btn:hover,
.filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.28);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

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

.hero-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
}

.hero-dot.is-active {
  width: 2.1rem;
  background: #f59e0b;
}

.section {
  padding: 4.5rem 0;
}

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

.section.dark-band {
  background: linear-gradient(135deg, #2563eb, #0891b2);
  color: #ffffff;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section-desc {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.9;
  margin-top: 0.55rem;
}

.dark-band .section-desc {
  color: #e0f2fe;
}

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

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

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

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.card-cover img,
.compact-card img,
.detail-poster img,
.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-cover img,
.compact-card img,
.rank-cover img {
  transition: transform 0.45s ease;
}

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

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.25rem;
  height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: #ffffff;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-badge,
.compact-card:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.year-badge {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
  font-size: 0.78rem;
  font-weight: 800;
}

.card-body {
  padding: 1rem;
}

.card-body h2 {
  font-size: 1.1rem;
  font-weight: 850;
  color: #111827;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

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

.card-meta {
  color: var(--brand-dark);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
}

.card-desc {
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.8rem;
}

.tag-row span,
.detail-tags span {
  display: inline-flex;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 750;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}

.category-card {
  min-height: 188px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.45rem;
  border-radius: 1.2rem;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2 {
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 0.55rem;
}

.category-card p {
  color: var(--muted);
  line-height: 1.75;
}

.category-card span {
  margin-top: 1.15rem;
  color: var(--brand-dark);
  font-weight: 850;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #ea580c);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.25), transparent 35%), rgba(0, 0, 0, 0.12);
}

.page-hero-inner {
  position: relative;
  z-index: 2;
  padding: 4.5rem 1rem;
}

.page-hero h1 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  color: #fff7ed;
  font-size: 1.12rem;
  line-height: 1.9;
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 0.85rem;
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.filters input,
.filters select,
.search-box input {
  width: 100%;
  min-height: 2.85rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0 0.9rem;
  background: #ffffff;
  color: #111827;
  outline: none;
}

.filters input:focus,
.filters select:focus,
.search-box input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

.breadcrumb {
  margin: 1.5rem 0;
  color: #6b7280;
  font-weight: 650;
}

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

.player-card,
.detail-card,
.side-card,
.text-card {
  overflow: hidden;
  border-radius: 1.2rem;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.09);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
  overflow: hidden;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.52));
  color: #ffffff;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-button {
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.94);
  color: #ffffff;
  font-size: 2rem;
  box-shadow: 0 20px 45px rgba(245, 158, 11, 0.3);
}

.player-caption {
  padding: 1rem 1.2rem;
  color: #4b5563;
  border-top: 1px solid #111827;
  background: #111827;
  color: #e5e7eb;
}

.detail-card {
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.detail-card h1 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 900;
  margin-bottom: 0.7rem;
  letter-spacing: -0.035em;
}

.detail-meta {
  color: var(--brand-dark);
  font-weight: 800;
  margin-bottom: 1rem;
}

.detail-summary {
  color: #374151;
  line-height: 2;
  margin-bottom: 1.2rem;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.text-card {
  padding: 1.4rem;
  margin-top: 1.5rem;
}

.text-card h2,
.side-card h2 {
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 0.8rem;
}

.text-card p {
  color: #374151;
  line-height: 2;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  background: #111827;
}

.side-card {
  margin-bottom: 1.5rem;
}

.side-card-body {
  padding: 1rem;
}

.side-card dl {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.55rem 0.8rem;
  color: #4b5563;
}

.side-card dt {
  font-weight: 850;
  color: #111827;
}

.compact-list {
  display: grid;
  gap: 0.75rem;
}

.compact-card {
  position: relative;
  overflow: hidden;
  min-height: 78px;
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 0.8rem;
  border-radius: 0.9rem;
  background: #f9fafb;
}

.compact-card img {
  height: 78px;
  background: #111827;
}

.compact-card span {
  padding-right: 0.8rem;
  font-weight: 800;
  color: #111827;
}

.ranking-list {
  display: grid;
  gap: 1rem;
}

.ranking-card {
  display: grid;
  grid-template-columns: 70px 160px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 1.1rem;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.rank-num {
  font-size: 2rem;
  font-weight: 950;
  color: #f59e0b;
}

.rank-cover {
  height: 94px;
  border-radius: 0.8rem;
  overflow: hidden;
  background: #111827;
}

.rank-content h2 {
  font-size: 1.25rem;
  font-weight: 900;
  margin-bottom: 0.35rem;
}

.rank-content p {
  color: #4b5563;
  line-height: 1.75;
}

.rank-score {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 900;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  margin: 2rem 0;
}

.filter-btn {
  border: 0;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
}

.site-footer {
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #d1d5db;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding: 3.5rem 1rem;
}

.footer-logo {
  color: #ffffff;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  max-width: 520px;
  line-height: 1.9;
  color: #d1d5db;
}

.site-footer h2 {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 900;
  margin-bottom: 1rem;
}

.site-footer li + li {
  margin-top: 0.5rem;
}

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

.footer-bottom {
  padding: 1.2rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #9ca3af;
}

.scroll-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: #f59e0b;
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.empty-state {
  display: none;
  padding: 2rem;
  border-radius: 1rem;
  background: #ffffff;
  text-align: center;
  color: #6b7280;
}

.empty-state.is-visible {
  display: block;
}

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

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

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

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

  .mobile-toggle {
    display: inline-flex;
  }

  .hero {
    height: 560px;
  }

  .section {
    padding: 3rem 0;
  }

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

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

  .card-body {
    padding: 0.8rem;
  }

  .card-desc,
  .tag-row {
    display: none;
  }

  .filters,
  .search-box {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 48px 92px 1fr;
  }

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

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

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

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }
}
