:root {
  color-scheme: light;
  --stone-950: #1c1917;
  --stone-900: #292524;
  --stone-800: #44403c;
  --stone-700: #57534e;
  --stone-600: #78716c;
  --stone-500: #a8a29e;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --stone-50: #fafaf9;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-300: #fcd34d;
  --orange-700: #c2410c;
  --red-900: #7f1d1d;
  --red-600: #dc2626;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(41, 37, 36, 0.16);
  --shadow-soft: 0 12px 30px rgba(41, 37, 36, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--stone-800);
  background: var(--stone-50);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--white);
  background: linear-gradient(90deg, #78350f 0%, var(--orange-700) 48%, var(--red-900) 100%);
  box-shadow: 0 14px 35px rgba(120, 53, 15, 0.32);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #78350f;
  background: var(--amber-500);
  box-shadow: inset 0 -8px 15px rgba(120, 53, 15, 0.18);
  transition: transform 0.2s ease, background 0.2s ease;
}

.brand:hover .brand-icon {
  transform: rotate(-4deg) scale(1.04);
  background: var(--amber-300);
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 24px;
  letter-spacing: 0.04em;
}

.brand-copy em {
  color: #fde68a;
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fde68a;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 3px;
  border-radius: 99px;
  background: #fde68a;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 295px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.header-search input,
.mobile-search input,
.filter-input {
  min-width: 0;
  border: 0;
  outline: 0;
}

.header-search input {
  flex: 1;
  color: var(--white);
  background: transparent;
  padding: 9px 10px 9px 16px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-600);
  padding: 9px 16px;
  font-weight: 800;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover {
  background: var(--amber-700);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 16px 18px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.mobile-panel nav a {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 12px 16px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #78350f 52%, #7f1d1d 100%);
}

.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-image {
  position: absolute;
  inset: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  transform: scale(1.04);
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 1) 0%, rgba(15, 23, 42, 0.58) 54%, rgba(15, 23, 42, 0.06) 100%);
}

.hero-content {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 600px;
  max-width: 760px;
  color: var(--white);
  padding: 70px 0;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-600);
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 25px rgba(217, 119, 6, 0.25);
}

.hero h1,
.hero h2 {
  margin: 18px 0 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 740px;
  margin: 24px 0 0;
  color: #e7e5e4;
  font-size: clamp(17px, 2.1vw, 22px);
}

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

.hero-meta {
  margin-top: 28px;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.12);
  padding: 8px 13px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

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

.primary-btn,
.secondary-btn,
.inline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--white);
  background: var(--amber-600);
  padding: 14px 28px;
  box-shadow: 0 16px 30px rgba(217, 119, 6, 0.32);
}

.primary-btn:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--amber-700);
  box-shadow: 0 20px 40px rgba(217, 119, 6, 0.40);
}

.secondary-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  padding: 14px 24px;
  backdrop-filter: blur(10px);
}

.secondary-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.24);
}

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

.hero-dot {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.2s ease, width 0.2s ease;
}

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

.category-strip {
  background: var(--stone-100);
  padding: 28px 0;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.pill-row a,
.movie-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.pill-row a {
  color: var(--stone-700);
  background: var(--white);
  padding: 11px 20px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.pill-row a:hover {
  color: var(--white);
  background: var(--amber-600);
  transform: translateY(-2px);
}

.section {
  padding: 64px 0;
}

.section-soft {
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
}

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

.section-title h2,
.section-title h1 {
  margin: 12px 0 0;
  color: var(--stone-800);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-title p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--stone-600);
  font-size: 17px;
}

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

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

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

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--stone-900);
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.1);
}

.cover-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent 56%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .cover-glow {
  opacity: 1;
}

.play-chip,
.rank-badge {
  position: absolute;
  color: var(--white);
  font-weight: 900;
  border-radius: 999px;
}

.play-chip {
  right: 14px;
  bottom: 14px;
  background: rgba(0, 0, 0, 0.62);
  padding: 6px 10px;
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.rank-badge {
  top: 14px;
  right: 14px;
  background: var(--red-600);
  padding: 5px 11px;
  font-size: 12px;
}

.movie-body {
  padding: 20px;
}

.movie-meta-line {
  color: var(--stone-500);
  font-size: 13px;
  font-weight: 800;
}

.movie-meta-line span + span::before,
.detail-meta span + span::before,
.ranking-meta span + span::before {
  content: "•";
  margin-right: 10px;
  color: var(--stone-500);
}

.movie-card h3 {
  margin: 9px 0 8px;
  color: var(--stone-800);
  font-size: 20px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card h3 a:hover {
  color: var(--amber-600);
}

.movie-card p {
  display: -webkit-box;
  min-height: 53px;
  margin: 0;
  overflow: hidden;
  color: var(--stone-600);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-tags {
  margin-top: 14px;
}

.movie-tags span {
  color: var(--stone-600);
  background: var(--stone-100);
  padding: 4px 9px;
  font-size: 12px;
}

.movie-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: var(--stone-500);
  font-size: 13px;
  font-weight: 800;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 28px;
  align-items: start;
}

.ranking-panel,
.side-panel,
.filter-panel,
.category-card,
.detail-panel,
.player-shell,
.search-empty {
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.ranking-panel,
.side-panel,
.filter-panel,
.detail-panel,
.search-empty {
  padding: 24px;
}

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

.ranking-row,
.small-movie {
  display: grid;
  align-items: center;
  border-radius: 18px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ranking-row {
  grid-template-columns: 56px 126px minmax(0, 1fr) auto;
  gap: 18px;
  padding: 14px;
  background: var(--stone-50);
}

.ranking-row:hover,
.small-movie:hover {
  transform: translateX(3px);
  background: #fff7ed;
}

.ranking-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--red-600));
  font-weight: 900;
}

.ranking-row img {
  width: 126px;
  height: 74px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-row h3 {
  margin: 0 0 5px;
  font-size: 20px;
  line-height: 1.3;
}

.ranking-meta {
  color: var(--stone-500);
  font-size: 13px;
  font-weight: 800;
}

.ranking-score {
  color: var(--amber-600);
  font-size: 22px;
  font-weight: 900;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -90px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(220, 38, 38, 0.16));
}

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

.category-card h2 {
  position: relative;
  margin: 0 0 10px;
  color: var(--stone-800);
  font-size: 28px;
  font-weight: 900;
}

.category-card p {
  position: relative;
  color: var(--stone-600);
}

.category-preview {
  position: relative;
  display: grid;
  gap: 8px;
  margin: 18px 0 22px;
}

.category-preview a {
  color: var(--stone-700);
  font-weight: 800;
}

.category-preview a:hover {
  color: var(--amber-600);
}

.inline-btn {
  color: var(--white);
  background: var(--amber-600);
  padding: 10px 18px;
}

.inline-btn:hover {
  background: var(--amber-700);
  transform: translateY(-1px);
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 30px;
}

.filter-input,
.filter-select {
  border: 2px solid var(--stone-200);
  border-radius: 999px;
  color: var(--stone-700);
  background: var(--white);
  padding: 12px 16px;
}

.filter-input {
  flex: 1 1 280px;
}

.filter-select {
  flex: 0 0 auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  color: var(--stone-500);
  font-weight: 800;
}

.breadcrumb a:hover {
  color: var(--amber-600);
}

.detail-hero {
  color: var(--white);
  background: linear-gradient(135deg, #0f172a, #78350f 55%, #7f1d1d);
  padding: 50px 0;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.35);
}

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

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

.detail-copy p {
  color: #e7e5e4;
  font-size: 19px;
}

.detail-meta {
  margin-bottom: 14px;
  color: #fde68a;
  font-weight: 900;
}

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

.detail-tags span {
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.14);
  padding: 7px 12px;
}

.watch-section {
  padding: 56px 0 28px;
  background: var(--stone-950);
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.35);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.64));
  transition: opacity 0.2s ease;
}

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

.player-button {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--amber-600);
  box-shadow: 0 18px 45px rgba(217, 119, 6, 0.42);
  font-size: 38px;
  transform: translateZ(0);
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-overlay:hover .player-button {
  background: var(--amber-700);
  transform: scale(1.08);
}

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

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

.detail-panel h2,
.side-panel h2,
.ranking-panel h2 {
  margin: 0 0 16px;
  color: var(--stone-800);
  font-size: 26px;
  font-weight: 900;
}

.detail-panel p {
  color: var(--stone-700);
  font-size: 17px;
}

.detail-panel p + h2 {
  margin-top: 30px;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.info-item {
  border-radius: 16px;
  background: var(--stone-50);
  padding: 14px;
}

.info-item strong {
  display: block;
  color: var(--stone-500);
  font-size: 13px;
}

.info-item span {
  color: var(--stone-800);
  font-weight: 900;
}

.small-movie {
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
}

.small-movie img {
  width: 70px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}

.small-movie strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--stone-800);
  line-height: 1.32;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.small-movie em {
  display: block;
  margin-top: 4px;
  color: var(--stone-500);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.small-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: var(--white);
  background: var(--amber-600);
  font-size: 13px;
  font-weight: 900;
}

.small-movie .small-rank + img {
  display: none;
}

.search-empty {
  display: none;
  text-align: center;
  color: var(--stone-600);
  font-size: 18px;
}

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

.site-footer {
  color: #e7e5e4;
  background: var(--stone-950);
  padding: 52px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(180px, 0.7fr) minmax(200px, 0.8fr);
  gap: 30px;
}

.footer-brand {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--white);
  font-size: 26px;
  font-weight: 900;
}

.site-footer p {
  max-width: 540px;
  color: var(--stone-500);
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  color: var(--stone-500);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--amber-300);
}

.footer-bottom {
  margin-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  text-align: center;
  color: var(--stone-500);
}

@media (max-width: 980px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .movie-grid,
  .movie-grid.compact,
  .feature-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .ranking-row {
    grid-template-columns: 44px 92px minmax(0, 1fr);
  }

  .ranking-score {
    grid-column: 3;
    font-size: 18px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .header-inner {
    min-height: 66px;
  }

  .brand-copy strong {
    font-size: 20px;
  }

  .hero,
  .hero-content {
    min-height: 540px;
  }

  .hero-actions,
  .section-head,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn,
  .inline-btn {
    width: 100%;
  }

  .section {
    padding: 46px 0;
  }

  .movie-grid,
  .movie-grid.compact {
    gap: 18px;
  }

  .movie-card {
    border-radius: 20px;
  }

  .ranking-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .ranking-row img {
    display: none;
  }

  .ranking-score {
    grid-column: 2;
  }

  .detail-hero {
    padding: 36px 0;
  }

  .detail-copy h1 {
    font-size: 36px;
  }

  .detail-content,
  .detail-layout {
    gap: 22px;
  }

  .player-button {
    width: 76px;
    height: 76px;
    font-size: 30px;
  }

  .info-table {
    grid-template-columns: 1fr;
  }
}
