:root {
  --site-bg: #fffbeb;
  --paper: #ffffff;
  --ink: #451a03;
  --muted: #92400e;
  --soft: #fef3c7;
  --line: #fde68a;
  --brand: #d97706;
  --brand-deep: #78350f;
  --brand-dark: #451a03;
  --shadow: 0 24px 70px rgba(120, 53, 15, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.22), transparent 35%),
    linear-gradient(180deg, #fffbeb 0%, #fff7ed 45%, #ffffff 100%);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

img.is-hidden {
  opacity: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 251, 235, 0.88);
  border-bottom: 1px solid rgba(253, 230, 138, 0.8);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fff7ed;
  box-shadow: 0 18px 40px rgba(180, 83, 9, 0.28);
}

.brand-text strong {
  display: block;
  line-height: 1.1;
  font-size: 20px;
  letter-spacing: 0.02em;
}

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

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--brand-deep);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--soft);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--brand-deep);
  border-radius: 10px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hero-section {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  min-height: 620px;
  margin: 30px auto 28px;
  overflow: hidden;
  border-radius: 34px;
  background: var(--brand-dark);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.55fr);
  align-items: center;
  gap: 36px;
  padding: clamp(28px, 5vw, 70px);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 18%, rgba(251, 191, 36, 0.38), transparent 28%),
    linear-gradient(180deg, rgba(69, 26, 3, 0.08), rgba(69, 26, 3, 0.72));
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(254, 243, 199, 0.16);
  border: 1px solid rgba(253, 230, 138, 0.4);
  color: #fde68a;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  font-weight: 1000;
  color: #fff7ed;
  letter-spacing: -0.05em;
}

.hero-desc,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  color: #ffedd5;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.8;
}

.hero-tags {
  margin: 22px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #fde68a;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.search-row button,
.play-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-row button,
.play-action {
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #451a03;
  box-shadow: 0 16px 38px rgba(249, 115, 22, 0.32);
}

.ghost-button {
  color: #fffbeb;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.search-row button:hover,
.play-action:hover {
  transform: translateY(-2px);
}

.hero-poster {
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: clamp(28px, 5vw, 70px);
  bottom: 34px;
  display: flex;
  gap: 10px;
}

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

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

.quick-search,
.content-section,
.page-main,
.toolbar-section {
  width: min(1200px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 44px;
}

.search-panel,
.search-page-panel,
.toolbar,
.rank-panel,
.detail-article,
.detail-side,
.watch-box {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(253, 230, 138, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-panel {
  padding: 20px;
}

.search-panel label {
  display: block;
  margin-bottom: 10px;
  color: var(--brand-deep);
  font-weight: 900;
}

.search-row {
  display: flex;
  gap: 10px;
}

.search-row.large {
  max-width: 840px;
  margin: 0 auto;
}

.search-row input {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

.search-row input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.quick-tags,
.search-suggestions,
.inline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-tags a,
.search-suggestions button,
.inline-tags a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: #ffffff;
  color: var(--brand-deep);
  font-weight: 800;
  cursor: pointer;
}

.content-section {
  margin-top: 52px;
  margin-bottom: 52px;
}

.warm-section {
  padding: clamp(22px, 3vw, 42px);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.9), rgba(255, 237, 213, 0.78));
  border: 1px solid var(--line);
}

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

.section-heading.simple {
  align-items: center;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 1000;
  letter-spacing: -0.04em;
  color: var(--brand-dark);
}

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

.section-link {
  flex: 0 0 auto;
  color: var(--brand);
  font-weight: 900;
}

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

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

.small-grid,
.library-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(253, 230, 138, 0.88);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 38px rgba(120, 53, 15, 0.12);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 68px rgba(120, 53, 15, 0.18);
  border-color: #fbbf24;
}

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

.poster-link img,
.detail-cover img,
.ranking-poster img {
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(69, 26, 3, 0.82);
  color: #fef3c7;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 1000;
  color: var(--brand-dark);
}

.card-meta {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.card-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

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

.category-tile {
  min-height: 160px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(120, 53, 15, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-tile span {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fef3c7;
  color: var(--brand-deep);
  font-weight: 900;
}

.category-tile strong {
  display: block;
  margin-top: 18px;
  color: var(--brand-dark);
  font-size: 22px;
}

.category-tile em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
  font-style: normal;
}

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

.rank-panel {
  position: sticky;
  top: 98px;
  padding: 24px;
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-areas:
    "num title"
    "num meta";
  gap: 4px 12px;
  padding: 12px;
  border-radius: 16px;
  background: #fffbeb;
  border: 1px solid rgba(253, 230, 138, 0.7);
}

.rank-number {
  grid-area: num;
  color: #f59e0b;
  font-size: 26px;
  line-height: 1;
  font-weight: 1000;
}

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

.rank-meta {
  grid-area: meta;
  color: var(--muted);
  font-size: 13px;
}

.page-main {
  padding-top: 30px;
}

.page-hero {
  position: relative;
  margin-bottom: 32px;
  padding: clamp(28px, 5vw, 58px);
  overflow: hidden;
  border-radius: 32px;
  background:
    radial-gradient(circle at right top, rgba(252, 211, 77, 0.36), transparent 30%),
    linear-gradient(135deg, #78350f, #b45309 55%, #f59e0b);
  box-shadow: var(--shadow);
}

.compact-hero h1,
.category-hero h1 {
  margin-top: 14px;
  font-size: clamp(38px, 5vw, 64px);
}

.toolbar-section {
  margin-top: 18px;
  margin-bottom: 26px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.toolbar label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-deep);
  font-weight: 900;
}

.sort-select {
  height: 42px;
  padding: 0 36px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

.pager-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pager-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fef3c7;
  color: var(--brand-deep);
  font-weight: 900;
}

.pager-links.bottom {
  margin-top: 32px;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(120, 53, 15, 0.1);
}

.ranking-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #fef3c7;
}

.ranking-info h2 {
  margin: 6px 0 8px;
  color: var(--brand-dark);
  font-size: 24px;
  font-weight: 1000;
}

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

.search-page-panel {
  padding: 24px;
  margin-bottom: 34px;
}

.search-suggestions {
  justify-content: center;
  margin-top: 16px;
}

.detail-main {
  width: min(1200px, calc(100% - 32px));
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: clamp(22px, 4vw, 46px);
  border-radius: 32px;
  background:
    radial-gradient(circle at right top, rgba(251, 191, 36, 0.36), transparent 34%),
    linear-gradient(135deg, #451a03, #92400e 60%, #d97706);
  box-shadow: var(--shadow);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 26px;
  border: 6px solid rgba(255, 255, 255, 0.16);
  background: #fef3c7;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 68px);
}

.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.detail-meta span,
.tag-list span {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(254, 243, 199, 0.15);
  border: 1px solid rgba(253, 230, 138, 0.35);
  color: #fde68a;
  font-weight: 800;
}

.watch-box {
  margin-top: 32px;
  padding: 22px;
}

.video-shell {
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

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

.play-action {
  margin-top: 18px;
}

.play-action.is-playing {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fff7ed;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  margin-top: 32px;
}

.detail-article,
.detail-side {
  padding: clamp(22px, 3vw, 34px);
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  color: var(--brand-dark);
  font-size: 28px;
  font-weight: 1000;
}

.detail-article p {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 2;
  font-size: 17px;
}

.detail-side dl,
.detail-side dd {
  margin: 0;
}

.detail-side dl {
  display: grid;
  gap: 14px;
}

.detail-side dl div {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.detail-side dt {
  color: var(--brand);
  font-weight: 900;
}

.detail-side dd {
  margin-top: 4px;
  color: var(--brand-dark);
  line-height: 1.65;
}

.site-footer {
  margin-top: 70px;
  padding: 46px 0 30px;
  background: linear-gradient(135deg, #451a03, #78350f);
  color: #fffbeb;
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

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

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #fde68a;
  font-weight: 800;
}

.footer-copy {
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(253, 230, 138, 0.18);
  color: #fed7aa;
  font-size: 14px;
}

@media (max-width: 1080px) {
  .movie-grid,
  .small-grid,
  .library-grid,
  .featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .rank-panel {
    position: static;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero-section {
    min-height: 720px;
  }

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

  .hero-poster {
    max-width: 220px;
  }

  .quick-search,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .quick-search,
  .footer-inner {
    display: grid;
  }

  .detail-hero {
    display: grid;
  }

  .detail-cover {
    width: min(280px, 100%);
  }

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

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .quick-search,
  .content-section,
  .page-main,
  .toolbar-section,
  .detail-main,
  .footer-inner,
  .footer-copy,
  .hero-section {
    width: min(100% - 22px, 1200px);
  }

  .hero-section {
    border-radius: 24px;
  }

  .hero-slide {
    padding: 24px;
  }

  .hero-dots {
    left: 24px;
    bottom: 24px;
  }

  .search-row {
    flex-direction: column;
  }

  .category-grid,
  .movie-grid,
  .small-grid,
  .library-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .detail-info h1,
  .hero-content h1,
  .page-hero h1 {
    letter-spacing: -0.03em;
  }
}
