:root {
  --bg: #f8f5f0;
  --paper: #ffffff;
  --ink: #292524;
  --muted: #78716c;
  --line: #e7e0d7;
  --amber: #d97706;
  --amber-dark: #92400e;
  --amber-soft: #fff7ed;
  --stone: #44403c;
  --shadow: 0 20px 50px rgba(41, 37, 36, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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, 255, 255, 0.88);
  border-bottom: 1px solid rgba(231, 224, 215, 0.9);
  backdrop-filter: blur(16px);
}

.site-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #d97706, #7c2d12);
  box-shadow: 0 12px 28px rgba(146, 64, 14, 0.28);
}

.brand-text {
  font-size: 20px;
}

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

.site-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--stone);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
  color: var(--amber-dark);
  background: var(--amber-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--amber-soft);
  border: 1px solid #fed7aa;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--amber-dark);
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: white;
  background: #1c1917;
}

.hero-background,
.detail-bg {
  position: absolute;
  inset: 0;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-bg-image.is-active {
  opacity: 0.34;
  transform: scale(1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 26%, rgba(217, 119, 6, 0.35), transparent 32%),
    linear-gradient(90deg, rgba(12, 10, 9, 0.94), rgba(12, 10, 9, 0.62) 48%, rgba(12, 10, 9, 0.22)),
    linear-gradient(0deg, rgba(28, 25, 23, 0.92), transparent 48%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 640px;
  margin: 0 auto;
  padding: 84px 22px 70px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.62fr);
  align-items: center;
  gap: 46px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(217, 119, 6, 0.16);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 22px 0 20px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.07em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 14px 34px rgba(217, 119, 6, 0.34);
}

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

.btn-plain {
  color: #fcd34d;
  background: transparent;
}

.hero-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background: rgba(41, 37, 36, 0.44);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.hero-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

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

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

.hero-dots button.is-active {
  width: 24px;
  background: #fbbf24;
}

.hero-slides {
  display: grid;
  gap: 12px;
}

.hero-slide {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0.68;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.hero-slide:hover,
.hero-slide.is-active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(-3px);
}

.hero-slide img {
  width: 96px;
  height: 126px;
  object-fit: cover;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.hero-slide span {
  color: #fbbf24;
  font-size: 13px;
  font-weight: 900;
}

.hero-slide strong {
  display: block;
  margin: 4px 0;
  overflow: hidden;
  color: white;
  font-size: 18px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-slide p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.5;
}

.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 22px;
}

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

.section-heading h2 {
  margin: 12px 0 8px;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

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

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

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(41, 37, 36, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card a {
  display: block;
  height: 100%;
}

.card-poster {
  position: relative;
  height: 288px;
  overflow: hidden;
  background: linear-gradient(135deg, #292524, #78350f);
}

.movie-card-featured .card-poster {
  height: 404px;
}

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

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

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  color: white;
  font-weight: 900;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.08));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-overlay {
  opacity: 1;
}

.rank-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

.card-body {
  padding: 18px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.card-meta span,
.detail-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f5efe7;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 54px;
  margin: 12px 0 8px;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.5;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--amber-dark);
  background: var(--amber-soft);
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile,
.category-card-large a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(41, 37, 36, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.category-card-large a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.category-thumbs,
.category-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 132px;
  background: #292524;
}

.category-strip {
  grid-template-columns: repeat(5, 1fr);
  height: 168px;
}

.category-thumbs img,
.category-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-tile div:last-child,
.category-card-body {
  padding: 20px;
}

.category-tile h3,
.category-card-body h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.category-card-body span {
  color: var(--amber-dark);
  font-size: 13px;
  font-weight: 900;
}

.category-tile p,
.category-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1c1917, #78350f);
  color: white;
}

.compact-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
  padding: 78px 22px;
}

.compact-hero > div {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}

.compact-hero h1 {
  max-width: 850px;
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.compact-hero p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, 170px);
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(41, 37, 36, 0.07);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fffaf3;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 20px;
  color: var(--muted);
  background: var(--paper);
  text-align: center;
  font-weight: 800;
}

.empty-state.is-visible {
  display: block;
}

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

.ranking-row a {
  display: grid;
  grid-template-columns: 70px 92px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(41, 37, 36, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row a:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow);
}

.ranking-number {
  color: var(--amber);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.ranking-row img {
  width: 92px;
  height: 122px;
  object-fit: cover;
  border-radius: 16px;
  background: #292524;
}

.ranking-row h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.ranking-row p {
  margin: 0 0 12px;
  color: var(--muted);
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: white;
  background: #1c1917;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
  filter: blur(2px);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.94), rgba(12, 10, 9, 0.7)),
    linear-gradient(0deg, #1c1917, transparent 55%);
}

.detail-inner {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 22px 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  font-weight: 700;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  background: #292524;
}

.detail-copy h1 {
  margin: 20px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 830px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 19px;
}

.detail-meta span {
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.14);
}

.detail-tags {
  margin: 20px 0 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.34), rgba(0, 0, 0, 0.64));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.34);
  font-size: 36px;
}

.player-title {
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 900;
}

.player-state {
  position: absolute;
  left: 20px;
  bottom: 18px;
  min-height: 1px;
  color: white;
  font-size: 14px;
  font-weight: 800;
  pointer-events: none;
}

.player-state:empty {
  display: none;
}

.detail-text-section {
  padding-top: 0;
}

.detail-article {
  padding: 34px;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(41, 37, 36, 0.08);
}

.detail-article h2 {
  margin: 0 0 14px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

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

.detail-article p {
  margin: 0;
  color: var(--stone);
  font-size: 17px;
}

.site-footer {
  margin-top: 40px;
  background: #1c1917;
  color: rgba(255, 255, 255, 0.76);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
}

.footer-brand {
  color: white;
  font-size: 22px;
}

.footer-inner p {
  max-width: 620px;
  margin: 12px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-copy {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.46);
  font-size: 14px;
}

.js-movie-card.is-hidden {
  display: none;
}

@media (max-width: 1080px) {
  .hero-inner,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .detail-poster {
    max-width: 300px;
  }
}

@media (max-width: 760px) {
  .site-header-inner {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    border-radius: 14px;
    background: #fff7ed;
  }

  .hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    padding-top: 62px;
  }

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

  .btn {
    width: 100%;
  }

  .hero-slide {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .hero-slide img {
    width: 76px;
    height: 100px;
  }

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

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

  .card-poster,
  .movie-card-featured .card-poster {
    height: 238px;
  }

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

  .ranking-row a {
    grid-template-columns: 48px 74px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-row img {
    width: 74px;
    height: 98px;
  }

  .ranking-row h2 {
    font-size: 18px;
  }

  .detail-grid {
    gap: 28px;
  }

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

  .detail-article {
    padding: 24px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 460px) {
  .brand-text {
    font-size: 17px;
  }

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

  .card-poster,
  .movie-card-featured .card-poster {
    height: 330px;
  }
}
