:root {
  --bg: #fff7ed;
  --surface: #ffffff;
  --surface-soft: #fffbeb;
  --ink: #1f1307;
  --muted: #7c5a35;
  --brand: #d97706;
  --brand-dark: #92400e;
  --brand-light: #fbbf24;
  --line: rgba(146, 64, 14, 0.16);
  --shadow: 0 24px 60px rgba(120, 53, 15, 0.18);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.22), transparent 32rem),
    linear-gradient(135deg, #fff7ed 0%, #fffbeb 48%, #fff7ed 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.98), rgba(194, 65, 12, 0.98), rgba(120, 53, 15, 0.98));
  box-shadow: 0 16px 40px rgba(88, 28, 12, 0.28);
  backdrop-filter: blur(16px);
}

.topbar {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-icon {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  color: #7c2d12;
  background: linear-gradient(135deg, #fde68a, #f97316);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 12px 30px rgba(0, 0, 0, 0.18);
}

.brand-text {
  display: grid;
  line-height: 1.18;
}

.brand-text strong {
  font-size: 24px;
  letter-spacing: 0.04em;
}

.brand-text em {
  font-style: normal;
  font-size: 12px;
  color: #fed7aa;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 14px;
  color: #ffedd5;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 14px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.1);
}

.mobile-nav.is-open {
  display: grid;
}

main {
  overflow: hidden;
}

.hero-wrap {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 0;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 34px;
  background: #3b1d0b;
  box-shadow: var(--shadow);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) blur(1px);
  transform: scale(1.05);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(29, 15, 5, 0.92), rgba(67, 28, 5, 0.72), rgba(67, 28, 5, 0.18)),
    radial-gradient(circle at 78% 18%, rgba(251, 191, 36, 0.28), transparent 22rem);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 48px;
  padding: 62px;
  color: #fff;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-article h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p {
  max-width: 760px;
  color: #ffedd5;
  font-size: 20px;
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-tags,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #7c2d12;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 700;
}

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

.center-actions {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 16px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #431407;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  box-shadow: 0 16px 34px rgba(251, 146, 60, 0.34);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn.small {
  min-height: 40px;
  padding: 0 16px;
}

.full-btn {
  width: 100%;
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 28px;
  background: #78350f;
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

.hero-poster img,
.poster-link img,
.category-tile img,
.detail-cover,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #7c2d12, #f59e0b);
}

.hero-poster span,
.poster-play {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #431407;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

.hero-poster span {
  right: 18px;
  bottom: 18px;
  width: 58px;
  height: 58px;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 62px;
  bottom: 38px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

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

.hero-search {
  position: relative;
  z-index: 8;
  width: min(860px, calc(100% - 48px));
  margin: -36px auto 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px rgba(120, 53, 15, 0.18);
  backdrop-filter: blur(16px);
}

.hero-search input,
.filter-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  padding: 0 18px;
  min-height: 50px;
  color: var(--ink);
  background: #fff;
}

.hero-search button {
  border: 0;
  border-radius: 16px;
  padding: 0 24px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), #ea580c);
  cursor: pointer;
}

.content-section,
.category-overview,
.watch-layout,
.breadcrumb {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

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

.alt-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1240px) / 2));
  padding-right: max(16px, calc((100% - 1240px) / 2));
  background: linear-gradient(135deg, rgba(253, 230, 138, 0.48), rgba(255, 237, 213, 0.72));
}

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

.section-heading h2,
.rank-panel h2,
.category-block h2,
.site-footer h2,
.detail-article h2 {
  margin: 0;
  color: #2f1707;
  font-size: 30px;
  line-height: 1.2;
}

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

.section-heading a {
  color: var(--brand-dark);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 36px rgba(120, 53, 15, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.movie-card[hidden],
.rank-row[hidden] {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #78350f;
}

.poster-link img {
  transition: transform 280ms ease;
}

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

.score-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  color: #431407;
  background: #fbbf24;
  font-size: 12px;
  font-weight: 900;
}

.score-badge {
  right: 12px;
}

.rank-badge {
  left: 12px;
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 180ms ease, transform 180ms ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: #251305;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.28;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body p {
  display: -webkit-box;
  min-height: 60px;
  overflow: hidden;
  margin: 10px 0;
  color: #7c5a35;
  font-size: 14px;
  line-height: 1.45;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #9a6a2f;
  font-size: 12px;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 11px;
}

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

.category-tile {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  background: #78350f;
  box-shadow: 0 20px 42px rgba(120, 53, 15, 0.18);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(29, 15, 5, 0.9), rgba(29, 15, 5, 0.1));
}

.category-tile img {
  position: absolute;
  inset: 0;
  transition: transform 260ms ease;
}

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

.category-tile span,
.category-tile em {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
}

.category-tile span {
  bottom: 76px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile em {
  bottom: 18px;
  display: -webkit-box;
  overflow: hidden;
  font-style: normal;
  color: #fed7aa;
  font-size: 13px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.rank-panel,
.category-block,
.filter-panel,
.player-card,
.detail-article,
.detail-side,
.ranking-table {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 42px rgba(120, 53, 15, 0.1);
}

.rank-panel {
  position: sticky;
  top: 100px;
  align-self: start;
  padding: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #fff7ed;
  transition: background 180ms ease, transform 180ms ease;
}

.rank-row:hover {
  background: #ffedd5;
  transform: translateX(3px);
}

.rank-row strong {
  color: var(--brand-dark);
  font-size: 18px;
}

.rank-row img {
  width: 56px;
  height: 76px;
  border-radius: 12px;
}

.rank-title {
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: #9a6a2f;
  font-size: 13px;
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 72px 36px;
  color: #fff;
  text-align: center;
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.35), transparent 24rem),
    linear-gradient(135deg, #78350f, #c2410c 52%, #7c2d12);
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.compact-hero p {
  margin-left: auto;
  margin-right: auto;
}

.category-overview {
  padding: 48px 0 72px;
  display: grid;
  gap: 28px;
}

.category-block {
  padding: 28px;
}

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

.category-block p {
  color: var(--muted);
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: #7c2d12;
  background: #ffedd5;
  cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #ea580c);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 0 0;
  color: #8a5b21;
  font-size: 14px;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 22px 0 50px;
}

.watch-main {
  min-width: 0;
}

.player-card {
  overflow: hidden;
  background: #111827;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050505;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  transition: opacity 180ms ease, visibility 180ms ease;
}

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

.play-mark {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #431407;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.player-overlay strong {
  max-width: 80%;
  font-size: 24px;
  text-align: center;
}

.player-message {
  min-height: 0;
  margin: 0;
  color: #fed7aa;
  text-align: center;
  background: #111827;
}

.player-message:not(:empty) {
  padding: 12px;
}

.detail-article {
  margin-top: 26px;
  padding: 34px;
}

.detail-article h1 {
  color: #2f1707;
  font-size: clamp(32px, 4vw, 54px);
}

.lead-text {
  color: #7c2d12;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.8;
}

.detail-article p {
  color: #543414;
  font-size: 17px;
  line-height: 2;
}

.detail-article h2 {
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 26px;
}

.detail-tags {
  margin-top: 28px;
}

.detail-side {
  align-self: start;
  padding: 18px;
  position: sticky;
  top: 100px;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  background: #78350f;
}

.detail-meta {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: grid;
  gap: 10px;
}

.detail-meta li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.detail-meta span {
  color: #8a5b21;
}

.detail-meta strong {
  color: #2f1707;
  text-align: right;
}

.related-section {
  padding-top: 16px;
}

.ranking-table {
  padding: 18px;
}

.site-footer {
  margin-top: 40px;
  color: #fed7aa;
  background: #1c1208;
}

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

.footer-brand {
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.site-footer p {
  color: #d6a56b;
  line-height: 1.8;
}

.site-footer h2 {
  margin-bottom: 16px;
  color: #fff;
  font-size: 18px;
}

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

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

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px;
  color: #b98950;
  text-align: center;
}

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

  .nav-toggle {
    display: block;
  }

  .hero-content,
  .watch-layout,
  .split-section,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-side,
  .rank-panel {
    position: static;
  }

  .hero-poster {
    width: min(320px, 72vw);
    justify-self: center;
  }

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

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

@media (max-width: 720px) {
  .topbar,
  .hero-wrap,
  .content-section,
  .category-overview,
  .watch-layout,
  .breadcrumb,
  .page-hero,
  .footer-grid {
    width: min(100% - 24px, 1240px);
  }

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

  .brand-text em {
    display: none;
  }

  .hero-carousel,
  .hero-content {
    min-height: 680px;
  }

  .hero-content {
    padding: 34px 22px 78px;
    gap: 24px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

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

  .hero-dots {
    left: 22px;
    bottom: 26px;
  }

  .hero-search {
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
    margin-top: 16px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-title {
    font-size: 15px;
  }

  .card-body p,
  .tag-row {
    display: none;
  }

  .section-heading,
  .category-block-head {
    align-items: start;
    flex-direction: column;
  }

  .page-hero {
    padding: 48px 22px;
  }

  .detail-article {
    padding: 24px 18px;
  }

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

  .rank-meta {
    display: none;
  }

  .rank-row img {
    width: 48px;
    height: 66px;
  }
}
