:root {
  --bg: #fff7ed;
  --paper: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: rgba(180, 83, 9, 0.16);
  --brand: #d97706;
  --brand-dark: #92400e;
  --brand-soft: #fef3c7;
  --accent: #ea580c;
  --shadow: 0 24px 70px rgba(146, 64, 14, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(253, 230, 138, 0.72), transparent 34rem),
    linear-gradient(135deg, #fffbeb 0%, #fff7ed 52%, #fef3c7 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(180, 83, 9, 0.14);
  background: rgba(255, 251, 235, 0.88);
  backdrop-filter: blur(18px);
}

.nav-wrap,
.mobile-nav,
.footer-inner,
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-dark);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 30px rgba(217, 119, 6, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(180, 83, 9, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
}

.desktop-nav a,
.mobile-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: #7c2d12;
  font-size: 15px;
  font-weight: 700;
  transition: 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

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

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

.mobile-nav {
  display: none;
  padding: 0 0 16px;
}

main {
  padding-bottom: 64px;
}

.hero {
  position: relative;
  min-height: 620px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid rgba(180, 83, 9, 0.16);
  border-radius: 34px;
  background: #1f2937;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 36px;
  align-items: center;
  padding: 64px;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(1.08) contrast(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(31, 41, 55, 0.92), rgba(31, 41, 55, 0.66) 48%, rgba(120, 53, 15, 0.62)),
    radial-gradient(circle at 72% 28%, rgba(251, 191, 36, 0.32), transparent 25rem);
}

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

.eyebrow,
.section-head span,
.page-hero p {
  color: #fbbf24;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 16px 0;
  color: #fff7ed;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  color: #fed7aa;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags {
  margin: 24px 0 30px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(253, 230, 138, 0.42);
  border-radius: 999px;
  color: #7c2d12;
  background: rgba(255, 251, 235, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.hero-actions,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.btn:hover,
.home-search button:hover {
  transform: translateY(-2px);
}

.btn.primary,
.home-search button {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 16px 30px rgba(234, 88, 12, 0.28);
}

.btn.secondary {
  color: #fff7ed;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.13);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border: 8px solid rgba(255, 251, 235, 0.2);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
}

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

.hero-dots {
  position: absolute;
  z-index: 4;
  right: 52px;
  bottom: 38px;
  display: flex;
  gap: 9px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

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

.quick-search,
.section-block,
.page-hero,
.detail-hero,
.player-section {
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 48px rgba(146, 64, 14, 0.08);
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 480px);
  gap: 24px;
  align-items: center;
  padding: 28px;
}

.quick-search h2,
.section-head h2,
.page-hero h1,
.detail-copy h1,
.detail-text h2,
.player-section h2 {
  color: #7c2d12;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.quick-search h2,
.section-head h2,
.detail-text h2,
.player-section h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.quick-search p,
.page-hero-text,
.detail-copy .lead,
.detail-text p,
.category-card-large strong,
.category-tile em,
.movie-info p {
  color: var(--muted);
  line-height: 1.8;
}

.home-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(180, 83, 9, 0.16);
  border-radius: 999px;
  background: #fff7ed;
}

.home-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.home-search input {
  padding: 0 16px;
}

.section-block,
.player-section {
  padding: 28px;
}

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

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

.compact-head {
  margin-bottom: 16px;
}

.category-grid,
.category-large-grid {
  display: grid;
  gap: 18px;
}

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

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

.category-tile,
.category-card-large {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: 22px;
  background: #111827;
  box-shadow: 0 16px 34px rgba(146, 64, 14, 0.12);
}

.category-card-large {
  min-height: 260px;
}

.category-tile img,
.category-card-large img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  transition: transform 0.3s ease;
}

.category-tile:hover img,
.category-card-large:hover img {
  transform: scale(1.06);
}

.category-tile::after,
.category-card-large::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.2), rgba(120, 53, 15, 0.86));
}

.category-tile span,
.category-tile em,
.category-card-large span,
.category-card-large strong {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0 18px;
}

.category-tile span,
.category-card-large span {
  margin-top: 82px;
  color: #fff7ed;
  font-size: 24px;
  font-weight: 950;
}

.category-card-large span {
  margin-top: 150px;
  font-size: 30px;
}

.category-tile em,
.category-card-large strong {
  margin-top: 8px;
  color: #fed7aa;
  font-style: normal;
  font-weight: 600;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(180, 83, 9, 0.13);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(146, 64, 14, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(146, 64, 14, 0.16);
}

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

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  color: white;
  background: rgba(124, 45, 18, 0.78);
  font-size: 12px;
  font-weight: 900;
}

.movie-info {
  padding: 14px;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.movie-info h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 8px 0;
  overflow: hidden;
  color: #7c2d12;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 950;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-info p {
  display: -webkit-box;
  min-height: 42px;
  margin-bottom: 12px;
  overflow: hidden;
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card.compact {
  display: grid;
  grid-template-columns: 92px 1fr;
}

.movie-card.compact .poster-link img {
  height: 100%;
}

.movie-card.compact .movie-info h3 {
  min-height: auto;
}

.movie-card.compact .tag-row {
  display: none;
}

.split-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 30px;
}

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

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

.rank-item a {
  display: grid;
  grid-template-columns: 48px 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(180, 83, 9, 0.13);
  border-radius: 18px;
  background: rgba(255, 251, 235, 0.78);
}

.rank-no {
  color: var(--accent);
  font-size: 22px;
  font-weight: 950;
}

.rank-item img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--brand-soft);
}

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

.rank-body strong {
  color: #7c2d12;
  font-size: 17px;
  font-weight: 950;
}

.rank-body em {
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

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

.page-hero {
  padding: 52px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.28), transparent 20rem),
    linear-gradient(135deg, #78350f, #92400e 45%, #ea580c);
}

.page-hero h1 {
  margin: 8px 0 10px;
  color: white;
  font-size: clamp(38px, 5vw, 64px);
}

.page-hero-text {
  max-width: 760px;
  color: #ffedd5;
  font-size: 18px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  color: #fed7aa;
  font-size: 14px;
  font-weight: 800;
}

.crumbs a {
  color: #fff7ed;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 14px;
  margin-bottom: 22px;
}

.filter-panel label {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(180, 83, 9, 0.15);
  border-radius: 18px;
  background: #fff7ed;
}

.filter-panel span {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.filter-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border-radius: 18px;
  color: var(--muted);
  background: #fff7ed;
  text-align: center;
}

.detail-hero {
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.24), transparent 24rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 247, 237, 0.94));
}

.detail-hero .crumbs {
  margin: 0 0 24px;
  color: var(--muted);
}

.detail-hero .crumbs a {
  color: var(--brand-dark);
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: var(--brand-soft);
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  margin: 10px 0 16px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
}

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

.detail-tags {
  margin: 22px 0;
}

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

.meta-list div {
  padding: 14px;
  border: 1px solid rgba(180, 83, 9, 0.13);
  border-radius: 18px;
  background: rgba(255, 251, 235, 0.75);
}

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

.meta-list dd {
  margin: 4px 0 0;
  color: #7c2d12;
  font-weight: 900;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #111827;
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.24);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background:
    radial-gradient(circle, rgba(217, 119, 6, 0.36), transparent 18rem),
    rgba(17, 24, 39, 0.48);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 56px;
  padding: 0 26px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 18px 48px rgba(234, 88, 12, 0.32);
}

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

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.detail-text article {
  padding: 22px;
  border-radius: 20px;
  background: #fff7ed;
}

.detail-text h2 {
  margin-bottom: 12px;
  font-size: 28px;
}

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

.site-footer {
  border-top: 1px solid rgba(180, 83, 9, 0.14);
  background: rgba(255, 251, 235, 0.78);
}

.footer-inner {
  display: grid;
  grid-template-columns: 240px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 30px 0;
}

.footer-inner p {
  color: var(--muted);
  line-height: 1.8;
}

.footer-links a {
  color: var(--brand-dark);
  font-weight: 900;
}

@media (max-width: 1180px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 34px;
  }

  .hero-poster {
    width: min(260px, 80%);
  }

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

  .category-large-grid,
  .full-ranking {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .nav-wrap,
  .mobile-nav,
  .footer-inner,
  main {
    width: min(100% - 20px, 1180px);
  }

  .brand {
    font-size: 19px;
  }

  .hero {
    min-height: 700px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 24px;
  }

  .hero h1,
  .hero h2 {
    font-size: 38px;
  }

  .hero p {
    font-size: 15px;
  }

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

  .section-block,
  .page-hero,
  .detail-hero,
  .player-section,
  .quick-search {
    padding: 20px;
    border-radius: 20px;
  }

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

  .movie-card.compact {
    grid-template-columns: 1fr;
  }

  .rank-item a {
    grid-template-columns: 40px 58px 1fr;
  }

  .rank-item img {
    width: 58px;
    height: 78px;
  }

  .meta-list {
    grid-template-columns: 1fr;
  }

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