:root {
  --bg-start: #fffbeb;
  --bg-mid: #fff7ed;
  --bg-end: #fef3c7;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --text: #432a08;
  --muted: #8a5a16;
  --white: #ffffff;
  --shadow: 0 14px 30px rgba(120, 53, 15, 0.12);
  --soft-shadow: 0 8px 20px rgba(120, 53, 15, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-start), var(--bg-mid) 45%, var(--bg-end));
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 247, 237, 0.96));
  backdrop-filter: blur(14px);
  box-shadow: var(--soft-shadow);
}

.navbar {
  max-width: 1280px;
  height: 66px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--amber-800);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.32);
}

.brand-text,
.footer-brand {
  font-size: 24px;
  background: linear-gradient(90deg, var(--amber-600), #ea580c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--amber-800);
  font-weight: 650;
}

.nav-links a:hover,
.footer-links a:hover,
.breadcrumb a:hover {
  color: var(--amber-600);
}

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

.nav-search input,
.filter-panel input,
.filter-panel select,
.hero-search input {
  border: 1px solid var(--amber-200);
  border-radius: 999px;
  padding: 11px 15px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--amber-900);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.hero-search input:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

button,
.button,
.nav-search button,
.hero-action,
.rank-action {
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

button:hover,
.button:hover,
.nav-search button:hover,
.hero-action:hover,
.rank-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(245, 158, 11, 0.32);
}

.nav-toggle {
  display: none;
  padding: 9px 12px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  color: var(--white);
  background: #000;
}

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

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42) 45%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 22px 70px;
}

.hero-kicker,
.poster-badge,
.tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--white);
  background: var(--amber-500);
}

.hero h1 {
  max-width: 840px;
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.hero p {
  max-width: 760px;
  margin: 0 0 26px;
  font-size: clamp(17px, 2.2vw, 24px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.hero-actions,
.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-link,
.outline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  font-weight: 760;
}

.hero-link:hover,
.outline-link:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-controls {
  position: absolute;
  right: 22px;
  bottom: 30px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 13px;
  height: 13px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: none;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--amber-500);
}

.page-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 22px 72px;
}

.page-hero {
  margin: 22px 0 34px;
  padding: 38px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.96), rgba(255, 237, 213, 0.92));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 52px);
  color: var(--amber-900);
}

.page-hero p {
  max-width: 860px;
  color: var(--amber-700);
  line-height: 1.8;
  font-size: 17px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin: 46px 0 20px;
}

.section-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 3vw, 38px);
  color: var(--amber-900);
}

.section-heading p {
  margin: 0;
  color: var(--amber-700);
}

.section-heading > a {
  color: var(--amber-700);
  font-weight: 800;
}

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

.movie-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(253, 230, 138, 0.72);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--amber-100), #fed7aa);
  overflow: hidden;
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.movie-card-body {
  padding: 15px;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--amber-900);
  font-size: 17px;
  line-height: 1.35;
}

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

.movie-card p {
  margin: 0 0 13px;
  color: var(--amber-700);
  line-height: 1.6;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--amber-600);
  font-size: 13px;
}

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

.category-card {
  min-height: 180px;
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(254, 243, 199, 0.92));
  border: 1px solid rgba(253, 230, 138, 0.82);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  color: var(--amber-900);
}

.category-card p {
  margin: 0;
  color: var(--amber-700);
  line-height: 1.7;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
  margin: 22px 0 28px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(253, 230, 138, 0.75);
  box-shadow: var(--soft-shadow);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--amber-800);
  font-weight: 760;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border-radius: 16px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 70px 86px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 12px 18px 12px 12px;
}

.rank-number {
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
}

.rank-poster img {
  width: 86px;
  height: 116px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 8px;
  color: var(--amber-900);
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--amber-700);
  line-height: 1.6;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  color: var(--amber-700);
  font-weight: 650;
}

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

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-toggle {
  width: 78px;
  height: 78px;
  padding: 0;
  font-size: 30px;
}

.player-status {
  min-height: 22px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

.detail-card,
.sidebar-card {
  padding: 26px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(253, 230, 138, 0.72);
  box-shadow: var(--soft-shadow);
}

.detail-card h1 {
  margin: 0 0 15px;
  color: var(--amber-900);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
}

.detail-meta,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.meta-pill,
.tag {
  color: var(--amber-800);
  background: var(--amber-100);
}

.detail-card h2,
.sidebar-card h2 {
  margin: 26px 0 12px;
  color: var(--amber-900);
}

.detail-card p {
  color: var(--amber-800);
  line-height: 1.9;
  font-size: 16px;
}

.sidebar-card {
  margin-bottom: 18px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 12px;
  align-items: center;
}

.compact-card img {
  width: 66px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card strong {
  display: block;
  color: var(--amber-900);
  line-height: 1.35;
}

.compact-card em {
  display: block;
  margin-top: 5px;
  color: var(--amber-600);
  font-style: normal;
  font-size: 13px;
}

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

.site-footer {
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.92), rgba(255, 237, 213, 0.96));
  border-top: 1px solid rgba(253, 230, 138, 0.72);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 22px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-inner p {
  max-width: 560px;
  color: var(--amber-700);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 16px;
  color: var(--amber-800);
  font-weight: 760;
}

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

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--amber-800);
  text-align: center;
}

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

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

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

@media (max-width: 900px) {
  .navbar {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
  }

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

  .nav-links,
  .nav-search {
    display: none;
    width: 100%;
  }

  .nav-links.is-open,
  .nav-search.is-open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
  }

  .nav-search {
    padding-bottom: 14px;
  }

  .nav-search input {
    flex: 1;
  }

  .hero {
    min-height: 640px;
  }

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

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

  .ranking-row {
    grid-template-columns: 52px 76px 1fr;
  }

  .rank-action {
    grid-column: 2 / 4;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .page-main {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .hero-content {
    padding: 34px 16px 72px;
  }

  .hero h1 {
    font-size: 38px;
  }

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

  .page-hero,
  .detail-card,
  .sidebar-card {
    padding: 20px;
  }

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

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

  .rank-poster {
    display: none;
  }

  .rank-action {
    grid-column: 2 / 3;
    justify-self: start;
  }
}
