:root {
  --bg: #fffaf0;
  --paper: #ffffff;
  --paper-soft: #fff7ed;
  --text: #26180c;
  --muted: #7c5b35;
  --primary: #d97706;
  --primary-dark: #92400e;
  --primary-soft: #fef3c7;
  --border: rgba(146, 64, 14, 0.14);
  --shadow: 0 20px 60px rgba(120, 53, 15, 0.14);
  --radius: 24px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.28), transparent 32rem),
    linear-gradient(180deg, #fff7ed 0%, #fffaf0 48%, #ffffff 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(146, 64, 14, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(146, 64, 14, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  z-index: -1;
}

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

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

main {
  min-height: 60vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.92), rgba(255, 237, 213, 0.92));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 36px rgba(146, 64, 14, 0.08);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(var(--max), calc(100% - 32px));
  height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: white;
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.35);
}

.brand-text {
  font-size: clamp(20px, 2.4vw, 28px);
  background: linear-gradient(90deg, #b45309, #ea580c);
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-nav a,
.nav-dropdown-panel a {
  font-weight: 700;
  color: #5f3a12;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-dark);
  background: rgba(245, 158, 11, 0.14);
}

.nav-dropdown {
  position: relative;
}

.nav-more {
  cursor: pointer;
  background: transparent;
  border: 0;
  font: inherit;
}

.nav-dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 210px;
  padding: 12px;
  display: none;
  grid-template-columns: 1fr;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.nav-dropdown:hover .nav-dropdown-panel {
  display: grid;
}

.nav-dropdown-panel a {
  padding: 8px 10px;
  border-radius: 12px;
}

.nav-dropdown-panel a:hover {
  background: var(--primary-soft);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.12);
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--primary-dark);
}

.mobile-nav {
  display: none;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-nav a {
  padding: 10px;
  background: var(--paper-soft);
  border-radius: 12px;
}

.hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 28px auto 36px;
  position: relative;
  min-height: clamp(560px, 68vw, 720px);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(120, 53, 15, 0.24);
  background: #1c1208;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  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-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.18);
  transform: scale(1.08);
  opacity: 0.62;
}

.hero-overlay {
  background:
    radial-gradient(circle at 75% 35%, rgba(251, 146, 60, 0.34), transparent 24rem),
    linear-gradient(90deg, rgba(28, 18, 8, 0.94), rgba(67, 32, 6, 0.72) 50%, rgba(154, 52, 18, 0.52));
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #b45309;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker {
  color: #fcd34d;
}

.hero h1 {
  max-width: 750px;
  margin: 18px 0;
  color: white;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero p {
  max-width: 700px;
  color: #ffedd5;
  font-size: clamp(16px, 2.2vw, 21px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  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, #ea580c);
  box-shadow: 0 14px 26px rgba(234, 88, 12, 0.34);
}

.btn.ghost {
  color: #fffbeb;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.btn.subtle {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: var(--border);
}

.hero-poster {
  justify-self: end;
  width: min(320px, 100%);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

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

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

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

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

.content-section,
.search-panel,
.filter-bar,
.breadcrumb,
.detail-hero,
.player-section,
.detail-content,
.page-hero {
  width: min(var(--max), calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.search-panel {
  margin-top: 24px;
  margin-bottom: 36px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(240px, 0.46fr) 1fr;
  gap: 22px;
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 8px 0 0;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.search-box {
  position: relative;
}

.search-box input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: white;
  color: var(--text);
  padding: 0 16px;
  font: inherit;
  outline: none;
}

.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(217, 119, 6, 0.55);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 20;
  display: none;
  max-height: 420px;
  overflow: auto;
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.search-results.open {
  display: block;
}

.search-results a {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.search-results a:last-child {
  border-bottom: 0;
}

.search-results img {
  width: 54px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--primary-soft);
}

.search-results strong {
  display: block;
  margin-bottom: 4px;
}

.search-results span {
  color: var(--muted);
  font-size: 13px;
}

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

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

.section-heading h2 {
  font-size: clamp(25px, 3vw, 42px);
}

.section-link,
.result-count {
  color: var(--primary-dark);
  font-weight: 900;
}

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

.category-tile,
.category-card,
.movie-card,
.rank-item,
.detail-content article,
.player-section,
.page-hero,
.filter-bar {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.category-tile {
  min-height: 170px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius);
}

.category-tile span,
.category-card h2 {
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong {
  color: var(--primary);
  font-size: 42px;
  line-height: 1;
}

.category-tile small,
.category-card p,
.movie-card p,
.rank-content p,
.detail-line,
.detail-content p,
.page-hero p {
  color: var(--muted);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

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

.poster-link img,
.detail-poster img,
.rank-poster img,
.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 0.28s ease;
}

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

.poster-badge,
.source-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  font-weight: 900;
}

.poster-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  min-width: 44px;
  min-height: 28px;
  padding: 4px 8px;
  box-shadow: 0 10px 18px rgba(154, 52, 18, 0.28);
}

.movie-card-body {
  padding: 14px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #9a5a13;
  font-size: 12px;
  font-weight: 800;
}

.movie-meta-line span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
}

.movie-card h3,
.rank-content h3 {
  margin: 10px 0 8px;
  line-height: 1.24;
  font-size: 18px;
}

.movie-card p {
  margin: 0 0 12px;
  font-size: 14px;
}

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #7c2d12;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 82px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 22px;
}

.rank-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  border-radius: 16px;
  font-size: 20px;
  font-weight: 900;
}

.rank-poster {
  width: 82px;
  height: 116px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--primary-soft);
}

.rank-content h3,
.rank-content p {
  margin-top: 8px;
  margin-bottom: 0;
}

.rank-score {
  color: var(--primary-dark);
  white-space: nowrap;
}

.page-hero {
  margin-top: 28px;
  padding: clamp(28px, 5vw, 62px);
  border-radius: 34px;
  background:
    radial-gradient(circle at 80% 20%, rgba(251, 146, 60, 0.28), transparent 24rem),
    linear-gradient(135deg, #fff7ed, #ffffff);
}

.page-hero h1 {
  max-width: 900px;
  font-size: clamp(34px, 5vw, 62px);
}

.page-hero p {
  max-width: 820px;
  font-size: 18px;
}

.filter-bar {
  margin-top: 26px;
  margin-bottom: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 180px 180px auto;
  gap: 12px;
  border-radius: var(--radius);
}

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

.category-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-thumbs img {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: var(--primary-soft);
}

.movie-index-list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}

.movie-index-list a {
  display: block;
  min-height: 72px;
  padding: 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  font-weight: 900;
}

.movie-index-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.breadcrumb {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 900;
}

.detail-hero {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 32px;
  align-items: center;
  padding: clamp(20px, 4vw, 42px);
  border-radius: 34px;
  background:
    radial-gradient(circle at 100% 0%, rgba(251, 146, 60, 0.22), transparent 26rem),
    linear-gradient(135deg, #fff7ed, #ffffff);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 28px;
  background: var(--primary-soft);
  box-shadow: 0 24px 62px rgba(120, 53, 15, 0.18);
}

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

.detail-line {
  max-width: 760px;
  font-size: 18px;
}

.detail-meta {
  margin: 24px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-meta div {
  padding: 12px;
  background: rgba(254, 243, 199, 0.55);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.detail-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.detail-meta dd {
  margin: 4px 0 0;
  font-weight: 900;
}

.player-section {
  margin-top: 34px;
  padding: 20px;
  border-radius: 32px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #0f0a05;
  aspect-ratio: 16 / 9;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(15, 10, 5, 0.18), rgba(15, 10, 5, 0.74));
  cursor: pointer;
}

.play-cover.hidden {
  display: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 18px 40px rgba(234, 88, 12, 0.38);
  font-size: 34px;
}

.play-cover strong {
  font-size: 24px;
}

.play-cover small {
  color: #ffedd5;
}

.source-pill {
  padding: 7px 12px;
}

.detail-content {
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.detail-content article {
  padding: 24px;
  border-radius: var(--radius);
}

.detail-content h2 {
  margin-top: 0;
  font-size: 24px;
}

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

.footer-grid {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 28px;
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: #fde68a;
}

.footer-grid p,
.footer-grid a {
  color: #ffedd5;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li {
  margin: 7px 0;
}

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

.is-hidden {
  display: none !important;
}

@media (max-width: 1060px) {
  .category-grid,
  .movie-grid.all-grid,
  .movie-grid.compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .rank-strip {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 48px 72px 1fr;
  }

  .rank-score {
    grid-column: 3;
  }

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

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

  .mobile-toggle {
    display: block;
  }

  .hero {
    min-height: 760px;
    border-radius: 26px;
  }

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

  .hero-poster {
    justify-self: start;
    width: min(210px, 70%);
  }

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

  .search-panel,
  .filter-bar,
  .detail-hero,
  .detail-content,
  .category-card {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .category-card-grid,
  .movie-grid,
  .movie-grid.all-grid,
  .movie-grid.compact-grid,
  .movie-index-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .rank-item {
    grid-template-columns: 42px 64px 1fr;
    gap: 10px;
  }

  .rank-poster {
    width: 64px;
    height: 92px;
  }
}

@media (max-width: 480px) {
  .category-grid,
  .category-card-grid,
  .movie-grid,
  .movie-grid.all-grid,
  .movie-grid.compact-grid,
  .movie-index-list {
    grid-template-columns: 1fr;
  }

  .mobile-nav.open {
    grid-template-columns: 1fr;
  }

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