:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #fff7ed;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --dark: #0f172a;
  --amber: #d97706;
  --amber-dark: #b45309;
  --amber-soft: #fef3c7;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(180, 83, 9, 0.25);
}

.brand-name {
  white-space: nowrap;
  font-size: 20px;
}

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

.desktop-nav a {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: var(--amber-dark);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-nav input,
.filter-bar input,
.filter-bar select {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input,
.mobile-nav input {
  width: 210px;
  padding: 10px 14px;
}

.header-search input:focus,
.mobile-nav input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.header-search button,
.mobile-nav button,
.primary-button,
.secondary-button,
.player-overlay {
  border: 0;
  cursor: pointer;
}

.header-search button,
.mobile-nav button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--amber);
  color: #ffffff;
  font-weight: 750;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-nav button:hover,
.primary-button:hover {
  background: var(--amber-dark);
  transform: translateY(-1px);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  font-weight: 750;
  transition: background 0.2s ease, transform 0.2s ease;
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #111827;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid #e5e7eb;
}

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

.mobile-nav a {
  padding: 8px 0;
  color: #374151;
  font-weight: 650;
}

.mobile-nav form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.62) 45%, rgba(15, 23, 42, 0.2) 100%);
}

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

.hero-copy {
  width: min(680px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - 1180px) / 2));
  color: #ffffff;
}

.hero-kicker,
.page-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--amber);
  color: #ffffff;
  font-size: 14px;
  font-weight: 750;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.hero-meta span:not(.hero-kicker) {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  font-size: 14px;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 21px);
}

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

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

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

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.home-section,
.catalog-section,
.detail-section {
  padding: 64px 0;
}

.home-section.alt {
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}

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

.section-heading h2 {
  margin: 12px 0 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

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

.section-heading a {
  color: var(--amber-dark);
  font-weight: 750;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.movie-card-large .poster-link {
  aspect-ratio: 16 / 10;
}

.movie-card-compact .poster-link {
  aspect-ratio: 4 / 3;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.78));
}

.poster-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--amber);
  color: #ffffff;
  font-size: 13px;
  font-weight: 750;
}

.movie-card-body {
  padding: 16px;
}

.movie-card-body h3 {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0 0 8px;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-card-body p {
  display: -webkit-box;
  min-height: 3.25em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.detail-meta,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.card-meta span,
.card-tags span,
.detail-meta span,
.detail-tags span {
  border-radius: 999px;
  padding: 4px 9px;
  background: #f3f4f6;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.card-tags {
  margin-top: 10px;
}

.page-hero {
  padding: 74px 0;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.24), transparent 36%), linear-gradient(135deg, #111827, #1f2937 58%, #92400e);
  color: #ffffff;
}

.page-hero h1 {
  max-width: 860px;
  margin: 14px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #e5e7eb;
  font-size: 18px;
}

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

.category-card {
  min-height: 180px;
  padding: 24px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  color: #111827;
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  padding: 12px 16px;
}

.empty-state[hidden],
[hidden] {
  display: none !important;
}

.empty-state {
  margin: 26px 0 0;
  color: var(--muted);
  text-align: center;
}

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

.ranking-row a {
  display: grid;
  grid-template-columns: 62px 82px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-no {
  color: var(--amber-dark);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.ranking-row img {
  width: 82px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-row h2,
.ranking-row h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.ranking-row p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-meta {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--amber-dark);
}

.detail-hero {
  padding: 42px 0 34px;
}

.detail-panel {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 34px;
  align-items: center;
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.18);
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
}

.detail-copy .lead {
  margin: 18px 0;
  color: #334155;
  font-size: 18px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.player-section {
  padding: 28px 0 52px;
  background: #0f172a;
  color: #ffffff;
}

.player-section h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.3);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.66));
  color: #ffffff;
}

.player-overlay span {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 999px;
  background: var(--amber);
  color: #ffffff;
  font-size: 30px;
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.35);
}

.player-overlay strong {
  font-size: 20px;
  letter-spacing: 0.03em;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.article-card,
.side-card {
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.article-card {
  padding: 30px;
}

.article-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

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

.side-card {
  padding: 22px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 72px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
}

.related-item h3 {
  margin: 0 0 5px;
  font-size: 15px;
  line-height: 1.35;
}

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

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

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
}

.footer-brand {
  color: #f59e0b;
  margin-bottom: 12px;
}

.site-footer p {
  max-width: 660px;
  margin: 0;
  color: #94a3b8;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-content: start;
  justify-content: end;
}

.site-footer nav a:hover {
  color: #f59e0b;
}

.copyright {
  grid-column: 1 / -1;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 14px;
}

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .filter-bar,
  .detail-panel,
  .content-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    justify-content: start;
  }

  .detail-cover {
    max-width: 360px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 62px;
  }

  .brand-name {
    font-size: 17px;
  }

  .hero-slider {
    min-height: 78vh;
  }

  .hero-copy {
    margin: 0 16px;
  }

  .hero-arrow {
    display: none;
  }

  .home-section,
  .catalog-section,
  .detail-section {
    padding: 42px 0;
  }

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

  .section-heading {
    display: block;
  }

  .section-heading a {
    display: inline-block;
    margin-top: 12px;
  }

  .ranking-row a {
    grid-template-columns: 46px 70px 1fr;
  }

  .rank-meta {
    grid-column: 3;
  }

  .ranking-row img {
    width: 70px;
    height: 86px;
  }

  .detail-panel {
    padding: 18px;
  }

  .article-card,
  .side-card {
    padding: 20px;
  }
}
