:root {
  --bg: #fafaf9;
  --paper: #ffffff;
  --ink: #0f172a;
  --muted: #57534e;
  --soft: #e7e5e4;
  --accent: #d97706;
  --accent-dark: #b45309;
  --accent-soft: #fef3c7;
  --blue-soft: #f8fafc;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-card: 0 4px 16px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-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.95);
  border-bottom: 1px solid rgba(231, 229, 228, 0.85);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  min-height: 68px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.25);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  color: #334155;
  font-weight: 700;
}

.desktop-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--accent);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 290px;
}

.top-search input,
.wide-search input,
.page-search-form input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid var(--soft);
  border-radius: 999px;
  background: #f5f5f4;
  color: var(--ink);
  outline: none;
  padding: 11px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search input:focus,
.wide-search input:focus,
.page-search-form input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.top-search button,
.wide-search button,
.page-search-form button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.top-search button:hover,
.wide-search button:hover,
.page-search-form button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav {
  display: grid;
  gap: 2px;
  padding: 0 16px 16px;
  background: #ffffff;
}

.mobile-nav a {
  padding: 12px 16px;
  border-radius: 12px;
  color: #334155;
  font-weight: 700;
}

.mobile-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.hero-carousel {
  position: relative;
  min-height: 500px;
  height: 70vh;
  overflow: hidden;
  background: var(--ink);
}

.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 {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 760px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: #f59e0b;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.14);
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  max-width: 920px;
  text-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.hero-content h1 + h2 {
  font-size: clamp(28px, 4vw, 48px);
  color: #fef3c7;
}

.hero-content p {
  max-width: 700px;
  margin: 0 0 24px;
  color: #e7e5e4;
  font-size: 18px;
  line-height: 1.85;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags,
.movie-tags,
.genre-links,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 18px;
}

.hero-tags span,
.movie-tags span,
.genre-links a,
.tag-list span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

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

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

.primary-button {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(217, 119, 6, 0.30);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.primary-button:hover {
  background: var(--accent-dark);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  font-size: 38px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.search-entry,
.section-block,
.filter-panel,
.search-page-panel {
  margin-top: 64px;
}

.search-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  gap: 32px;
  align-items: center;
  padding: 32px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.search-entry h2,
.section-title h2,
.filter-panel h2,
.side-card h2,
.detail-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
}

.search-entry p,
.filter-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.wide-search,
.page-search-form {
  display: flex;
  gap: 10px;
}

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

.section-title a {
  color: var(--accent-dark);
  font-weight: 900;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e7e5e4;
}

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

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

.score,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.92);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  padding: 8px 10px;
}

.score {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  text-align: center;
}

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

.movie-card h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 1.5em;
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

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

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

.movie-meta span {
  background: #f5f5f4;
  color: #57534e;
}

.movie-tags span,
.genre-links a,
.tag-list span {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.movie-card-compact .movie-card-body {
  padding: 15px;
}

.warm-block {
  padding: 34px;
  border-radius: 28px;
  background: linear-gradient(135deg, #fef3c7, #fdf8f6);
}

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

.category-tile,
.category-overview-card,
.detail-card,
.side-card,
.filter-panel,
.search-page-panel,
.page-hero {
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.category-tile {
  display: flex;
  min-height: 170px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  background: var(--blue-soft);
  box-shadow: var(--shadow);
}

.category-tile strong,
.category-heading strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.category-tile span,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.75;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rank-list .movie-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 190px;
}

.rank-list .movie-poster {
  height: 100%;
  aspect-ratio: auto;
}

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

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

.site-footer {
  margin-top: 84px;
  background: var(--ink);
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;
  padding: 54px 0;
}

.footer-brand {
  color: #ffffff;
}

.site-footer p {
  max-width: 520px;
  color: #a8a29e;
  line-height: 1.8;
}

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

.site-footer a:not(.brand) {
  display: block;
  margin: 9px 0;
  color: #a8a29e;
  transition: color 0.2s ease;
}

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

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px;
  color: #a8a29e;
  text-align: center;
}

.page-main {
  padding-top: 32px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin: 8px 0 24px;
  color: #78716c;
  font-size: 14px;
  font-weight: 700;
}

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

.breadcrumb a::after {
  content: "/";
  margin-left: 9px;
  color: #a8a29e;
}

.slim-hero {
  overflow: hidden;
  padding: clamp(32px, 6vw, 64px);
  background: linear-gradient(135deg, #ffffff, #f8fafc 45%, #fef3c7);
}

.slim-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
  font-weight: 900;
}

.slim-hero p:not(.eyebrow) {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 28px;
  align-items: center;
  padding: 24px;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 12px;
}

.category-overview-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
}

.category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.category-heading span {
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 900;
}

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

.related-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: var(--ink);
}

.related-card img {
  width: 96px;
  height: 62px;
  border-radius: 12px;
  object-fit: cover;
  background: #e7e5e4;
}

.related-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-card em {
  display: block;
  margin-top: 4px;
  color: #78716c;
  font-size: 12px;
  font-style: normal;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
  gap: 28px;
}

.detail-content,
.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 22px;
}

.player-card {
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.50), rgba(15, 23, 42, 0.15));
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-cover span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 18px 35px rgba(217, 119, 6, 0.34);
  font-size: 30px;
  transform: translateX(3px);
}

.detail-card,
.side-card {
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.2;
  font-weight: 900;
}

.detail-meta {
  margin-bottom: 22px;
  color: #57534e;
}

.detail-meta span {
  background: #f5f5f4;
}

.genre-links {
  margin-bottom: 24px;
}

.detail-card h2 {
  margin-bottom: 12px;
  font-size: 24px;
}

.detail-card p {
  margin: 0;
  color: #44403c;
  font-size: 16px;
  line-height: 1.95;
}

.tag-list span {
  background: #f5f5f4;
  color: #44403c;
}

.poster-card {
  text-align: center;
}

.poster-card img {
  width: 100%;
  max-height: 520px;
  border-radius: 18px;
  object-fit: cover;
  background: #e7e5e4;
}

.poster-card strong {
  display: block;
  margin-top: 16px;
  font-size: 22px;
  font-weight: 900;
}

.poster-card span {
  display: block;
  margin-top: 6px;
  color: #78716c;
}

.search-page-panel {
  padding: 26px;
}

.search-page-panel .page-search-form {
  max-width: 760px;
}

[hidden],
.is-filtered-out {
  display: none !important;
}

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

  .full-rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-toggle {
    display: block;
  }

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

  .hero-content {
    padding: 72px 24px 92px;
  }

  .hero-arrow {
    width: 42px;
    height: 42px;
    font-size: 30px;
  }

  .search-entry,
  .filter-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .wide-search,
  .page-search-form,
  .filter-controls {
    grid-template-columns: 1fr;
    display: grid;
  }

  .movie-grid,
  .listing-grid,
  .category-grid,
  .category-overview-grid,
  .rank-list,
  .full-rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-list .movie-card,
  .full-rank-list .movie-card {
    display: flex;
    min-height: auto;
  }

  .rank-list .movie-poster,
  .full-rank-list .movie-poster {
    aspect-ratio: 2 / 3;
  }
}

@media (max-width: 560px) {
  .site-container {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

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

  .hero-meta,
  .hero-tags,
  .hero-actions {
    gap: 8px;
  }

  .hero-prev {
    left: 12px;
  }

  .hero-next {
    right: 12px;
  }

  .search-entry,
  .warm-block,
  .filter-panel,
  .search-page-panel,
  .detail-card,
  .side-card,
  .slim-hero {
    padding: 20px;
    border-radius: 18px;
  }

  .movie-grid,
  .listing-grid,
  .category-grid,
  .category-overview-grid,
  .rank-list,
  .full-rank-list {
    grid-template-columns: 1fr;
  }
}
