:root {
  --bg: #fafaf9;
  --paper: #ffffff;
  --paper-soft: #fff7ed;
  --text: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --accent: #d97706;
  --accent-dark: #b45309;
  --accent-soft: #fef3c7;
  --shadow: 0 18px 45px rgba(28, 25, 23, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 21px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 12px 30px rgba(217, 119, 6, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #57534e;
  font-size: 15px;
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a,
.quick-links a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #44403c;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.mobile-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #57534e;
  font-weight: 700;
}

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

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-backdrop,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
  transform: scale(1.04);
}

.hero-overlay,
.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 10, 9, 0.92), rgba(12, 10, 9, 0.62) 45%, rgba(12, 10, 9, 0.22)), linear-gradient(0deg, rgba(12, 10, 9, 0.75), rgba(12, 10, 9, 0.08));
}

.hero-inner,
.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 380px;
  gap: 54px;
  align-items: center;
}

.hero-copy {
  color: #fff;
  max-width: 760px;
}

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 6px 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.92);
}

.eyebrow {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

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

.hero p {
  display: -webkit-box;
  max-width: 720px;
  margin: 0 0 26px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

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

.hero-meta span,
.detail-meta span {
  padding: 6px 12px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

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

.primary-btn,
.ghost-btn,
.home-search button,
.search-box button,
.panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.home-search button,
.search-box button,
.panel-link {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.34);
}

.primary-btn:hover,
.home-search button:hover,
.search-box button:hover,
.panel-link:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.ghost-btn {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

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

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

.hero-dots button {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #fff;
}

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

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

.search-panel-block {
  padding: 34px 0 0;
}

.home-search,
.search-box,
.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(28, 25, 23, 0.08);
}

.home-search input,
.search-box input,
.filter-bar input,
.filter-bar select {
  min-height: 48px;
  width: 100%;
  padding: 0 16px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafaf9;
  outline: none;
}

.home-search input:focus,
.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(217, 119, 6, 0.55);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.quick-links a {
  padding: 9px 14px;
  color: var(--accent-dark);
  font-weight: 800;
  border-radius: 999px;
  background: var(--accent-soft);
}

.quick-links a:hover {
  transform: translateY(-2px);
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading.left {
  margin-left: 0;
  text-align: left;
}

.section-heading.compact {
  margin-bottom: 22px;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 12px 0 12px;
  color: var(--text);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-heading p,
.page-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

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

.movie-grid.tight {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 34px rgba(28, 25, 23, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #292524;
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(180, 83, 9, 0.92);
}

.card-body {
  padding: 16px;
}

.card-title,
.rank-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover,
.rank-title:hover {
  color: var(--accent-dark);
}

.card-meta {
  margin: 8px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.card-text {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #57534e;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  padding: 5px 9px;
  color: #57534e;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  background: #f5f5f4;
}

.tag-row.strong span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

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

.rank-panel,
.content-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 34px rgba(28, 25, 23, 0.08);
}

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

.compact-card {
  display: grid;
  grid-template-columns: auto 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #fafaf9;
}

.compact-card:hover {
  background: var(--accent-soft);
}

.compact-card img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  color: var(--text);
  font-size: 14px;
}

.compact-card em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.rank-num {
  width: 28px;
  color: var(--accent-dark);
  font-weight: 900;
  text-align: center;
}

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

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

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 22px;
  color: #fff;
  border-radius: var(--radius);
  background: #292524;
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: transform 0.35s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.86), rgba(12, 10, 9, 0.08));
}

.category-card span {
  position: relative;
  z-index: 2;
}

.category-card strong,
.category-card em {
  display: block;
}

.category-card strong {
  font-size: 22px;
  font-weight: 900;
}

.category-card em {
  display: -webkit-box;
  margin-top: 8px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.page-hero {
  position: relative;
  padding: 86px 0 48px;
  background: linear-gradient(135deg, #fff7ed, #ffffff 62%, #fef3c7);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 780px;
}

.filter-shell {
  padding-top: 36px;
}

.filter-shell.narrow,
.detail-content {
  width: min(980px, calc(100% - 32px));
}

.filter-bar {
  grid-template-columns: minmax(0, 1fr) 210px;
  margin-bottom: 26px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 34px rgba(28, 25, 23, 0.08);
}

.rank-cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

.rank-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.rank-cover span {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  border-radius: 50%;
  background: var(--accent);
}

.rank-content p {
  margin: 8px 0 12px;
  color: #57534e;
}

.detail-page {
  background: var(--bg);
}

.detail-hero {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.detail-inner {
  min-height: 540px;
  grid-template-columns: 300px minmax(0, 1fr);
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

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

.detail-copy h1 {
  color: #fff;
  font-size: clamp(36px, 5vw, 64px);
}

.detail-line {
  max-width: 820px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.player-section {
  width: min(1080px, calc(100% - 32px));
  margin: -84px auto 0;
  position: relative;
  z-index: 4;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 8px solid #fff;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video,
.player-cover,
.player-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.movie-video {
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.player-trigger {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  background: rgba(217, 119, 6, 0.95);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.player-trigger span {
  position: absolute;
  left: 34px;
  top: 27px;
  width: 0;
  height: 0;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #fff;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.25;
}

.content-card h2 + p {
  margin-top: 0;
}

.content-card p {
  color: #44403c;
  font-size: 17px;
}

.narrow-top {
  padding-top: 44px;
  padding-bottom: 20px;
}

.search-page {
  min-height: 440px;
}

.search-box {
  margin-bottom: 28px;
}

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

.site-footer {
  margin-top: 50px;
  color: #d6d3d1;
  background: #1c1917;
}

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

.footer-brand {
  color: #fff;
  font-size: 22px;
}

.site-footer p {
  margin: 12px 0 0;
  color: #a8a29e;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #a8a29e;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.empty-state {
  padding: 36px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fff;
}

@media (max-width: 1024px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-inner,
  .detail-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 62px 0 92px;
  }

  .hero-poster,
  .detail-poster {
    max-width: 300px;
  }

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

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

  .split-section,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .brand-text small {
    display: none;
  }

  .hero,
  .hero-inner {
    min-height: 610px;
  }

  .hero h1,
  .hero h2 {
    font-size: 38px;
  }

  .hero p {
    font-size: 15px;
  }

  .hero-poster,
  .detail-poster {
    display: none;
  }

  .section-block {
    padding: 46px 0;
  }

  .home-search,
  .search-box,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .movie-grid.tight,
  .search-result-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 96px 1fr;
    gap: 14px;
    padding: 12px;
  }

  .detail-inner {
    min-height: 470px;
  }

  .player-section {
    margin-top: -44px;
  }

  .player-box {
    border-width: 4px;
    border-radius: 18px;
  }

  .player-trigger {
    width: 66px;
    height: 66px;
  }

  .player-trigger span {
    left: 27px;
    top: 21px;
    border-top-width: 12px;
    border-bottom-width: 12px;
    border-left-width: 18px;
  }
}
