:root {
  --bg: #fff8ed;
  --paper: #ffffff;
  --ink: #262016;
  --muted: #765f3f;
  --line: rgba(180, 117, 42, 0.2);
  --brand: #b45309;
  --brand-dark: #7c2d12;
  --accent: #f59e0b;
  --accent-soft: #fff1c2;
  --shadow: 0 18px 55px rgba(124, 45, 18, 0.15);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 237, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}

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

.brand-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #ffffff;
  font-weight: 900;
  border-radius: 14px;
  background: linear-gradient(135deg, #b45309, #ea580c);
  box-shadow: 0 12px 28px rgba(180, 83, 9, 0.28);
}

.brand-copy strong {
  display: block;
  font-size: 22px;
  line-height: 1;
  color: transparent;
  background: linear-gradient(90deg, #7c2d12, #ea580c);
  -webkit-background-clip: text;
  background-clip: text;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: #5f4b32;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

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

.top-search input,
.mobile-search input,
.search-page-form input {
  width: 240px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffaf0;
  color: var(--ink);
  outline: none;
  padding: 12px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus {
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.top-search button,
.mobile-search button,
.search-page-form button,
.primary-btn,
.ghost-btn,
.section-link {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.mobile-search button,
.search-page-form button,
.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #b45309, #ea580c);
  box-shadow: 0 12px 30px rgba(180, 83, 9, 0.25);
}

.ghost-btn,
.section-link {
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(245, 158, 11, 0.26);
}

.top-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(180, 83, 9, 0.25);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--brand-dark);
  background: #fffaf0;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px;
  background: rgba(255, 248, 237, 0.98);
}

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

.mobile-search input {
  width: 100%;
}

.mobile-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.mobile-links a {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--brand-dark);
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #190d05;
}

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

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

.hero-backdrop,
.detail-shade {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(25, 13, 5, 0.92), rgba(25, 13, 5, 0.58), rgba(25, 13, 5, 0.92)),
    linear-gradient(180deg, rgba(245, 158, 11, 0.28), rgba(124, 45, 18, 0.82)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  min-height: 680px;
  padding: 80px 0 96px;
}

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fcd34d;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-kicker {
  color: var(--brand);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.9;
}

.hero-tags,
.meta-line,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.meta-line span,
.tag-cloud span,
.filter-chip {
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff7d6;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 800;
}

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

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

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

.hero-control {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
}

.hero-control button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-dots {
  display: flex;
  gap: 9px;
}

.hero-dots button {
  width: 30px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dots button.is-active {
  background: #f59e0b;
}

.section {
  padding: 72px 0;
}

.section-cream {
  background: linear-gradient(180deg, #fff8ed, #fff1d6);
}

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

.split-heading h2,
.rank-panel h2,
.new-panel h2,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.04em;
}

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

.category-tile,
.category-large {
  display: flex;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-large:hover,
.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 60px rgba(124, 45, 18, 0.2);
}

.category-tile span:first-child,
.category-large-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
}

.category-tile strong,
.category-large strong {
  color: var(--brand-dark);
  font-size: 22px;
}

.category-tile em,
.category-large em {
  margin-top: 10px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
}

.tile-posters,
.category-large-cover {
  display: grid;
  grid-template-columns: repeat(2, 48px);
  gap: 6px;
  align-content: center;
  padding: 16px;
}

.tile-posters img,
.category-large-cover img {
  width: 48px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: #f5d9a8;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(124, 45, 18, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card.compact {
  flex-direction: row;
  min-height: 142px;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #f9d78f, #a16207);
}

.movie-card.compact .poster-wrap {
  flex: 0 0 96px;
  aspect-ratio: auto;
}

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

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

.score {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(124, 45, 18, 0.84);
  font-size: 13px;
  font-weight: 900;
}

.movie-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.movie-info strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.movie-info em,
.movie-info small,
.movie-info span {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.55;
}

.movie-info small {
  margin-top: auto;
  color: var(--brand);
  font-weight: 800;
}

.section-rank {
  background:
    radial-gradient(circle at 12% 18%, rgba(245, 158, 11, 0.24), transparent 26%),
    linear-gradient(135deg, #231107, #7c2d12);
  color: #ffffff;
}

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

.rank-panel,
.new-panel,
.leader-board,
.detail-article,
.detail-side,
.player-shell {
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.rank-panel,
.new-panel,
.detail-article,
.detail-side {
  padding: 26px;
}

.rank-panel h2,
.new-panel h2 {
  color: #ffffff;
}

.rank-panel,
.new-panel {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

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

.rank-row,
.leader-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.rank-row strong,
.rank-row em,
.leader-row strong,
.leader-row em {
  display: block;
}

.rank-row em,
.leader-row em {
  grid-column: 2;
  color: rgba(255, 255, 255, 0.68);
  font-style: normal;
  font-size: 13px;
}

.rank-no,
.leader-row span {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #7c2d12;
  background: #fcd34d;
  font-weight: 900;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #241008, #92400e);
  color: #ffffff;
}

.page-hero .container {
  padding: 84px 0;
}

.compact-hero .container {
  padding: 64px 0;
}

.page-hero p {
  max-width: 780px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fcd34d;
}

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

.category-large {
  min-height: 190px;
}

.category-large-cover {
  grid-template-columns: repeat(2, 70px);
}

.category-large-cover img {
  width: 70px;
  height: 92px;
}

.leader-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 20px;
}

.leader-row {
  background: #fffaf0;
}

.leader-row em {
  color: var(--muted);
}

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

.search-page-form {
  max-width: 720px;
  margin-top: 28px;
}

.search-page-form input {
  flex: 1;
  width: auto;
  background: rgba(255, 255, 255, 0.94);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-chip {
  color: var(--brand-dark);
  background: #fff7dd;
}

.filter-chip.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #b45309, #ea580c);
}

.search-meta {
  margin-bottom: 24px;
  color: var(--muted);
  font-weight: 700;
}

.detail-hero {
  min-height: 640px;
}

.detail-shade {
  background-image:
    linear-gradient(90deg, rgba(25, 13, 5, 0.94), rgba(25, 13, 5, 0.58), rgba(25, 13, 5, 0.9)),
    linear-gradient(180deg, rgba(245, 158, 11, 0.16), rgba(124, 45, 18, 0.78)),
    var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
  min-height: 640px;
  padding: 72px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.42);
}

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

.detail-copy .meta-line span,
.detail-copy .tag-cloud span {
  color: #fff4cf;
}

.player-section {
  background: #180d06;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050505;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(0, 0, 0, 0.66));
  cursor: pointer;
  z-index: 2;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b45309, #ea580c);
  box-shadow: 0 22px 60px rgba(180, 83, 9, 0.45);
  font-size: 34px;
}

.player-overlay strong {
  font-size: clamp(22px, 3vw, 38px);
}

.player-overlay em {
  color: #fcd34d;
  font-style: normal;
  font-weight: 800;
}

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

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

.detail-article h2 + p {
  margin-top: 14px;
}

.detail-article h2:not(:first-child) {
  margin-top: 28px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  margin: 20px 0 0;
}

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

.detail-side dd {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  color: #ffedd5;
  background: linear-gradient(135deg, #241008, #7c2d12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 38px;
  padding: 52px 0;
}

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

.footer-grid h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 18px;
}

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

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

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

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

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

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

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

  .rank-layout,
  .article-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .brand-copy small {
    display: none;
  }

  .hero-content,
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-content {
    min-height: 760px;
    padding-top: 64px;
  }

  .hero-poster,
  .detail-poster {
    max-width: 260px;
  }

  .split-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .compact-grid,
  .full-rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .movie-card.compact {
    flex-direction: column;
  }

  .movie-card.compact .poster-wrap {
    flex-basis: auto;
    aspect-ratio: 3 / 4;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1200px);
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

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

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

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

  .hero-control {
    bottom: 18px;
  }

  .category-grid,
  .category-large-grid,
  .leader-board,
  .movie-grid,
  .compact-grid,
  .full-rank-grid {
    grid-template-columns: 1fr;
  }

  .search-page-form {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-layout {
    min-height: auto;
  }

  .player-shell {
    border-radius: 18px;
  }
}
