:root {
  --bg: #111827;
  --bg-soft: #1f2937;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: rgba(255, 255, 255, 0.16);
  --amber: #f59e0b;
  --orange: #f97316;
  --yellow: #eab308;
  --deep: #78350f;
  --shadow: 0 24px 70px rgba(17, 24, 39, 0.22);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 2%, rgba(245, 158, 11, 0.25), transparent 28rem),
    linear-gradient(180deg, #fff7ed 0%, #fffbeb 28%, #ffffff 58%, #fff7ed 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #b45309, #f97316 48%, #eab308);
  box-shadow: 0 18px 42px rgba(120, 53, 15, 0.24);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #f97316;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.22);
}

.brand-text {
  font-size: 1.35rem;
  white-space: nowrap;
}

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

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.site-search {
  width: 310px;
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.site-search input {
  width: 100%;
  height: 42px;
  padding: 0 88px 0 18px;
  border: 0;
  outline: 0;
  color: #111827;
  background: transparent;
}

.site-search button {
  position: absolute;
  right: 5px;
  top: 5px;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 1.8rem;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

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

.mobile-panel form {
  position: relative;
  display: flex;
  gap: 8px;
}

.mobile-panel input {
  min-width: 0;
  flex: 1;
  height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
}

.mobile-panel button {
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: #9a3412;
  background: #fffbeb;
}

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

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background-image:
    linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(120, 53, 15, 0.72), rgba(249, 115, 22, 0.22)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 16%, rgba(251, 191, 36, 0.35), transparent 26rem),
    linear-gradient(180deg, rgba(17, 24, 39, 0.06), rgba(17, 24, 39, 0.72));
  backdrop-filter: blur(2px);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 60px;
  padding: 70px 0 82px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fbbf24;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero-desc {
  width: min(720px, 100%);
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
  line-height: 1.85;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-tags span {
  color: #fffbeb;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-btn,
.ghost-btn,
.wide-link,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 14px 35px rgba(249, 115, 22, 0.38);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.wide-link:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-poster {
  display: block;
  border-radius: 32px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
  transform: rotate(2deg);
}

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

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

.quick-cats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: -56px;
  position: relative;
  z-index: 4;
}

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #ffffff;
  box-shadow: var(--shadow);
  background: var(--bg-soft);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.category-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.88));
}

.category-card strong,
.category-card em {
  position: absolute;
  left: 18px;
  right: 18px;
}

.category-card strong {
  bottom: 48px;
  font-size: 1.2rem;
}

.category-card em {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
  font-size: 0.86rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  margin-top: 44px;
  align-items: start;
}

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

.section-title p,
.rank-head p {
  margin: 0 0 8px;
  color: #d97706;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.section-title h2,
.rank-head h2,
.watch-side h2,
.story-card h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.15;
  font-weight: 950;
}

.section-more,
.wide-link {
  color: #9a3412;
  background: #ffedd5;
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 24px;
  padding: 14px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 40px rgba(120, 53, 15, 0.08);
  backdrop-filter: blur(14px);
}

.filter-search {
  flex: 1;
}

.filter-search input,
.filter-selects select {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: 999px;
  color: #111827;
  background: #ffffff;
  outline: 0;
}

.filter-search input {
  padding: 0 18px;
}

.filter-selects {
  display: flex;
  gap: 10px;
}

.filter-selects select {
  min-width: 140px;
  padding: 0 14px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 58px rgba(120, 53, 15, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.48));
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 950;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.card-body {
  padding: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 800;
}

.card-body h3 {
  margin: 9px 0 8px;
  font-size: 1.02rem;
  line-height: 1.3;
  font-weight: 950;
}

.card-body p {
  min-height: 3.6em;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: #9a3412;
  background: #ffedd5;
}

.rank-panel,
.watch-side,
.story-card,
.category-overview-card,
.page-hero,
.player-card {
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

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

.compact-item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 16px;
  background: #fff7ed;
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-item:hover {
  background: #ffedd5;
  transform: translateX(3px);
}

.compact-item img {
  width: 68px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.compact-item strong {
  display: block;
  overflow: hidden;
  color: #111827;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-item em {
  display: block;
  margin-top: 4px;
  color: #92400e;
  font-style: normal;
  font-size: 0.82rem;
}

.rank-panel .wide-link {
  width: 100%;
  margin-top: 16px;
}

.page-main {
  padding: 34px 0 58px;
}

.page-hero {
  margin-bottom: 28px;
  padding: clamp(26px, 5vw, 54px);
  background:
    radial-gradient(circle at 80% 0%, rgba(251, 191, 36, 0.42), transparent 26rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 247, 237, 0.82));
}

.page-hero h1 {
  color: #111827;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
}

.page-hero p:not(.eyebrow) {
  max-width: 820px;
  margin: 18px 0 0;
  color: #4b5563;
  font-size: 1.06rem;
  line-height: 1.8;
}

.category-overview-grid {
  display: grid;
  gap: 20px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  padding: 18px;
}

.category-cover {
  overflow: hidden;
  border-radius: 22px;
}

.category-cover img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.category-overview-card p:not(.eyebrow) {
  color: #4b5563;
  line-height: 1.8;
}

.category-links,
.hero-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-links a,
.hero-inline-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 800;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  color: #92400e;
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  margin-bottom: 26px;
  padding: 28px;
  border-radius: 34px;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 15%, rgba(251, 191, 36, 0.34), transparent 24rem),
    linear-gradient(135deg, #111827, #78350f 52%, #f97316);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.3);
}

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

.detail-info h1 {
  color: #ffffff;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
}

.detail-one-line {
  margin: 20px 0 0;
  max-width: 820px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
  line-height: 1.85;
}

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

.detail-meta span {
  color: #fffbeb;
  background: rgba(255, 255, 255, 0.16);
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.detail-info .primary-btn {
  margin-top: 26px;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  background: #000000;
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: var(--radius-xl);
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.24), rgba(17, 24, 39, 0.62));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 20px 44px rgba(249, 115, 22, 0.42);
  font-size: 2rem;
  transform: translateX(3px);
}

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

.story-card,
.watch-side {
  margin-top: 18px;
  padding: 24px;
}

.story-card p {
  margin: 14px 0 0;
  color: #374151;
  line-height: 1.9;
  font-size: 1rem;
}

.watch-side {
  position: sticky;
  top: 92px;
  margin-top: 0;
}

.watch-side h2 {
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.related-section {
  margin-top: 36px;
}

.site-footer {
  color: #ffffff;
  background: linear-gradient(90deg, #78350f, #c2410c 52%, #a16207);
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 28px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.footer-grid p {
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.75;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.78);
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

[data-movie-card].is-hidden {
  display: none;
}

@media (max-width: 1120px) {
  .site-search {
    width: 240px;
  }

  .quick-cats,
  .movie-grid,
  .library-grid,
  .ranking-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .rank-panel,
  .watch-side {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-content,
  .detail-hero,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .hero-content {
    gap: 26px;
    padding: 42px 0 76px;
  }

  .hero-poster {
    width: min(280px, 78vw);
    margin: 0 auto;
  }

  .quick-cats,
  .movie-grid,
  .library-grid,
  .ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-panel,
  .filter-selects,
  .section-title,
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .footer-grid {
    gap: 18px;
  }
}

@media (max-width: 520px) {
  .nav-shell {
    height: 64px;
  }

  .brand-text {
    font-size: 1.08rem;
  }

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

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 2.25rem;
  }

  .quick-cats,
  .movie-grid,
  .library-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    padding: 18px;
  }

  .play-overlay span {
    width: 68px;
    height: 68px;
  }
}
