:root {
  --color-amber: #f59e0b;
  --color-amber-dark: #78350f;
  --color-orange: #c2410c;
  --color-rose: #881337;
  --color-teal: #0d9488;
  --color-cyan: #0891b2;
  --color-slate: #0f172a;
  --color-muted: #64748b;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --radius-lg: 1.25rem;
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #fff7ed 52%, #fff1f2 100%);
  color: #1e293b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  padding-top: 74px;
}

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

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.92), rgba(154, 52, 18, 0.92));
  color: #fff7ed;
  transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.is-scrolled {
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.98), rgba(154, 52, 18, 0.98));
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, #fde68a, #f59e0b 58%, #c2410c);
  color: #451a03;
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.55);
}

.brand-text {
  background: linear-gradient(90deg, #fde68a, #fff7ed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  position: relative;
  font-weight: 700;
  color: #fff7ed;
  opacity: 0.9;
  padding: 6px 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: #fcd34d;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

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

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

.nav-toggle {
  display: none;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff7ed;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 18px;
}

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

.mobile-nav .nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(120, 53, 15, 0.42);
}

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  background: linear-gradient(135deg, #78350f, #9a3412 48%, #881337);
  color: #fff7ed;
}

.hero-slide {
  display: none;
  min-height: 650px;
  position: relative;
}

.hero-slide.is-active {
  display: block;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.28), transparent 34%), radial-gradient(circle at 82% 28%, rgba(20, 184, 166, 0.22), transparent 26%), rgba(0, 0, 0, 0.26);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: blur(2px) saturate(1.08);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 48px;
  min-height: 650px;
  padding: 70px 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(253, 230, 138, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  color: #fde68a;
  font-weight: 800;
}

.hero-title {
  margin: 0 0 20px;
  font-size: clamp(2.55rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-highlight {
  display: block;
  color: #fde68a;
}

.hero-copy {
  max-width: 680px;
  margin: 0 0 28px;
  color: #ffedd5;
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: #f59e0b;
  color: white;
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.32);
}

.button-primary:hover {
  background: #fbbf24;
  box-shadow: 0 22px 42px rgba(245, 158, 11, 0.42);
}

.button-soft {
  background: rgba(255, 255, 255, 0.16);
  color: #fff7ed;
  border: 1px solid rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(12px);
}

.button-ghost {
  background: #fff7ed;
  color: #9a3412;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffedd5;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-poster-wrap {
  position: relative;
  justify-self: end;
  width: min(360px, 100%);
}

.hero-poster-glow {
  position: absolute;
  inset: -22px;
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.45), rgba(20, 184, 166, 0.2));
  filter: blur(24px);
}

.hero-poster {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 3 / 4.25;
  object-fit: cover;
  border-radius: 30px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.38);
}

.hero-search-panel {
  position: relative;
  z-index: 3;
  margin: -56px auto 0;
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-card);
}

.hero-search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.search-input,
.select-input {
  width: 100%;
  min-height: 48px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 0 16px;
  background: #fff;
  color: #0f172a;
  outline: none;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus,
.select-input:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #f59e0b;
}

.section {
  padding: 72px 0;
}

.section-white {
  background: #fff;
}

.section-soft {
  background: linear-gradient(135deg, #f8fafc, #fff7ed);
}

.section-dark {
  background: linear-gradient(135deg, #0f172a, #1e293b 52%, #111827);
  color: #f8fafc;
}

.section-rose {
  background: linear-gradient(135deg, #ffe4e6, #fdf2f8);
}

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

.section-title {
  margin: 0 0 8px;
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 900;
  color: #1e293b;
  letter-spacing: -0.03em;
}

.section-dark .section-title {
  color: #fff7ed;
}

.section-subtitle {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.section-dark .section-subtitle {
  color: #cbd5e1;
}

.stats-bar {
  background: linear-gradient(90deg, #0d9488, #0891b2);
  color: white;
  padding: 38px 0;
}

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

.stat-card {
  text-align: center;
  padding: 12px;
}

.stat-value {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 900;
  margin-bottom: 6px;
}

.stat-label {
  color: #cffafe;
  font-weight: 700;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

.card-link {
  display: block;
  height: 100%;
}

.card-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #78350f, #0f172a);
}

.card-cover.landscape {
  aspect-ratio: 16 / 10;
}

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

.movie-card:hover .card-cover img,
.rank-card:hover .rank-cover img,
.related-card:hover img {
  transform: scale(1.08);
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.95);
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 8px;
  color: #0d9488;
  font-size: 0.82rem;
  font-weight: 800;
}

.card-title {
  margin: 0 0 9px;
  color: #1e293b;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.35;
}

.card-copy {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.65;
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-1 {
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
}

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

.category-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(135deg, #fff, #fff7ed);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.16);
}

.category-name {
  margin: 0 0 12px;
  color: #1e293b;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-desc {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.rank-list {
  display: grid;
  gap: 16px;
}

.rank-card {
  display: grid;
  grid-template-columns: 82px 168px 1fr auto;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  color: #1e293b;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e11d48, #f59e0b);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 900;
}

.rank-cover {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

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

.rank-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 900;
}

.rank-copy {
  margin: 0;
  color: #64748b;
  line-height: 1.65;
}

.page-hero {
  padding: 82px 0 54px;
  background: linear-gradient(135deg, #78350f, #c2410c 55%, #881337);
  color: #fff7ed;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #ffedd5;
  font-size: 1.12rem;
  line-height: 1.85;
}

.filter-panel {
  margin: -28px auto 36px;
  padding: 20px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-card);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 210px 210px;
  gap: 14px;
}

.empty-state {
  display: none;
  padding: 36px;
  border-radius: 22px;
  background: #fff;
  color: #64748b;
  text-align: center;
  box-shadow: var(--shadow-card);
}

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

.breadcrumb {
  margin-bottom: 22px;
  color: #fde68a;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #fff7ed;
}

.detail-hero {
  padding: 92px 0 56px;
  background: linear-gradient(135deg, #0f172a, #7c2d12 56%, #881337);
  color: #fff7ed;
}

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

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 30px;
  box-shadow: 0 30px 72px rgba(0, 0, 0, 0.34);
}

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-copy {
  margin: 0 0 24px;
  color: #ffedd5;
  font-size: 1.12rem;
  line-height: 1.85;
}

.meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.meta-chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffedd5;
  font-weight: 800;
}

.player-section {
  padding: 52px 0;
  background: #020617;
  color: white;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: black;
  box-shadow: 0 28px 75px rgba(2, 6, 23, 0.52);
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: black;
  cursor: pointer;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.14), rgba(2, 6, 23, 0.62));
  color: white;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button-mark {
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #e11d48);
  color: white;
  box-shadow: 0 18px 38px rgba(225, 29, 72, 0.38);
  font-size: 2.1rem;
}

.content-card {
  padding: 30px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.content-card h2 {
  margin: 0 0 18px;
  color: #1e293b;
  font-size: 1.8rem;
  font-weight: 900;
}

.content-card p {
  margin: 0 0 18px;
  color: #475569;
  line-height: 1.9;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.sidebar-card {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.sidebar-card h2 {
  margin: 0 0 18px;
  font-size: 1.45rem;
  font-weight: 900;
}

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

.related-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.related-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card h3 {
  margin: 0;
  padding: 12px 14px 6px;
  color: #1e293b;
  font-size: 0.98rem;
  font-weight: 900;
}

.related-card p {
  margin: 0;
  padding: 0 14px 14px;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.55;
}

.site-footer {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #cbd5e1;
  padding: 54px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 36px;
}

.footer-title {
  margin: 0 0 14px;
  color: #fde68a;
  font-size: 1.2rem;
  font-weight: 900;
}

.footer-text {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.75;
}

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

.footer-links a:hover {
  color: #fde68a;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  color: #94a3b8;
}

.hidden-by-filter {
  display: none !important;
}

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

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

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

  .sidebar-card {
    position: static;
  }
}

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

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .site-main {
    padding-top: 68px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 56px 0 86px;
  }

  .hero-slider,
  .hero-slide {
    min-height: auto;
  }

  .hero-poster-wrap {
    justify-self: center;
    width: min(270px, 78vw);
  }

  .hero-search-form,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .rank-card {
    grid-template-columns: 54px 110px 1fr;
  }

  .rank-card .button {
    grid-column: 1 / -1;
    justify-self: start;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}

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

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

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

  .rank-card {
    grid-template-columns: 48px 94px 1fr;
    gap: 12px;
  }

  .rank-number {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .content-card {
    padding: 22px;
  }
}
