:root {
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --orange: #f97316;
  --ink: #111827;
  --muted: #6b7280;
  --line: rgba(245, 158, 11, 0.2);
  --soft: #fff7ed;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 36%, #fff7ed 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.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));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
  backdrop-filter: blur(16px);
}

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

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

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

.brand-mark,
.footer-logo span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

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

.brand-text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 650;
  color: #374151;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--amber-dark);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  left: 0;
  top: 100%;
  width: 190px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #4b5563;
}

.nav-dropdown-menu a:hover {
  background: #fffbeb;
}

.top-search,
.mobile-search,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  border: 1px solid #fcd34d;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  padding: 11px 15px;
  outline: none;
  color: #374151;
}

.top-search input {
  width: 240px;
}

.top-search button,
.mobile-search button,
.search-page-form button,
.primary-button,
.text-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 750;
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.25);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
}

.mobile-menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #92400e;
}

.mobile-nav {
  display: none;
  padding: 12px 16px 20px;
  border-top: 1px solid var(--line);
  background: white;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 10px 6px;
  font-weight: 650;
  color: #4b5563;
}

.mobile-category-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
  padding-left: 8px;
}

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  top: 50%;
  width: min(620px, calc(100% - 48px));
  transform: translateY(-50%);
  color: white;
}

.hero-tag,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--amber);
  color: white;
  font-size: 13px;
  font-weight: 750;
}

.hero-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-one-line {
  font-size: 21px;
  line-height: 1.55;
  color: #f3f4f6;
}

.hero-summary {
  margin: 14px 0 28px;
  color: #d1d5db;
  line-height: 1.75;
}

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

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 11px 18px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  font-weight: 750;
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 34px;
  transform: translateY(-50%);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: 0.2s ease;
}

.hero-dots button.active {
  width: 34px;
  background: white;
}

.content-section {
  padding: 70px 0;
}

.warm-section {
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.9), rgba(255, 237, 213, 0.92));
}

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

.section-heading h2 {
  margin: 12px 0 6px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.12;
}

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

.horizontal-scroll {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scrollbar-width: thin;
}

.horizontal-scroll .movie-card {
  flex: 0 0 280px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  height: 240px;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

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

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

.category-pill,
.year-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.category-pill {
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  color: #92400e;
  background: rgba(255, 255, 255, 0.92);
}

.year-pill {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  color: white;
  background: rgba(17, 24, 39, 0.72);
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  font-size: 42px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.08));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-info h3 a:hover {
  color: var(--amber-dark);
}

.movie-info p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.genre-line {
  overflow: hidden;
  color: #9ca3af;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #6b4b10;
  background: #fef3c7;
  font-size: 12px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius);
  color: white;
  background: #111827;
  box-shadow: var(--shadow);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  opacity: 0.68;
  transition: transform 0.35s ease;
}

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

.category-card span,
.category-card p {
  position: absolute;
  left: 20px;
  right: 20px;
  z-index: 2;
}

.category-card span {
  bottom: 58px;
  font-size: 24px;
  font-weight: 850;
}

.category-card p {
  bottom: 22px;
  margin: 0;
  color: #f3f4f6;
  font-size: 14px;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.stack-list {
  display: grid;
  gap: 16px;
}

.movie-card.horizontal {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  min-height: 150px;
}

.movie-card.horizontal .movie-poster {
  height: 100%;
}

.movie-card.horizontal .movie-info h3 {
  min-height: auto;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(180deg, white, #fff7ed);
  box-shadow: var(--shadow);
}

.ranking-head span {
  color: var(--amber-dark);
  font-size: 13px;
  font-weight: 800;
}

.ranking-head h2 {
  margin: 5px 0 8px;
  font-size: 28px;
}

.ranking-head a {
  color: var(--amber-dark);
  font-size: 14px;
  font-weight: 750;
}

.ranking-panel ol {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.ranking-panel li + li {
  border-top: 1px solid #fde68a;
}

.ranking-panel li a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 13px 0;
}

.ranking-panel strong {
  color: var(--amber-dark);
  font-size: 22px;
}

.ranking-panel span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 700;
}

.ranking-panel em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-hero.small {
  padding: 64px 0;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.24), transparent 34%), linear-gradient(135deg, #fffbeb, #fff7ed);
}

.page-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(34px, 4vw, 54px);
  letter-spacing: -0.04em;
}

.page-hero p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.75;
}

.crumb,
.breadcrumb a {
  color: var(--amber-dark);
  font-weight: 750;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.category-cover {
  overflow: hidden;
  border-radius: 16px;
  background: #fef3c7;
}

.category-cover img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 4px 0 8px;
  font-size: 24px;
}

.category-overview-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.sample-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 13px;
}

.text-button {
  display: inline-flex;
  width: fit-content;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
}

.filter-bar input {
  min-width: 260px;
  flex: 1;
}

.empty-state {
  display: none;
  padding: 36px;
  border-radius: var(--radius);
  background: white;
  color: var(--muted);
  text-align: center;
}

.empty-state.show {
  display: block;
}

.detail-page {
  background: linear-gradient(180deg, #fffbeb, white);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: black;
  box-shadow: var(--shadow);
}

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

.player-cover-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.18));
  transition: opacity 0.2s ease;
}

.player-cover-button span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 20px 44px rgba(245, 158, 11, 0.36);
  font-size: 34px;
}

.player-card.playing .player-cover-button {
  opacity: 0;
  pointer-events: none;
}

.player-loading,
.player-error {
  position: absolute;
  left: 50%;
  top: 50%;
  display: none;
  padding: 10px 14px;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.68);
  transform: translate(-50%, -50%);
}

.player-loading.show,
.player-error.show {
  display: block;
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.player-card:hover .player-controls,
.player-card.playing .player-controls {
  opacity: 1;
}

.player-controls button {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.detail-title-block {
  padding: 24px 0 10px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 13px;
  font-weight: 750;
}

.detail-title-block h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.1;
}

.detail-title-block p {
  margin: 0 0 18px;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.75;
}

.detail-card,
.side-card {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-card p {
  margin: 0;
  color: #374151;
  line-height: 1.88;
}

.detail-side {
  position: sticky;
  top: 96px;
}

.poster-side {
  padding: 0;
  overflow: hidden;
}

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

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

.info-list small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
}

.info-list strong {
  font-weight: 750;
}

.related-section {
  margin-top: 70px;
}

.search-page-form {
  margin-top: 24px;
  max-width: 680px;
}

.search-page-form input {
  flex: 1;
  min-width: 0;
}

.site-footer {
  background: linear-gradient(180deg, #111827, #030712);
  color: #d1d5db;
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 36px;
  padding: 54px 0 38px;
}

.footer-logo strong {
  color: white;
  font-size: 24px;
}

.footer-brand p {
  max-width: 520px;
  color: #9ca3af;
  line-height: 1.75;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: white;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 9px;
}

.site-footer a {
  color: #9ca3af;
}

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

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #6b7280;
  text-align: center;
}

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

  .mobile-menu-button {
    display: block;
  }

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

  .split-grid,
  .detail-grid,
  .footer-shell,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel,
  .detail-side {
    position: static;
  }
}

@media (max-width: 640px) {
  .nav-shell,
  .content-shell,
  .footer-shell,
  .detail-shell {
    width: min(100% - 22px, 1180px);
  }

  .brand-text small {
    display: none;
  }

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

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    left: 16px;
    width: calc(100% - 32px);
  }

  .hero-one-line {
    font-size: 18px;
  }

  .hero-summary {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .hero-control {
    display: none;
  }

  .content-section {
    padding: 46px 0;
  }

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

  .movie-card.horizontal,
  .category-overview-card {
    grid-template-columns: 124px minmax(0, 1fr);
  }

  .movie-card.horizontal .movie-poster,
  .category-cover img {
    height: 150px;
  }

  .movie-info h3 {
    font-size: 16px;
  }

  .footer-shell {
    padding: 42px 0 30px;
  }
}
