:root {
  --bg: #ffffff;
  --bg-soft: #fffbeb;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --dark: #111827;
  --dark-2: #030712;
  --amber: #d97706;
  --amber-2: #f59e0b;
  --amber-dark: #b45309;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.22);
  --radius: 18px;
  --radius-lg: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

main {
  min-height: 60vh;
}

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--amber-dark);
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-2), var(--amber-dark));
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.28);
}

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

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

.nav-link,
.mobile-link {
  padding: 9px 14px;
  color: #374151;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--amber-dark);
  background: #fef3c7;
}

.header-search {
  display: flex;
  flex: 1;
  max-width: 420px;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.header-search input,
.mobile-search input,
.filter-search input,
.filter-selects select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.header-search input {
  padding: 10px 16px;
}

.header-search button,
.mobile-search button {
  border: 0;
  padding: 0 18px;
  color: #fff;
  background: var(--amber);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #111827;
  border-radius: 2px;
}

.mobile-panel {
  display: none;
  padding: 0 24px 18px;
  border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.mobile-search input {
  padding: 10px 14px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--dark-2);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

.hero-slide img,
.category-hero > img,
.detail-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.88) 0%, rgba(17, 24, 39, 0.62) 48%, rgba(17, 24, 39, 0.1) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, calc(100% - 48px));
  margin: 0 auto;
  transform: translateX(-300px);
  color: #fff;
}

.hero-tags,
.detail-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-tags span,
.detail-meta-pills span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  color: #fff;
  background: rgba(217, 119, 6, 0.95);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.category-hero h1,
.detail-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.category-hero p,
.detail-hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

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

.primary-button {
  color: #fff;
  background: var(--amber);
  box-shadow: 0 14px 28px rgba(217, 119, 6, 0.32);
}

.primary-button:hover,
.section-link:hover {
  transform: translateY(-2px);
  background: var(--amber-dark);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
}

.ghost-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
}

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

.hero-mini-tags span,
.tag-cloud span {
  display: inline-flex;
  padding: 6px 10px;
  color: #92400e;
  background: #fef3c7;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

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

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

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  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.52);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

.tinted-section {
  max-width: none;
  background: linear-gradient(180deg, #fffbeb, #ffffff);
}

.tinted-section > .section-heading,
.tinted-section > .movie-grid,
.tinted-section > .large-grid,
.tinted-section > .ranking-list,
.tinted-section > .filter-bar {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.section-heading,
.category-overview-head,
.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--amber-dark);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-heading h2,
.panel-head h2,
.article-card h2,
.info-card h2,
.poster-card h2,
.category-overview-head h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
}

.section-heading p,
.category-overview-head p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-link {
  flex: none;
  color: #fff;
  background: var(--amber);
}

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

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

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

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

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

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

.movie-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.card-cover-link,
.compact-cover,
.list-cover {
  position: relative;
  display: block;
  overflow: hidden;
}

.card-cover-link img {
  width: 100%;
  height: 270px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 15%, rgba(3, 7, 18, 0.78) 100%);
}

.card-year,
.card-badge {
  position: absolute;
  z-index: 2;
  padding: 5px 10px;
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-year {
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.62);
}

.card-badge {
  left: 12px;
  bottom: 12px;
  background: var(--amber);
}

.card-body,
.compact-body,
.list-body {
  padding: 16px;
}

.card-body h3,
.compact-body h3,
.list-body h3,
.large-card-text h3 {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  line-height: 1.32;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--amber-dark);
}

.card-body p,
.list-body p,
.large-card-text p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
}

.card-meta span {
  padding: 3px 8px;
  background: #f3f4f6;
  border-radius: 999px;
}

.movie-card-large .card-cover-link,
.movie-card-large .card-cover-link img {
  height: 380px;
}

.large-card-text {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  padding: 26px;
  color: #fff;
}

.large-card-text h3 {
  color: #fff;
  font-size: 28px;
}

.large-card-text p {
  color: rgba(255, 255, 255, 0.82);
}

.movie-card-compact .compact-cover img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.compact-cover span {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.66);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.compact-body h3 {
  font-size: 15px;
}

.compact-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-card-list {
  display: grid;
  grid-template-columns: auto 160px minmax(0, 1fr);
  align-items: stretch;
}

.rank-number {
  display: grid;
  min-width: 58px;
  place-items: center;
  color: var(--amber-dark);
  background: #fffbeb;
  font-size: 24px;
  font-weight: 900;
}

.list-cover img {
  width: 160px;
  height: 118px;
  object-fit: cover;
}

.list-body {
  min-width: 0;
}

.list-body h3 {
  -webkit-line-clamp: 1;
}

.category-tile {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.12), rgba(3, 7, 18, 0.82));
}

.category-tile strong,
.category-tile small {
  position: absolute;
  left: 18px;
  z-index: 2;
  color: #fff;
}

.category-tile strong {
  bottom: 42px;
  font-size: 20px;
}

.category-tile small {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
  gap: 34px;
  align-items: start;
}

.ranking-panel,
.article-card,
.info-card,
.poster-card,
.filter-bar,
.category-overview-card {
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.ranking-panel {
  padding: 24px;
}

.ranking-list {
  display: grid;
  gap: 14px;
}

.ranking-full {
  max-width: 1080px;
}

.page-hero,
.category-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--dark-2);
}

.page-hero {
  padding: 86px 24px;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.36), transparent 34%),
    linear-gradient(135deg, #111827, #030712);
}

.page-hero > div,
.category-hero > div,
.detail-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
}

.small-hero h1 {
  font-size: clamp(36px, 6vw, 58px);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
}

.filter-search,
.filter-selects select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

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

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

.filter-selects select {
  width: auto;
  min-width: 150px;
  padding: 0 36px 0 14px;
}

.filter-count {
  color: var(--muted);
  white-space: nowrap;
}

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

.category-overview-card {
  padding: 26px;
}

.category-hero {
  height: 430px;
}

.category-hero > img,
.detail-hero > img {
  position: absolute;
  inset: 0;
}

.category-hero-shade,
.detail-hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.9), rgba(17, 24, 39, 0.48), rgba(3, 7, 18, 0.78));
}

.category-hero > div {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  padding: 0 24px;
}

.breadcrumb,
.detail-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.breadcrumb:hover,
.detail-breadcrumb a:hover {
  color: #fff;
}

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

.detail-hero-content {
  display: flex;
  min-height: 560px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 64px 24px;
}

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

.detail-main,
.detail-side {
  display: grid;
  gap: 24px;
}

.player-card {
  overflow: hidden;
  background: #000;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.player-shell {
  position: relative;
  background: #000;
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  padding-left: 6px;
  color: #fff;
  background: rgba(217, 119, 6, 0.96);
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(217, 119, 6, 0.42);
  font-size: 38px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-overlay:hover .play-circle {
  transform: scale(1.08);
  background: var(--amber-dark);
}

.article-card,
.info-card,
.poster-card {
  padding: 26px;
}

.article-card p {
  margin: 16px 0 0;
  color: #374151;
  font-size: 17px;
}

.poster-card {
  overflow: hidden;
  padding: 0;
}

.poster-card img {
  width: 100%;
  height: 440px;
  object-fit: cover;
}

.poster-card div {
  padding: 22px;
}

.poster-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.info-card dl {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.info-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.info-card dt {
  color: var(--muted);
}

.info-card dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 34px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.footer-brand {
  color: #fbbf24;
  font-size: 20px;
}

.footer-about p {
  max-width: 560px;
  margin: 16px 0 0;
  color: #9ca3af;
}

.footer-column h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 16px;
}

.footer-column ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column a {
  color: #9ca3af;
  transition: color 0.2s ease;
}

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

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

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

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

  .hero-copy {
    transform: none;
  }
}

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

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

  .hero {
    min-height: 600px;
  }

  .large-grid,
  .movie-grid,
  .catalog-grid,
  .compact-grid,
  .category-grid,
  .two-column-section,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .detail-layout,
  .two-column-section {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .category-hero,
  .detail-hero,
  .detail-hero-content {
    min-height: 460px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 12px 16px;
  }

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

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

  .hero-copy {
    width: calc(100% - 32px);
  }

  .hero-arrow {
    display: none;
  }

  .content-section,
  .page-hero {
    padding: 48px 16px;
  }

  .large-grid,
  .movie-grid,
  .catalog-grid,
  .compact-grid,
  .category-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-cover-link img {
    height: 230px;
  }

  .movie-card-list {
    grid-template-columns: 54px 120px minmax(0, 1fr);
  }

  .list-cover img {
    width: 120px;
    height: 110px;
  }

  .list-body p {
    display: none;
  }

  .poster-card img {
    height: 360px;
  }
}
