:root {
  color-scheme: dark;
  --bg: #2b2419;
  --bg-deep: #1b150e;
  --panel: rgba(43, 36, 25, 0.78);
  --panel-solid: #3c3223;
  --line: rgba(245, 158, 11, 0.22);
  --line-soft: rgba(111, 95, 71, 0.46);
  --text: #fff7ed;
  --muted: #d6c7ae;
  --subtle: #9c8d74;
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.14), transparent 32rem),
    radial-gradient(circle at 85% 0%, rgba(111, 95, 71, 0.22), transparent 34rem),
    linear-gradient(180deg, #2b2419 0%, #211910 52%, #17120c 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(27, 21, 14, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 24px;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #1d1309;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.32);
}

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

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

.nav-link {
  padding: 10px 16px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(245, 158, 11, 0.12);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(60, 50, 35, 0.86);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--text);
}

.mobile-nav {
  display: none;
  padding: 0 24px 16px;
  border-top: 1px solid var(--line-soft);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: var(--muted);
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(27, 21, 14, 0.95), rgba(27, 21, 14, 0.7) 42%, rgba(27, 21, 14, 0.2)),
    linear-gradient(0deg, rgba(27, 21, 14, 1), rgba(27, 21, 14, 0.12) 46%, rgba(27, 21, 14, 0.4));
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: center;
  max-width: 1320px;
  min-height: 72vh;
  margin: 0 auto;
  padding: 84px 24px 98px;
}

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

.eyebrow,
.card-meta {
  color: var(--accent-2);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 14px 0 18px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.48));
}

.hero-actions,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  color: #fdecc8;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
}

.tag-list.small {
  gap: 7px;
  margin-top: 14px;
}

.tag-list.small span {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 12px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.primary-btn {
  color: #1d1309;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.26);
}

.ghost-btn {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(43, 36, 25, 0.66);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.primary-btn.full {
  width: 100%;
  margin-top: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 36px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  transition: 0.25s ease;
}

.hero-dot.is-active {
  width: 64px;
  background: var(--accent);
}

.hero-strip {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(27, 21, 14, 0.64);
}

.strip-inner {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 22px;
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px 24px;
}

.quick-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(43, 36, 25, 0.78);
}

.quick-search input,
.search-field input,
.filter-panel select {
  width: 100%;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
}

.quick-search input {
  padding: 0 12px;
}

.quick-search button {
  flex: 0 0 auto;
  color: #1d1309;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
}

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

.compact-card {
  position: relative;
  min-height: 86px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--panel-solid);
}

.compact-card img {
  width: 100%;
  height: 100%;
  min-height: 86px;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.35s ease;
}

.compact-card span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.82);
}

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

.content-section,
.page-shell,
.detail-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 74px 24px;
}

.page-shell,
.detail-shell {
  padding-top: 32px;
}

.no-top {
  padding-top: 28px;
}

.section-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
}

.section-title > span {
  width: 6px;
  height: 42px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.32);
}

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.2;
}

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

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

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background: var(--panel-solid);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

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

.category-tile::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(27, 21, 14, 0.12), rgba(27, 21, 14, 0.86));
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 1;
  display: block;
}

.category-tile span {
  margin-top: 72px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile small {
  max-width: 320px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.7;
}

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

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(60, 50, 35, 0.72);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.card-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #1b150e;
}

.card-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  color: #1d1309;
  border-radius: 999px;
  background: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #1d1309;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3,
.ranking-card h2 {
  margin: 8px 0;
  font-size: 17px;
  line-height: 1.35;
}

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

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

.rank-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background: rgba(27, 21, 14, 0.66);
  box-shadow: var(--shadow);
}

.rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.rank-head h2 {
  margin: 0;
  font-size: 24px;
}

.rank-head a {
  color: var(--accent-2);
  font-weight: 800;
}

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

.rank-list a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(111, 95, 71, 0.32);
  border-radius: 14px;
  background: rgba(60, 50, 35, 0.46);
}

.rank-list span {
  color: var(--accent-2);
  font-weight: 900;
}

.rank-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list em {
  color: var(--accent-2);
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 64px;
  border: 1px solid var(--line-soft);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(43, 36, 25, 0.92)),
    radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.18), transparent 26rem);
  box-shadow: var(--shadow);
}

.small-hero h1,
.category-hero h1 {
  font-size: clamp(38px, 5vw, 68px);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px 150px;
  gap: 12px;
  margin-bottom: 28px;
}

.search-field,
.filter-panel select {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(43, 36, 25, 0.72);
}

.search-field span {
  color: var(--accent-2);
  font-size: 24px;
}

.filter-panel select option {
  color: #1b150e;
}

.ranking-layout {
  display: grid;
  gap: 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 74px 118px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background: rgba(60, 50, 35, 0.68);
}

.ranking-index {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #1d1309;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  font-weight: 900;
}

.ranking-cover img {
  width: 118px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-card strong {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent-2);
  font-size: 20px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--subtle);
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb strong {
  color: var(--text);
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-info,
.copy-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background: rgba(27, 21, 14, 0.68);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050403;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  color: var(--text);
  border: 0;
  background: linear-gradient(180deg, rgba(27, 21, 14, 0.08), rgba(27, 21, 14, 0.64));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.play-icon {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  color: #1d1309;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 24px 70px rgba(245, 158, 11, 0.32);
  font-size: 34px;
}

.detail-info {
  padding: 22px;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin-bottom: 20px;
  border-radius: 20px;
}

.detail-info h1 {
  font-size: clamp(32px, 4vw, 48px);
}

.detail-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.copy-card {
  padding: 28px;
}

.copy-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.copy-card p {
  margin: 0;
  color: var(--muted);
  line-height: 2;
}

.site-footer {
  margin-top: 42px;
  border-top: 1px solid var(--line-soft);
  background: rgba(12, 9, 6, 0.58);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 34px 24px;
}

.footer-inner p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--subtle);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
}

.is-filtered-out {
  display: none !important;
}

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

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

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

  .hero-poster {
    display: none;
  }

  .rank-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 68vh;
  }

  .hero-content {
    padding: 64px 20px 92px;
  }

  .strip-inner,
  .filter-panel,
  .detail-copy {
    grid-template-columns: 1fr;
  }

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

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

  .page-hero {
    padding: 34px 24px;
  }

  .ranking-card {
    grid-template-columns: 52px 86px minmax(0, 1fr);
  }

  .ranking-index {
    width: 46px;
    height: 46px;
  }

  .ranking-cover img {
    width: 86px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .content-section,
  .page-shell,
  .detail-shell,
  .footer-inner {
    padding-right: 16px;
    padding-left: 16px;
  }

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

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

  .quick-search {
    border-radius: 18px;
    flex-direction: column;
  }

  .quick-search button {
    width: 100%;
  }
}
