:root {
  color-scheme: light;
  --stone-950: #0c0a09;
  --stone-900: #1c1917;
  --stone-800: #292524;
  --stone-700: #44403c;
  --stone-600: #57534e;
  --stone-300: #d6d3d1;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --stone-50: #fafaf9;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-200: #fde68a;
  --orange-500: #f97316;
  --white: #ffffff;
  --shadow-soft: 0 20px 55px rgba(28, 25, 23, 0.16);
  --shadow-card: 0 18px 45px rgba(28, 25, 23, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fffbeb 0%, #fafaf9 38%, #f5f5f4 100%);
  color: var(--stone-800);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(28, 25, 23, 0.88);
  color: var(--white);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(251, 191, 36, 0.16);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  color: var(--stone-950);
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.34);
}

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

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.74);
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-200);
  background: rgba(245, 158, 11, 0.16);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--white);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
  background: rgba(28, 25, 23, 0.96);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.hero {
  position: relative;
  min-height: 70vh;
  height: 720px;
  max-height: 820px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--stone-950), #451a03 46%, var(--stone-900));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  filter: blur(10px) saturate(1.15);
  opacity: 0.42;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(245, 158, 11, 0.24), transparent 34%),
    linear-gradient(90deg, rgba(12, 10, 9, 0.94), rgba(28, 25, 23, 0.76) 48%, rgba(12, 10, 9, 0.42));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 86px 24px 130px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 52px;
}

.hero-copy {
  max-width: 780px;
  color: var(--white);
}

.hero-badge,
.detail-label,
.page-hero span,
.section-head span,
.search-panel span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: var(--amber-200);
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
  font-size: 14px;
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.detail-meta span {
  color: var(--stone-200);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 6px 10px;
}

.hero-meta span:first-child,
.detail-meta span:first-child {
  color: var(--stone-950);
  background: var(--amber-400);
  font-weight: 900;
}

.hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.85;
}

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

.btn,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn:hover,
.hero-search button:hover,
.movie-card:hover,
.category-tile:hover {
  transform: translateY(-3px);
}

.btn.primary,
.hero-search button {
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  color: var(--stone-950);
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.28);
}

.btn.ghost {
  color: var(--amber-200);
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.hero-search {
  display: flex;
  max-width: 650px;
  margin: 26px 0 18px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  backdrop-filter: blur(18px);
}

.hero-search input,
.inline-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  padding: 0 16px;
}

.hero-search input::placeholder,
.inline-search input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.hero-cats a {
  color: rgba(255, 255, 255, 0.78);
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-cats a:hover {
  color: var(--amber-200);
  background: rgba(245, 158, 11, 0.2);
}

.hero-poster {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  min-height: 510px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  isolation: isolate;
}

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

.hero-poster span {
  position: absolute;
  left: 22px;
  bottom: 22px;
  color: var(--white);
  background: rgba(12, 10, 9, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 10px 14px;
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero-thumbs {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: min(1240px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.hero-thumb {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: var(--white);
  background: rgba(12, 10, 9, 0.42);
  backdrop-filter: blur(14px);
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
}

.hero-thumb.active {
  border-color: rgba(251, 191, 36, 0.8);
  background: rgba(245, 158, 11, 0.22);
}

.hero-thumb img {
  width: 46px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
  flex: 0 0 auto;
}

.hero-thumb span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.main-shell,
.detail-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.main-shell {
  padding: 56px 0;
}

.page-shell {
  padding-top: 34px;
}

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

.section-head h2,
.search-panel h2,
.page-hero h1 {
  margin: 10px 0 0;
  color: var(--stone-800);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-more {
  color: var(--amber-700);
  font-weight: 800;
}

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

.feature-grid {
  margin-bottom: 50px;
}

.movie-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(120, 113, 108, 0.14);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  box-shadow: 0 24px 60px rgba(28, 25, 23, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  background: linear-gradient(135deg, var(--stone-900), #451a03);
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(180deg, transparent, rgba(12, 10, 9, 0.78));
}

.score,
.rank-no {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.score {
  right: 12px;
  color: var(--stone-950);
  background: var(--amber-400);
  padding: 6px 9px;
}

.rank-no {
  left: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(12, 10, 9, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.movie-info {
  padding: 16px;
}

.movie-title {
  display: block;
  color: var(--stone-900);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 8px;
}

.movie-meta {
  color: var(--stone-600);
  font-size: 13px;
  margin-bottom: 10px;
}

.movie-meta span {
  position: relative;
}

.movie-meta span + span::before {
  content: "·";
  margin-right: 10px;
  color: var(--stone-300);
}

.movie-info p {
  color: var(--stone-600);
  line-height: 1.65;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span,
.detail-tags span {
  color: var(--amber-700);
  background: rgba(245, 158, 11, 0.11);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.search-panel {
  margin: 34px 0;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.82), rgba(255, 237, 213, 0.78));
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 460px);
  gap: 20px;
  align-items: center;
}

.inline-search {
  min-height: 54px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(120, 113, 108, 0.14);
  display: flex;
  align-items: center;
  color: var(--stone-800);
}

.inline-search input::placeholder {
  color: var(--stone-600);
}

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

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

.category-tile {
  position: relative;
  min-height: 230px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
  box-shadow: var(--shadow-card);
}

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

.category-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(12, 10, 9, 0.12), rgba(12, 10, 9, 0.86)),
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.42), transparent 40%);
}

.category-tile div {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-tile p,
.category-tile small {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.channel-block {
  margin-top: 54px;
  padding: 26px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(120, 113, 108, 0.12);
  box-shadow: var(--shadow-card);
}

.channel-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.channel-title span {
  width: 5px;
  height: 28px;
  border-radius: 999px;
  background: var(--amber-600);
}

.channel-title h3 {
  margin: 0;
  font-size: 26px;
}

.channel-title a {
  margin-left: auto;
  color: var(--amber-700);
  font-weight: 800;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 48px;
  margin-bottom: 32px;
  color: var(--stone-800);
  background:
    radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.32), transparent 28%),
    linear-gradient(135deg, rgba(255, 251, 235, 0.94), rgba(255, 237, 213, 0.88));
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 24px;
  align-items: center;
}

.slim-hero,
.ranking-hero,
.search-hero {
  grid-template-columns: 1fr;
}

.page-hero p {
  max-width: 760px;
  color: var(--stone-600);
  font-size: 18px;
  line-height: 1.8;
}

.page-search {
  margin: 0;
  background: rgba(28, 25, 23, 0.08);
}

.page-search input::placeholder {
  color: var(--stone-600);
}

.big-search {
  min-height: 64px;
}

.detail-shell {
  padding: 30px 0 60px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--stone-600);
  margin-bottom: 22px;
}

.breadcrumb a {
  color: var(--amber-700);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  min-height: 510px;
  background: var(--stone-950);
  box-shadow: var(--shadow-soft);
  margin-bottom: 28px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(12px) saturate(1.12);
  transform: scale(1.06);
  opacity: 0.38;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(245, 158, 11, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(12, 10, 9, 0.94), rgba(28, 25, 23, 0.66));
}

.detail-layout {
  position: relative;
  z-index: 2;
  min-height: 510px;
  padding: 42px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  color: var(--white);
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
}

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

.detail-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.detail-copy p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.detail-copy .btn {
  margin-top: 24px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: var(--stone-950);
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-soft);
  margin-bottom: 32px;
}

.video-el {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--white);
  border: 0;
  background: linear-gradient(180deg, rgba(12, 10, 9, 0.18), rgba(12, 10, 9, 0.68));
  cursor: pointer;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 24px 45px rgba(245, 158, 11, 0.34);
  position: relative;
}

.play-icon::after {
  content: "";
  position: absolute;
  left: 34px;
  top: 25px;
  border-left: 22px solid var(--stone-950);
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
}

.player-start strong {
  font-size: 20px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.story-card,
.info-card {
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(120, 113, 108, 0.14);
  box-shadow: var(--shadow-card);
  padding: 28px;
}

.story-card + .story-card {
  margin-top: 24px;
}

.story-card h2,
.info-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.story-card p {
  margin: 0;
  color: var(--stone-700);
  line-height: 1.95;
  font-size: 17px;
}

.info-card dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 0 0 18px;
}

.info-card dt {
  color: var(--stone-600);
  font-weight: 800;
}

.info-card dd {
  margin: 0;
  color: var(--stone-800);
}

.related-shell {
  width: 100%;
  padding-bottom: 0;
}

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

.site-footer {
  background: var(--stone-950);
  color: rgba(255, 255, 255, 0.75);
  padding: 38px 0;
  margin-top: 34px;
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.footer-brand {
  color: var(--white);
  font-size: 20px;
}

.footer-links a {
  color: var(--amber-200);
  font-weight: 800;
}

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

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

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

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

  .hero-poster,
  .hero-poster img {
    min-height: 420px;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    height: auto;
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 56px 20px 168px;
    gap: 26px;
  }

  .hero-poster {
    display: none;
  }

  .hero-search,
  .search-panel,
  .page-hero {
    grid-template-columns: 1fr;
  }

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

  .hero-thumb:nth-child(n + 4) {
    display: none;
  }

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

  .detail-layout {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .detail-poster {
    width: min(280px, 100%);
  }

  .detail-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner {
    padding: 0 16px;
  }

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

  .hero h1 {
    font-size: 42px;
  }

  .hero-meta,
  .detail-meta {
    gap: 7px;
  }

  .hero-search {
    border-radius: 22px;
    align-items: stretch;
    flex-direction: column;
  }

  .hero-search input {
    min-height: 44px;
  }

  .hero-thumbs {
    grid-template-columns: 1fr;
  }

  .hero-thumb:nth-child(n + 2) {
    display: none;
  }

  .main-shell,
  .detail-shell {
    width: min(100% - 20px, 1280px);
  }

  .movie-grid,
  .mini-grid,
  .related-grid,
  .category-grid,
  .category-grid.large {
    gap: 14px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-title {
    font-size: 16px;
  }

  .movie-info p,
  .tag-row {
    display: none;
  }

  .page-hero,
  .search-panel,
  .channel-block,
  .story-card,
  .info-card {
    padding: 22px;
    border-radius: 22px;
  }

  .detail-hero,
  .player-card {
    border-radius: 22px;
  }
}
