:root {
  color-scheme: light;
  --bg: #fffaf0;
  --panel: rgba(255, 255, 255, 0.92);
  --text: #1e293b;
  --muted: #64748b;
  --line: rgba(245, 158, 11, 0.24);
  --brand: #d97706;
  --brand-strong: #92400e;
  --brand-soft: #fef3c7;
  --shadow: 0 24px 60px rgba(146, 64, 14, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(251, 191, 36, 0.22), transparent 34rem),
    linear-gradient(180deg, #fff7ed 0%, #fff 45%, #f8fafc 100%);
}

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

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

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: min(1180px, calc(100% - 2rem));
  min-height: 72px;
  margin: 0 auto;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 900;
  color: var(--brand-strong);
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ea580c 54%, #be123c);
  box-shadow: 0 14px 30px rgba(234, 88, 12, 0.32);
}

.brand-text {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  white-space: nowrap;
}

.header-search,
.mobile-search,
.hero-search,
.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-search {
  flex: 1;
  max-width: 420px;
  margin-left: auto;
}

.header-search input,
.mobile-search input,
.hero-search input,
.search-box input,
.filter-panel input {
  width: 100%;
  border: 1px solid rgba(217, 119, 6, 0.28);
  border-radius: 999px;
  padding: 0.78rem 1rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.86);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.search-box input:focus,
.filter-panel input:focus {
  border-color: rgba(217, 119, 6, 0.75);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.header-search button,
.mobile-search button,
.hero-search button,
.search-box button,
.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1.15rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.hero-search button,
.search-box button,
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 14px 30px rgba(234, 88, 12, 0.26);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.16);
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.search-box button:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link,
.mobile-nav-link {
  border-radius: 999px;
  padding: 0.68rem 0.92rem;
  color: #78350f;
  font-weight: 750;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #9a3412;
  background: rgba(251, 191, 36, 0.28);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 14px;
  padding: 0.7rem 0.85rem;
  color: #78350f;
  background: #fff7ed;
  font-size: 1.25rem;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 40px rgba(146, 64, 14, 0.12);
}

.hero-carousel {
  position: relative;
  width: min(1180px, calc(100% - 2rem));
  min-height: clamp(560px, 74vh, 760px);
  margin: 1.25rem auto 0;
  overflow: hidden;
  border-radius: 34px;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.62fr);
  gap: clamp(1rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(1.6rem, 6vw, 5rem);
  background-position: center;
  background-size: cover;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.72s ease, transform 1.2s ease;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.66) 50%, rgba(15, 23, 42, 0.22) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 55%);
}

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

.eyebrow {
  margin: 0 0 0.85rem;
  color: #fbbf24;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.25rem, 7vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 720px;
  margin: 1.4rem 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.tag-row,
.filter-chips,
.search-tags,
.detail-meta,
.card-meta,
.quick-links,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.hero-tags,
.hero-actions {
  margin-top: 1.4rem;
}

.hero-tags span,
.detail-tags a,
.tag-row span,
.detail-meta span,
.card-meta span {
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 999px;
  padding: 0.38rem 0.68rem;
  color: #92400e;
  background: rgba(254, 243, 199, 0.76);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-tags span {
  color: #fff7ed;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.16);
}

.hero-poster {
  justify-self: end;
  width: min(330px, 100%);
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster img,
.poster-link img,
.category-card img,
.detail-cover img,
.category-overview-card img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.4);
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 1.2rem;
  z-index: 4;
  display: flex;
  gap: 0.45rem;
  transform: translateX(-50%);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-panel,
.content-section,
.breadcrumb {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.quick-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-top: -2rem;
  position: relative;
  z-index: 8;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 50px rgba(146, 64, 14, 0.13);
  backdrop-filter: blur(18px);
}

.quick-links a {
  border-radius: 999px;
  padding: 0.72rem 1rem;
  color: #92400e;
  background: #fffbeb;
  font-weight: 850;
}

.content-section {
  padding: clamp(2.2rem, 6vw, 5rem) 0 0;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-title h2,
.rank-side h2,
.detail-text h2,
.category-overview-card h2 {
  margin: 0;
  color: #1e293b;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: -0.04em;
}

.section-title p:not(.eyebrow),
.page-hero p,
.category-overview-card p,
.site-footer p,
.detail-text p {
  color: var(--muted);
  line-height: 1.8;
}

.section-title a {
  color: #b45309;
  font-weight: 850;
}

.movie-grid,
.featured-grid,
.category-grid,
.category-overview-grid,
.side-grid,
.search-result-grid {
  display: grid;
  gap: 1.15rem;
}

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

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(146, 64, 14, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 24px 55px rgba(146, 64, 14, 0.16);
  transform: translateY(-6px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  background: #fde68a;
}

.poster-link img {
  transition: transform 0.45s ease;
}

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

.poster-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  border-radius: 999px;
  padding: 0.32rem 0.58rem;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 0.75rem;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 1rem;
}

.card-body h3 {
  margin: 0.65rem 0 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #d97706;
}

.card-body p {
  min-height: 3.1em;
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.card-meta span {
  padding: 0.2rem 0.48rem;
  font-size: 0.72rem;
}

.tag-row {
  margin-top: 0.75rem;
}

.tag-row span {
  padding: 0.22rem 0.48rem;
  font-size: 0.72rem;
}

.compact-card .card-body p {
  min-height: 2.8em;
}

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 26px;
  padding: 1rem;
  color: #fff;
  background: #111827;
  box-shadow: 0 18px 45px rgba(146, 64, 14, 0.1);
}

.category-card:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.86) 100%);
}

.category-card img {
  position: absolute;
  inset: 0;
  transition: transform 0.45s ease;
}

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

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

.category-card span {
  margin-top: 5.4rem;
  font-size: 1.2rem;
  font-weight: 900;
}

.category-card small {
  margin-top: 0.3rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.page-hero {
  width: min(1180px, calc(100% - 2rem));
  margin: 1.25rem auto 0;
  overflow: hidden;
  border-radius: 34px;
  padding: clamp(2rem, 6vw, 5rem);
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(251, 191, 36, 0.42), transparent 24rem),
    linear-gradient(135deg, #1f2937 0%, #7c2d12 48%, #f59e0b 100%);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 880px;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

.filter-panel,
.search-page {
  display: grid;
  gap: 1rem;
}

.filter-panel {
  margin-bottom: 1.35rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
}

.filter-chips button,
.search-tags button {
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  padding: 0.54rem 0.8rem;
  color: #92400e;
  background: #fff7ed;
  cursor: pointer;
  font-weight: 800;
}

.filter-chips button.is-active,
.search-tags button:hover {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
}

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

.category-overview-card {
  display: grid;
  gap: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 45px rgba(146, 64, 14, 0.08);
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  min-height: 190px;
}

.category-cover-stack img {
  border-radius: 18px;
  object-fit: cover;
}

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

.rank-list,
.rank-side {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 45px rgba(146, 64, 14, 0.08);
}

.rank-list {
  overflow: hidden;
}

.rank-row {
  display: grid;
  grid-template-columns: 54px 70px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(245, 158, 11, 0.16);
}

.rank-row:hover {
  background: #fff7ed;
}

.rank-num {
  color: #d97706;
  font-size: 1.35rem;
  font-weight: 950;
}

.rank-row img {
  width: 70px;
  height: 92px;
  border-radius: 16px;
}

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

.rank-main strong {
  color: #1e293b;
  font-size: 1.04rem;
}

.rank-main em {
  margin-top: 0.25rem;
  color: var(--muted);
  font-style: normal;
  line-height: 1.5;
}

.rank-go {
  border-radius: 999px;
  padding: 0.48rem 0.8rem;
  color: #fff;
  background: #f59e0b;
  font-weight: 850;
}

.rank-side {
  position: sticky;
  top: 92px;
  padding: 1rem;
}

.search-box {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.86);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  padding: 1.2rem 0 0;
  color: #92400e;
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: clamp(1.4rem, 5vw, 4rem);
  align-items: center;
  width: min(1180px, calc(100% - 2rem));
  margin: 1rem auto 0;
  border-radius: 34px;
  padding: clamp(1.2rem, 4vw, 3rem);
  background:
    radial-gradient(circle at 78% 25%, rgba(251, 191, 36, 0.34), transparent 28rem),
    linear-gradient(135deg, #0f172a, #7c2d12 58%, #d97706);
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  border-radius: 30px;
  aspect-ratio: 3 / 4.1;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.detail-info h1 {
  font-size: clamp(2.1rem, 5vw, 4.4rem);
}

.detail-one-line {
  max-width: 800px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.1rem;
  line-height: 1.8;
}

.detail-meta {
  margin: 1.2rem 0;
}

.detail-tags {
  margin-bottom: 1.4rem;
}

.player-section {
  padding-top: 2rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.44));
  cursor: pointer;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: clamp(76px, 12vw, 118px);
  height: clamp(76px, 12vw, 118px);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  font-size: clamp(2rem, 5vw, 3.2rem);
  box-shadow: 0 20px 50px rgba(234, 88, 12, 0.42);
}

.detail-text {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.detail-text article {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 1.4rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 45px rgba(146, 64, 14, 0.08);
}

.site-footer {
  margin-top: clamp(3rem, 8vw, 6rem);
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0;
}

.footer-brand {
  color: #fbbf24;
  font-size: 1.3rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

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

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

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

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

  .ranking-layout {
    grid-template-columns: 1fr;
  }

  .rank-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .mobile-nav.is-open {
    display: grid;
    gap: 0.8rem;
  }

  .mobile-nav-link {
    display: block;
  }

  .hero-carousel {
    min-height: 680px;
    border-radius: 26px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: end;
  }

  .hero-poster {
    justify-self: start;
    width: min(220px, 62vw);
    order: -1;
  }

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

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

  .detail-hero,
  .detail-text {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    width: min(320px, 100%);
  }

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

@media (max-width: 520px) {
  .header-inner {
    width: min(100% - 1rem, 1180px);
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero-carousel,
  .quick-panel,
  .content-section,
  .page-hero,
  .detail-hero,
  .breadcrumb {
    width: min(100% - 1rem, 1180px);
  }

  .hero-carousel {
    min-height: 640px;
  }

  .hero-control {
    display: none;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .category-overview-grid,
  .side-grid,
  .search-result-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-go {
    display: none;
  }
}
