:root {
  --bg-start: #fffbeb;
  --bg-end: #f5f5f4;
  --paper: #ffffff;
  --ink: #3f1f07;
  --muted: #7c5d3c;
  --amber: #d97706;
  --amber-dark: #92400e;
  --amber-soft: #fef3c7;
  --red: #b91c1c;
  --red-dark: #7f1d1d;
  --line: #fde68a;
  --shadow: 0 16px 40px rgba(120, 53, 15, 0.16);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-start), var(--bg-end));
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 251, 235, 0.95);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(120, 53, 15, 0.12);
  backdrop-filter: blur(14px);
}

.header-inner {
  max-width: 1280px;
  min-height: 76px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--amber-dark);
  white-space: nowrap;
}

.logo-mark,
.footer-logo span {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b, #b91c1c);
  color: white;
  box-shadow: 0 8px 20px rgba(185, 28, 28, 0.25);
  font-size: 14px;
}

.logo-text {
  font-size: 26px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-link {
  color: var(--amber-dark);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--red);
}

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

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  border: 2px solid #fcd34d;
  background: white;
  color: var(--ink);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 230px;
  padding: 10px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.header-search button,
.mobile-search button {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--amber);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: #fef3c7;
  color: var(--amber-dark);
  font-size: 24px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
  border-top: 1px solid var(--line);
}

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

.mobile-search input {
  flex: 1;
  padding: 11px 16px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--amber-dark);
  font-weight: 800;
}

.mobile-link:hover {
  background: #fef3c7;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

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

.hero-slide.active {
  opacity: 1;
}

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

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.50) 48%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  right: 24px;
  bottom: 78px;
  max-width: 820px;
  color: white;
}

.hero-kicker {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fde68a;
  backdrop-filter: blur(10px);
  font-weight: 800;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.04;
  margin: 0 0 16px;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.hero p {
  max-width: 720px;
  margin: 0 0 26px;
  font-size: clamp(17px, 2.1vw, 23px);
  line-height: 1.7;
  color: #fef3c7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.primary-button,
.ghost-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, #f59e0b, #b91c1c);
  box-shadow: 0 12px 30px rgba(185, 28, 28, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.outline-button:hover {
  transform: translateY(-2px);
}

.ghost-button {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.ghost-button.dark {
  color: var(--amber-dark);
  border-color: #fcd34d;
  background: #fff7ed;
}

.outline-button {
  color: var(--amber-dark);
  border: 2px solid #fcd34d;
  background: white;
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.36);
  color: white;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.58);
}

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

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

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 28px;
  background: #f59e0b;
}

.content-section,
.subpage {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
}

.subpage {
  padding-top: 34px;
}

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

.section-head h2 {
  margin: 0;
  color: var(--amber-dark);
  font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: -0.04em;
}

.section-head a {
  color: var(--amber-dark);
  font-weight: 900;
}

.compact-head h2 {
  font-size: 26px;
}

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

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: white;
  border: 1px solid rgba(252, 211, 77, 0.46);
  border-radius: 18px;
  box-shadow: 0 8px 26px rgba(120, 53, 15, 0.11);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #92400e, #7f1d1d);
}

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

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

.card-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent 65%);
  transition: opacity 0.25s ease;
}

.card-hover {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.card-link:hover .card-shade,
.card-link:hover .card-hover {
  opacity: 1;
  transform: translateY(0);
}

.play-chip {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(217, 119, 6, 0.92);
  font-weight: 900;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.card-body h3 {
  margin: 0;
  color: var(--red-dark);
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  margin: 0;
  color: #6b4b2c;
  line-height: 1.6;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.card-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  color: var(--red-dark);
  background: #fee2e2;
}

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

.tag-row span {
  color: var(--amber-dark);
  background: #fef3c7;
}

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

.category-card,
.category-overview {
  display: block;
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(252, 211, 77, 0.62);
  box-shadow: 0 10px 28px rgba(120, 53, 15, 0.10);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #f59e0b, #b91c1c);
  margin-bottom: 14px;
}

.category-card h3,
.category-overview h2 {
  margin: 0 0 10px;
  color: var(--red-dark);
  font-size: 22px;
}

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

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

.ranking-panel,
.ranking-full {
  border-radius: 20px;
  padding: 22px;
  background: white;
  border: 1px solid rgba(252, 211, 77, 0.62);
  box-shadow: 0 8px 26px rgba(120, 53, 15, 0.11);
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 70px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #fef3c7;
}

.rank-number {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, #f59e0b, #b91c1c);
  font-weight: 900;
}

.rank-row img {
  width: 70px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  background: #92400e;
}

.rank-title {
  min-width: 0;
  color: var(--red-dark);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  grid-column: 3;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero {
  border-radius: 26px;
  margin-bottom: 34px;
  padding: 48px;
  color: white;
  background: radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.6), transparent 28%), linear-gradient(135deg, #7f1d1d, #92400e 60%, #3f1f07);
  box-shadow: var(--shadow);
}

.small-hero span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fde68a;
  font-weight: 900;
}

.small-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
}

.small-hero p {
  max-width: 800px;
  margin: 0;
  color: #ffedd5;
  line-height: 1.8;
  font-size: 18px;
}

.category-overview {
  margin-bottom: 28px;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.filter-section {
  border-radius: 22px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(252, 211, 77, 0.58);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px 180px;
  gap: 12px;
  margin-bottom: 26px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  padding: 12px 16px;
}

.empty-state {
  display: none;
  padding: 34px;
  text-align: center;
  color: var(--muted);
  font-weight: 900;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin: 8px 0 24px;
  color: var(--muted);
  font-weight: 800;
}

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

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

.detail-cover,
.detail-info,
.content-card,
.player-box {
  border-radius: 24px;
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow);
  border: 1px solid rgba(252, 211, 77, 0.58);
}

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

.detail-info {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-kicker {
  color: var(--amber-dark);
  font-weight: 900;
  margin-bottom: 12px;
}

.detail-info h1 {
  margin: 0 0 16px;
  color: var(--red-dark);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.detail-one-line {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
  margin: 0 0 20px;
}

.detail-tags {
  margin-bottom: 26px;
}

.player-section {
  margin-bottom: 34px;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0f172a;
}

.video-element {
  width: 100%;
  height: 100%;
  display: block;
  background: #0f172a;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: none;
  color: white;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  z-index: 3;
}

.player-overlay.hidden {
  display: none;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #b91c1c);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.36);
  font-size: 28px;
  padding-left: 4px;
}

.player-overlay strong {
  font-size: 20px;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 26px;
}

.content-card {
  padding: 26px;
}

.content-card h2 {
  margin: 0 0 14px;
  color: var(--amber-dark);
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: #5b3a21;
  line-height: 1.9;
}

.meta-card dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.meta-card div {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 10px;
}

.meta-card dt {
  color: var(--amber-dark);
  font-weight: 900;
}

.meta-card dd {
  margin: 0;
  color: #5b3a21;
}

.related-section {
  padding-left: 0;
  padding-right: 0;
}

.site-footer {
  margin-top: 46px;
  color: #fee2e2;
  background: var(--red-dark);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(160px, 1fr));
  gap: 34px;
}

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

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

.footer-column h3 {
  margin: 0 0 16px;
  color: white;
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-column a {
  color: #fecaca;
}

.footer-column a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px;
  border-top: 1px solid rgba(254, 202, 202, 0.18);
  color: #fecaca;
  text-align: center;
}

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

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

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

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

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

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 66px;
    padding: 0 16px;
  }

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

  .hero {
    height: 78vh;
    min-height: 560px;
  }

  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 76px;
  }

  .hero-control {
    display: none;
  }

  .content-section,
  .subpage {
    padding: 38px 16px;
  }

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

  .movie-grid,
  .movie-grid.two-col,
  .movie-grid.four-col,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 34px 24px;
    border-radius: 20px;
  }

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

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

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

  .detail-cover img {
    min-height: 220px;
  }

  .detail-info {
    padding: 26px;
  }

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

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