:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #d97706;
  --brand-dark: #b45309;
  --brand-soft: #fef3c7;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.22), transparent 32rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 32rem, #ffffff 100%);
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.92);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

.brand-text,
.footer-brand {
  background: linear-gradient(90deg, #d97706, #ea580c);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.nav-link,
.mobile-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 1rem;
  color: #4b5563;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.nav-link:hover,
.header-search:hover,
.primary-button:hover,
.secondary-button:hover,
.category-tile:hover,
.movie-card:hover,
.wide-ranking-card:hover {
  transform: translateY(-2px);
}

.header-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 1.2rem;
  color: #fff;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(90deg, #d97706, #ea580c);
  box-shadow: 0 12px 26px rgba(234, 88, 12, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--brand-soft);
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--brand-dark);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 1rem;
  padding: 0.75rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  min-height: 640px;
  padding: clamp(2rem, 5vw, 5rem);
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
}

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

.hero-content {
  width: min(620px, 100%);
  color: #fff;
}

.hero-kicker,
.section-kicker,
.inner-hero span,
.card-badge,
.category-card-main span,
.ranking-head span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 0.38rem 0.72rem;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  background: #fef3c7;
}

.hero h1 {
  margin: 1.1rem 0 1rem;
  font-size: clamp(2.8rem, 7vw, 5.9rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero p,
.inner-hero p,
.section-heading p,
.detail-copy p,
.content-block p,
.wide-ranking-card p,
.card-body p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.hero p {
  max-width: 48rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

.hero-tags,
.card-tags,
.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-tags span,
.card-tags span,
.detail-meta span,
.detail-tags span {
  display: inline-flex;
  padding: 0.36rem 0.68rem;
  color: #92400e;
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(254, 243, 199, 0.92);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.55rem;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.25rem;
  font-weight: 900;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(90deg, #f59e0b, #ea580c);
  box-shadow: 0 16px 34px rgba(234, 88, 12, 0.32);
}

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

.slim-actions .secondary-button {
  color: var(--brand-dark);
  border-color: #fed7aa;
  background: #fff7ed;
}

.hero-dots {
  position: absolute;
  right: 2rem;
  bottom: 2rem;
  z-index: 2;
  display: flex;
  gap: 0.5rem;
}

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

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

.hero-search {
  position: absolute;
  left: clamp(1rem, 5vw, 5rem);
  right: clamp(1rem, 5vw, 5rem);
  bottom: 2rem;
  z-index: 2;
  display: grid;
  gap: 0.6rem;
  max-width: 620px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.hero-search label {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-search div,
.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  min-height: 48px;
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.95);
  outline: none;
}

.hero-search input,
.filter-bar input {
  padding: 0 1rem;
}

.filter-bar select {
  padding: 0 2.3rem 0 1rem;
}

.hero-search button {
  min-height: 48px;
  padding: 0 1.2rem;
  cursor: pointer;
  color: #fff;
  font-weight: 900;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(90deg, #f59e0b, #ea580c);
}

.page-section {
  width: min(1180px, calc(100% - 2rem));
  margin: 4rem auto;
}

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

.section-heading h2,
.inner-hero h1,
.detail-copy h1,
.content-block h2,
.side-card h2,
.wide-ranking-card h2 {
  margin: 0.65rem 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.section-heading p {
  max-width: 46rem;
  margin: 0.65rem 0 0;
}

.section-link {
  display: inline-flex;
  flex-shrink: 0;
  padding: 0.75rem 1rem;
  color: var(--brand-dark);
  font-weight: 900;
  border-radius: 999px;
  background: var(--brand-soft);
}

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

.category-tile,
.category-card {
  border: 1px solid #fed7aa;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #ffffff, #fff7ed);
  box-shadow: 0 12px 26px rgba(146, 64, 14, 0.08);
}

.category-tile {
  display: grid;
  min-height: 146px;
  align-content: space-between;
  padding: 1.15rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile span,
.category-card h2 {
  color: var(--brand-dark);
  font-size: 1.1rem;
  font-weight: 900;
}

.category-tile strong,
.category-card p {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.65;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.14);
}

.card-cover,
.wide-cover,
.detail-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background-color: #111827;
  background-position: center;
  background-size: cover;
}

.card-cover {
  aspect-ratio: 3 / 4;
}

.card-badge,
.card-year {
  position: absolute;
  z-index: 1;
}

.card-badge {
  top: 0.75rem;
  left: 0.75rem;
}

.card-year {
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.3rem 0.62rem;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 1rem;
}

.card-meta {
  color: #9ca3af;
  font-size: 0.78rem;
  font-weight: 800;
}

.card-body h3 {
  margin: 0.5rem 0 0.45rem;
  font-size: 1.06rem;
  line-height: 1.35;
}

.card-body h3 a:hover,
.wide-ranking-card h2 a:hover,
.ranking-title:hover,
.category-card-links a:hover,
.footer-links a:hover {
  color: var(--brand-dark);
}

.card-body p {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 0.92rem;
}

.card-tags {
  margin-top: 0.85rem;
}

.card-tags span {
  font-size: 0.72rem;
  background: #f3f4f6;
}

.is-compact .card-body p {
  min-height: 3.2em;
  -webkit-line-clamp: 2;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.5rem;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 1rem;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-xl);
  background: #fff7ed;
  box-shadow: var(--shadow);
}

.ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.ranking-head a {
  color: var(--brand-dark);
  font-weight: 900;
}

.ranking-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #fed7aa;
}

.ranking-row:last-child {
  border-bottom: 0;
}

.ranking-number {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  font-weight: 900;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.ranking-title {
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-meta {
  color: #9ca3af;
  font-size: 0.82rem;
  font-weight: 800;
}

.inner-hero {
  width: min(1180px, calc(100% - 2rem));
  margin: 2rem auto 0;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.24), transparent 32rem),
    linear-gradient(135deg, #ffffff, #fff7ed);
  box-shadow: var(--shadow);
}

.inner-hero p {
  max-width: 50rem;
}

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

.category-card {
  overflow: hidden;
}

.category-card-main {
  display: block;
  padding: 1.4rem;
}

.category-card-main h2 {
  margin: 1rem 0 0.55rem;
}

.category-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.4rem 1.4rem;
}

.category-card-links a {
  padding: 0.42rem 0.68rem;
  color: #4b5563;
  font-size: 0.84rem;
  font-weight: 800;
  border-radius: 999px;
  background: #f3f4f6;
}

.ranking-list {
  display: grid;
  gap: 1rem;
}

.wide-ranking-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.15rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wide-cover {
  min-height: 210px;
  border-radius: 18px;
}

.wide-cover span {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  font-weight: 900;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.wide-ranking-card h2 {
  font-size: clamp(1.25rem, 3vw, 2rem);
}

.search-panel {
  margin-top: 2rem;
}

.filter-bar {
  grid-template-columns: minmax(220px, 1fr) 180px 160px;
  margin-bottom: 1.4rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 580px;
  margin-top: 0;
  background: #111827;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.08);
}

.detail-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.18), #111827 92%);
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
  width: min(1180px, calc(100% - 2rem));
  min-height: 580px;
  margin: 0 auto;
  padding: 4rem 0 3rem;
}

.detail-poster {
  min-height: 420px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.detail-copy {
  color: #fff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 800;
}

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

.detail-copy h1 {
  margin-top: 1rem;
  color: #fff;
  font-size: clamp(2.6rem, 6vw, 5rem);
}

.detail-copy p {
  max-width: 54rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
}

.detail-meta {
  margin-top: 1rem;
}

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

.detail-main,
.detail-side {
  display: grid;
  gap: 1.2rem;
}

.player-section,
.content-block,
.side-card {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #030712;
}

.movie-player {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #030712;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 0.65rem;
  cursor: pointer;
  color: #fff;
  border: 0;
  background: radial-gradient(circle at center, rgba(251, 191, 36, 0.18), rgba(3, 7, 18, 0.68));
}

.play-cover span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  padding-left: 0.3rem;
  font-size: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 18px 40px rgba(234, 88, 12, 0.35);
}

.play-cover strong {
  font-size: 1.1rem;
}

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

.content-block {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.content-block h2,
.side-card h2 {
  font-size: clamp(1.25rem, 3vw, 1.85rem);
}

.content-block p {
  margin: 1rem 0 0;
  font-size: 1.02rem;
}

.side-card {
  padding: 1.2rem;
}

.side-card dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 0.85rem;
  margin: 1rem 0 0;
}

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

.side-card dd {
  margin: 0;
  color: #374151;
  font-weight: 800;
}

.prev-next {
  padding: 0;
}

.prev-next-card {
  display: block;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.prev-next-card:last-child {
  border-bottom: 0;
}

.prev-next-card span {
  color: #9ca3af;
  font-size: 0.78rem;
  font-weight: 900;
}

.prev-next-card strong {
  display: block;
  margin-top: 0.35rem;
  line-height: 1.35;
}

.site-footer {
  margin-top: 5rem;
  padding: 3rem 0;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

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

.site-footer p {
  max-width: 38rem;
  margin: 1rem 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  max-width: 28rem;
}

.footer-links a {
  padding: 0.55rem 0.8rem;
  color: #4b5563;
  font-weight: 800;
  border-radius: 999px;
  background: #f3f4f6;
}

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

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

  .split-section,
  .detail-layout,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(340px, 100%);
  }

  .ranking-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: inline-block;
  }

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

  .hero,
  .hero-slide {
    min-height: 720px;
  }

  .hero-slide {
    align-items: start;
    padding: 2rem 1.25rem;
  }

  .hero h1 {
    font-size: 3.2rem;
  }

  .hero-search {
    left: 1rem;
    right: 1rem;
  }

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

  .hero-dots {
    right: 1rem;
    bottom: 8.8rem;
  }

  .section-heading,
  .footer-inner {
    display: grid;
  }

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

  .wide-ranking-card {
    grid-template-columns: 120px 1fr;
  }

  .wide-cover {
    min-height: 168px;
  }

  .detail-hero-inner {
    align-items: start;
  }

  .detail-copy h1 {
    font-size: 2.8rem;
  }
}

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

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

  .category-grid,
  .category-card-grid,
  .movie-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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

  .wide-cover {
    min-height: 260px;
  }

  .detail-poster {
    min-height: 360px;
  }
}
