:root {
  --color-primary: #facc15;
  --color-primary-dark: #f59e0b;
  --color-accent: #fb923c;
  --color-dark: #111827;
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-soft: #f8fafc;
  --shadow-card: 0 16px 40px rgba(15, 23, 42, 0.10);
  --shadow-hover: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 38%, #fff7ed 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #facc15 0%, #fb923c 52%, #eab308 100%);
  box-shadow: 0 14px 34px rgba(180, 83, 9, 0.24);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #111827;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.nav-link {
  color: #ffffff;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0.96;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: #fff7ed;
  transform: translateY(-1px);
}

.nav-link-sub {
  font-size: 14px;
  opacity: 0.88;
}

.header-search {
  display: flex;
  align-items: center;
  width: min(360px, 28vw);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.header-search input,
.wide-search input,
.inline-search input {
  width: 100%;
  border: 0;
  outline: none;
  color: #111827;
  background: transparent;
}

.header-search input {
  padding: 11px 14px 11px 18px;
}

.header-search button {
  flex: none;
  border: 0;
  padding: 10px 18px;
  color: #111827;
  font-weight: 800;
  background: #fde68a;
}

.nav-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 28px;
}

.hero-carousel {
  position: relative;
  height: min(640px, calc(100vh - 68px));
  min-height: 500px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.50) 45%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 720px;
  color: #ffffff;
}

.hero-pill,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 16px;
  color: #111827;
  background: #facc15;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.hero-content h1 {
  margin: 20px 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.05em;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.38);
}

.hero-content p {
  max-width: 660px;
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.7;
}

.hero-actions,
.quick-links,
.filter-row,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn,
.panel-more,
.section-more,
.category-card span,
.category-large-body span,
.wide-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.panel-more:hover,
.section-more:hover,
.category-card:hover span,
.category-large-card:hover span,
.wide-search button:hover {
  transform: translateY(-2px);
}

.btn-primary,
.panel-more,
.section-more,
.wide-search button {
  color: #111827;
  background: linear-gradient(90deg, #facc15, #fb923c);
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  border-radius: 999px;
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.66);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 36px;
  background: #facc15;
}

.quick-panel {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-top: -38px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
}

.wide-search {
  display: flex;
  overflow: hidden;
  background: #f3f4f6;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px #e5e7eb;
}

.wide-search input {
  padding: 15px 20px;
}

.quick-links a {
  padding: 11px 16px;
  color: #92400e;
  background: #fffbeb;
  border-radius: 999px;
  font-weight: 800;
}

.content-section {
  padding: 68px 0 0;
}

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

.section-head h2,
.ranking-panel h2,
.story-card h2,
.side-card h2,
.link-group h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.category-large-body p,
.category-card p,
.movie-info p,
.story-card p,
.side-card dd,
.site-footer p {
  color: var(--color-muted);
  line-height: 1.72;
}

.movie-grid,
.category-grid,
.category-large-grid,
.ranking-grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  color: #111827;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

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

.movie-cover {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.movie-cover img,
.category-card img,
.category-collage img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.movie-cover img,
.category-card img,
.category-collage img {
  transition: transform 0.5s ease;
}

.cover-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.cover-badge {
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  color: #111827;
  background: rgba(250, 204, 21, 0.95);
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}

.movie-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.movie-info h3 {
  margin: 0;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-info p {
  display: -webkit-box;
  margin: 0;
  min-height: 48px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  color: #92400e;
  background: #fffbeb;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card,
.category-large-card {
  overflow: hidden;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

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

.category-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.category-card div,
.category-large-body {
  padding: 20px;
}

.category-card h3,
.category-large-body h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 22px;
  font-weight: 950;
}

.category-card span,
.category-large-body span {
  min-height: 36px;
  margin-top: 14px;
  padding: 0 16px;
  color: #111827;
  background: #facc15;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 34px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 26px;
  background: #111827;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.ranking-panel h2 {
  color: #ffffff;
}

.ranking-panel ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-panel li a {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}

.ranking-panel li span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #111827;
  background: #facc15;
  border-radius: 999px;
  font-weight: 900;
}

.ranking-panel li strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-panel li em {
  color: #facc15;
  font-style: normal;
  font-weight: 900;
}

.panel-more {
  width: 100%;
  margin-top: 18px;
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  padding: 86px 0 92px;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(250, 204, 21, 0.38), transparent 32%), linear-gradient(135deg, #111827 0%, #1f2937 45%, #92400e 100%);
}

.page-hero-compact {
  padding: 66px 0 72px;
}

.page-hero h1 {
  margin: 18px 0 14px;
  max-width: 860px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

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

.category-large-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 220px;
}

.category-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  overflow: hidden;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  padding: 18px;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}

.toolbar-sticky {
  position: sticky;
  top: 88px;
  z-index: 8;
}

.filter-chip {
  border: 0;
  padding: 10px 16px;
  color: #92400e;
  background: #fffbeb;
  border-radius: 999px;
  font-weight: 900;
}

.filter-chip.is-active {
  color: #111827;
  background: #facc15;
}

.inline-search {
  display: block;
  min-width: min(360px, 100%);
  padding: 12px 16px;
  background: #f3f4f6;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px #e5e7eb;
}

.inline-search-wide {
  flex: 1;
}

.detail-main {
  background: #f9fafb;
}

.detail-hero {
  padding: 56px 0;
  color: #ffffff;
  background: radial-gradient(circle at 10% 10%, rgba(250, 204, 21, 0.3), transparent 30%), linear-gradient(135deg, #0f172a 0%, #111827 60%, #78350f 100%);
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  margin: 0;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
}

.breadcrumb a {
  color: #facc15;
  font-weight: 800;
}

.detail-intro h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1.06;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta {
  margin: 22px 0 18px;
}

.detail-meta span {
  padding: 7px 13px;
  color: #111827;
  background: #facc15;
  border-radius: 999px;
  font-weight: 900;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.player-section {
  padding-top: 42px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.movie-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 0;
  padding: 18px 28px;
  color: #111827;
  background: linear-gradient(90deg, #facc15, #fb923c);
  border-radius: 999px;
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.38);
  font-size: 18px;
  font-weight: 950;
}

.play-button span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #facc15;
  background: #111827;
  border-radius: 999px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  padding-top: 42px;
}

.story-card,
.side-card {
  padding: 30px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.story-card h2,
.side-card h2,
.link-group h2 {
  font-size: 26px;
}

.story-card h2:not(:first-child) {
  margin-top: 28px;
}

.story-card p {
  margin: 0;
  font-size: 17px;
}

.side-card dl {
  display: grid;
  gap: 16px;
  margin: 0;
}

.side-card div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
}

.side-card dt {
  color: #111827;
  font-weight: 900;
}

.side-card a {
  color: #d97706;
  font-weight: 900;
}

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

.link-library {
  display: grid;
  gap: 34px;
}

.link-group {
  padding: 28px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.link-group h2 a {
  color: #111827;
}

.text-link-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 16px;
}

.text-link-grid a {
  overflow: hidden;
  padding: 10px 12px;
  color: #374151;
  background: #f9fafb;
  border-radius: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-link-grid a:hover {
  color: #92400e;
  background: #fffbeb;
}

.site-footer {
  margin-top: 74px;
  color: #e5e7eb;
  background: linear-gradient(180deg, #111827, #030712);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 46px;
  padding: 52px 0;
}

.footer-brand {
  margin-bottom: 14px;
  color: #facc15;
  font-size: 26px;
  font-weight: 950;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #facc15;
  font-size: 18px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: #d1d5db;
}

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

.footer-bottom {
  padding: 20px 16px;
  color: #9ca3af;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[hidden] {
  display: none !important;
}

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

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

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

  .ranking-panel {
    position: static;
  }

  .header-search {
    display: none;
  }

  .header-inner {
    grid-template-columns: auto 1fr auto;
  }
}

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

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

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

  .nav-toggle {
    display: block;
    justify-self: end;
  }

  .main-nav {
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    background: rgba(17, 24, 39, 0.96);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
  }

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

  .nav-link {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: none;
  }

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

  .hero-content h1 {
    font-size: 44px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-panel,
  .toolbar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .wide-search {
    flex-direction: column;
    border-radius: 20px;
  }

  .wide-search button {
    border-radius: 16px;
    margin: 8px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .small-grid,
  .category-movie-grid,
  .ranking-grid,
  .related-grid,
  .category-grid,
  .category-large-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

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

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

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

@media (max-width: 560px) {
  .hero-carousel {
    min-height: 600px;
  }

  .hero-content p,
  .detail-one-line {
    font-size: 16px;
  }

  .movie-grid,
  .small-grid,
  .category-movie-grid,
  .ranking-grid,
  .related-grid,
  .category-grid,
  .category-large-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-hero,
  .page-hero {
    padding: 44px 0 52px;
  }

  .player-shell {
    border-radius: 18px;
  }

  .story-card,
  .side-card,
  .link-group {
    padding: 20px;
    border-radius: 20px;
  }

  .text-link-grid {
    grid-template-columns: 1fr;
  }
}
