:root {
  --amber: #f59e0b;
  --orange: #f97316;
  --deep: #111827;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff7ed;
  --paper: #ffffff;
  --shadow: 0 18px 45px 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", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 48%, #f9fafb 100%);
  color: var(--ink);
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 48%, #d97706 100%);
  box-shadow: 0 12px 35px rgba(217, 119, 6, 0.25);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

.brand-text {
  font-size: 21px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
}

.site-nav a {
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.9);
  transition: width 0.25s ease;
}

.site-nav a:hover::after {
  width: 100%;
}

.top-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(330px, 34vw);
}

.top-search input,
.hero-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 12px 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.top-search button,
.hero-search button,
.primary-btn,
.ghost-btn,
.filter-btn,
.section-more {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.top-search button,
.hero-search button,
.primary-btn,
.filter-btn {
  color: #fff;
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.28);
}

.top-search button {
  color: var(--orange);
  background: #fff;
  box-shadow: none;
}

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

.primary-btn:hover,
.ghost-btn:hover,
.filter-btn:hover,
.section-more:hover,
.top-search button:hover,
.hero-search button:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  background: transparent;
  border: 0;
  font-size: 28px;
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

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

.hero-viewport {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.32), transparent 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.62) 43%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 130px;
  color: #fff;
}

.hero-content-inner {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  margin: 0 0 20px;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.08;
}

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

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

.hero-search {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin-top: 30px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

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

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

.hero-dot.is-active {
  background: #fbbf24;
}

.hero-arrows {
  position: absolute;
  z-index: 4;
  right: calc((100% - min(1240px, calc(100% - 32px))) / 2);
  bottom: 32px;
  display: flex;
  gap: 12px;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: -44px;
  position: relative;
  z-index: 5;
}

.quick-links a {
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  font-weight: 800;
  color: #92400e;
}

.content-block,
.page-block {
  margin: 66px 0;
}

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

.section-title-row h2,
.page-title h1,
.detail-main h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-title-row p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: #fff;
  background: #111827;
  box-shadow: 0 12px 26px rgba(17, 24, 39, 0.15);
}

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

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

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

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

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(245, 158, 11, 0.94);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.card-content {
  padding: 18px;
}

.card-meta {
  color: #d97706;
  font-size: 13px;
  font-weight: 800;
}

.card-content h3 {
  margin: 8px 0 8px;
  font-size: 19px;
  line-height: 1.3;
}

.card-content h3 a:hover {
  color: var(--orange);
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #7c2d12;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 700;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 148px;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.rank-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
  background: #f3f4f6;
}

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

.rank-num {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
}

.rank-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.25;
}

.rank-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.rank-line {
  margin-top: 8px !important;
}

.page-title {
  padding: 56px 0 20px;
}

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

.category-box {
  padding: 28px;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.25), transparent 30%),
    linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: var(--shadow);
}

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

.category-box p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-samples a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 160px 160px auto;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.empty-state {
  display: none;
  padding: 38px;
  border-radius: 24px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 28px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #b45309;
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin: 34px 0;
  padding: 30px;
  border-radius: 34px;
  color: #fff;
  background:
    radial-gradient(circle at 72% 18%, rgba(251, 191, 36, 0.34), transparent 32%),
    linear-gradient(135deg, #111827, #1f2937 54%, #92400e);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  background: #374151;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
}

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

.detail-main h1 {
  color: #fff;
}

.detail-main .intro {
  max-width: 760px;
  margin: 16px 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pill {
  color: #fde68a;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px);
}

.player-section,
.text-panel,
.related-panel {
  margin: 34px 0;
  padding: 28px;
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow);
}

.player-section h2,
.text-panel h2,
.related-panel h2 {
  margin: 0 0 18px;
  font-size: 28px;
  line-height: 1.2;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.38), transparent 28%),
    rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.35);
  font-size: 32px;
}

.text-panel p {
  margin: 0 0 18px;
  color: #374151;
  font-size: 17px;
}

.text-panel p:last-child {
  margin-bottom: 0;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #111827;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

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

.footer-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 42px 0;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.footer-shell p {
  margin: 8px 0 0;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 800;
}

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1040px) {
  .top-search {
    display: none;
  }

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

  .detail-hero {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

@media (max-width: 780px) {
  .nav-shell {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0 8px;
  }

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

  .hero-carousel,
  .hero-viewport {
    min-height: 620px;
  }

  .hero-content {
    padding: 78px 0 118px;
  }

  .hero-search {
    flex-direction: column;
    border-radius: 24px;
  }

  .hero-arrows {
    display: none;
  }

  .quick-links {
    margin-top: 24px;
  }

  .section-title-row,
  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

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

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 22px, 1240px);
  }

  .brand-text {
    font-size: 18px;
  }

  .movie-grid,
  .rank-grid,
  .category-list {
    grid-template-columns: 1fr;
  }

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

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

  .player-section,
  .text-panel,
  .related-panel,
  .detail-hero,
  .category-box {
    padding: 20px;
    border-radius: 24px;
  }
}
