:root {
  --amber-50: #fff8eb;
  --amber-100: #fef0cc;
  --amber-200: #f9d98a;
  --amber-300: #f3bd4d;
  --amber-400: #ee9e20;
  --amber-500: #e8850f;
  --amber-600: #c7650a;
  --amber-700: #9c460d;
  --amber-800: #7e3711;
  --amber-900: #662e12;
  --orange-50: #fff4ed;
  --orange-100: #ffe4d2;
  --orange-500: #f47b20;
  --orange-600: #dc5d11;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #f1d6a0;
  --paper: #ffffff;
  --shadow: 0 20px 45px rgba(120, 53, 15, 0.14);
  --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(--text);
  background: linear-gradient(135deg, var(--amber-50), var(--orange-50) 48%, #fff 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(255, 248, 235, 0.96), rgba(255, 244, 237, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(120, 53, 15, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 25px;
  font-weight: 900;
  white-space: nowrap;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--amber-800), var(--orange-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 12px 25px rgba(220, 93, 17, 0.28);
  font-size: 20px;
  letter-spacing: 0;
}

.header-search {
  position: relative;
  flex: 1;
  max-width: 440px;
  display: flex;
  align-items: center;
}

.header-search input,
.mobile-panel input,
.search-box input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 2px solid var(--amber-200);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  padding: 12px 88px 12px 18px;
}

.header-search input:focus,
.mobile-panel input:focus,
.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 5px rgba(232, 133, 15, 0.14);
}

.header-search button,
.mobile-panel button,
.search-box button,
.btn-primary,
.btn-secondary,
.btn-ghost,
.filter-chip,
.page-link {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.header-search button {
  position: absolute;
  right: 6px;
  padding: 9px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
}

.header-search button:hover,
.search-box button:hover,
.btn-primary:hover,
.player-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(232, 133, 15, 0.26);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-left: auto;
  font-weight: 800;
  color: var(--amber-800);
}

.main-nav a {
  padding: 9px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--amber-600);
  border-bottom-color: var(--amber-400);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: var(--amber-800);
  background: var(--amber-100);
  font-size: 24px;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-panel form {
  display: flex;
  gap: 10px;
  margin: 8px 0 14px;
}

.mobile-panel input {
  padding: 12px 16px;
}

.mobile-panel button {
  padding: 0 18px;
  color: #fff;
  background: var(--amber-500);
}

.mobile-panel nav {
  display: grid;
  gap: 10px;
}

.mobile-panel a {
  color: var(--amber-800);
  font-weight: 800;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: radial-gradient(circle at 20% 20%, rgba(247, 176, 60, 0.35), transparent 26%), linear-gradient(135deg, #3f1e0c, #7c2d12 52%, #f97316);
  color: #fff;
}

.hero-slide {
  display: none;
  min-height: 620px;
}

.hero-slide.active {
  display: block;
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.42;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(1px) saturate(1.05);
  transform: scale(1.02);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(32, 13, 5, 0.94) 0%, rgba(88, 40, 10, 0.78) 48%, rgba(255, 166, 42, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 390px;
  align-items: center;
  gap: 48px;
  padding: 56px 0;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #7c2d12;
  background: #ffedd5;
  font-size: 14px;
  font-weight: 900;
}

.hero .eyebrow {
  color: #ffedd5;
  background: rgba(255, 237, 213, 0.16);
  border: 1px solid rgba(255, 237, 213, 0.28);
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin: 24px 0 14px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero p {
  margin: 0 0 26px;
  max-width: 720px;
  color: #ffedd5;
  font-size: 18px;
  line-height: 1.85;
}

.hero-tags,
.detail-tags,
.card-tags,
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.detail-tags span,
.card-tags span,
.category-pills a {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 14px 26px rgba(220, 93, 17, 0.28);
}

.btn-secondary {
  color: var(--amber-900);
  background: #fff7ed;
}

.btn-secondary:hover,
.btn-ghost:hover,
.filter-chip:hover,
.page-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(120, 53, 15, 0.12);
}

.btn-ghost {
  color: var(--amber-800);
  background: var(--amber-100);
}

.hero-poster {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.36);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), transparent 46%);
}

.hero-poster-info {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 22px;
}

.hero-poster-info strong {
  display: block;
  font-size: 22px;
  margin-bottom: 8px;
}

.hero-poster-info span {
  color: #fed7aa;
  font-weight: 800;
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.45);
}

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

.section {
  padding: 72px 0 0;
}

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

.section-title h2,
.page-title h1 {
  margin: 12px 0 10px;
  color: #111827;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-title p,
.page-title p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff, #fff7ed);
  box-shadow: var(--shadow);
  border: 1px solid rgba(249, 217, 138, 0.75);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -42px;
  bottom: -52px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(238, 158, 32, 0.24), transparent 70%);
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 24px;
  color: var(--amber-900);
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.category-card a {
  position: relative;
  z-index: 1;
  color: var(--amber-700);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(120, 53, 15, 0.1);
  border: 1px solid rgba(249, 217, 138, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 52px rgba(120, 53, 15, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  height: 265px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), var(--orange-100));
}

.movie-card.compact .poster-link {
  height: 190px;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent 62%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.poster-type,
.poster-region,
.rank-badge {
  position: absolute;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.poster-type {
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.62);
}

.poster-region {
  left: 10px;
  bottom: 10px;
  background: rgba(232, 133, 15, 0.9);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 10px;
  min-height: 48px;
  font-size: 18px;
  line-height: 1.35;
}

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

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

.card-tags {
  min-height: 28px;
  margin-bottom: 14px;
}

.card-tags span,
.detail-tags span {
  color: #6b3d0c;
  background: var(--amber-100);
}

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

.card-meta span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-hero {
  padding: 76px 0 34px;
  background: radial-gradient(circle at 12% 20%, rgba(232, 133, 15, 0.2), transparent 25%);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--amber-700);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 14px;
}

.breadcrumb span {
  color: var(--muted);
}

.filter-bar,
.search-box {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 28px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(249, 217, 138, 0.75);
  box-shadow: 0 12px 28px rgba(120, 53, 15, 0.08);
}

.filter-bar input,
.filter-bar select,
.search-box input {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
}

.search-box button {
  min-height: 48px;
  padding: 0 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
}

.filter-chip {
  min-height: 42px;
  padding: 0 16px;
  color: var(--amber-800);
  background: var(--amber-100);
}

.filter-chip.active {
  color: #fff;
  background: var(--amber-600);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 86px 120px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(120, 53, 15, 0.1);
  border: 1px solid rgba(249, 217, 138, 0.7);
}

.rank-no {
  font-size: 28px;
  font-weight: 950;
  color: var(--amber-600);
}

.rank-thumb {
  height: 76px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), var(--orange-100));
}

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

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.rank-heat {
  min-width: 96px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  border-radius: 18px;
  padding: 10px 12px;
  font-weight: 900;
}

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

.detail-cover {
  position: sticky;
  top: 96px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--amber-100), var(--orange-100));
  box-shadow: var(--shadow);
}

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

.detail-panel {
  border-radius: 28px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  border: 1px solid rgba(249, 217, 138, 0.65);
}

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #7c2d12;
  background: #ffedd5;
  font-weight: 900;
  font-size: 14px;
}

.lead {
  margin: 0 0 24px;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.9;
  padding: 16px 18px;
  border-left: 5px solid var(--amber-500);
  border-radius: 16px;
  background: #fff7ed;
}

.content-card {
  margin-top: 22px;
  padding: 26px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(249, 217, 138, 0.7);
  box-shadow: 0 12px 30px rgba(120, 53, 15, 0.08);
}

.content-card h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: #374151;
  line-height: 1.95;
  text-align: justify;
}

.player-section {
  padding-top: 46px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.32);
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f172a;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(232, 133, 15, 0.3), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

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

.player-start span {
  display: inline-grid;
  place-items: center;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 950;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 18px 42px rgba(232, 133, 15, 0.42);
}

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

.search-results-note {
  min-height: 28px;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 18px;
}

.empty-state {
  padding: 40px;
  text-align: center;
  border-radius: 24px;
  background: #fff;
  color: var(--muted);
  box-shadow: 0 12px 30px rgba(120, 53, 15, 0.08);
}

.site-footer {
  margin-top: 86px;
  color: #ffedd5;
  background: linear-gradient(180deg, var(--amber-900), #3f1e0c);
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 34px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 30px;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #fde68a;
}

.footer-grid p {
  color: #fed7aa;
  line-height: 1.8;
}

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

.footer-links a {
  color: #ffedd5;
}

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

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  border-top: 1px solid rgba(253, 230, 138, 0.18);
  color: #fed7aa;
  text-align: center;
}

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .hero-poster {
    max-width: 420px;
    transform: none;
  }

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

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

@media (max-width: 820px) {
  .header-inner {
    height: auto;
    min-height: 68px;
  }

  .header-search {
    display: none;
  }

  .hero,
  .hero-slide,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 54px 0 86px;
  }

  .hero-poster img {
    height: 420px;
  }

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

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

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

  .rank-item {
    grid-template-columns: 64px 88px minmax(0, 1fr);
  }

  .rank-heat {
    grid-column: 2 / 4;
    justify-self: start;
  }

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

  .detail-cover {
    position: relative;
    top: auto;
    max-width: 420px;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .container,
  .hero-content,
  .mobile-panel,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1240px);
  }

  .brand {
    font-size: 20px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

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

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

  .hero-poster img,
  .detail-cover img {
    height: 360px;
  }

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

  .poster-link,
  .movie-card.compact .poster-link {
    height: 300px;
  }

  .rank-item {
    grid-template-columns: 1fr;
  }

  .rank-thumb {
    height: 180px;
  }

  .rank-heat {
    grid-column: auto;
  }

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