:root {
  --page-bg: #f8fafc;
  --paper: #ffffff;
  --paper-soft: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --muted-strong: #475569;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --accent: #334155;
  --accent-soft: #e2e8f0;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page-bg);
  min-height: 100vh;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

button,
input {
  font: inherit;
}

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

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

.site-logo {
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #334155, #0f172a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav,
.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: var(--muted-strong);
  font-weight: 700;
  line-height: 68px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 56px;
  left: -14px;
  min-width: 190px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted-strong);
  font-size: 14px;
}

.dropdown-panel a:hover {
  color: var(--ink);
  background: var(--paper-soft);
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.icon-button:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
}

.search-panel {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.search-panel input,
.search-page-form input,
.filter-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px;
  outline: none;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
}

.search-panel input:focus,
.search-page-form input:focus,
.filter-box input:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.18);
}

.search-panel button,
.search-page-form button,
.primary-button {
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 12px 10px;
  border-radius: 12px;
  color: var(--muted-strong);
  font-weight: 700;
}

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

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 42%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(115deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.88) 45%, rgba(15, 23, 42, 0.36) 100%);
}

.hero-shade {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(1px);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--container));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 48px;
  align-items: center;
  padding: 76px 0 135px;
}

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

.eyebrow,
.section-kicker {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 3.5vw, 46px);
  line-height: 1.1;
}

.hero-copy p {
  color: #dbeafe;
  margin: 0 0 24px;
  font-size: clamp(16px, 1.8vw, 21px);
  line-height: 1.8;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.hero-tags span,
.tag-list a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.primary-button,
.ghost-button {
  min-height: 48px;
  border-radius: 14px;
  padding: 0 22px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.hero-actions .primary-button {
  background: #fff;
  color: var(--ink);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(14px);
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster span,
.movie-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-poster:hover span,
.movie-card:hover .movie-play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.04);
}

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

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

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

.featured-overlap {
  width: min(100% - 32px, var(--container));
  margin: -82px auto 60px;
  position: relative;
  z-index: 8;
}

.section-grid,
.movie-grid,
.wide-grid,
.category-grid,
.category-chip-grid {
  display: grid;
  gap: 22px;
}

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

.content-section {
  width: min(100% - 32px, var(--container));
  margin: 0 auto 72px;
}

.soft-block {
  width: 100%;
  max-width: none;
  background: #fff;
  padding: 64px max(16px, calc((100vw - var(--container)) / 2));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-heading.compact {
  align-items: center;
  margin-bottom: 18px;
}

.section-heading h2,
.section-heading h1,
.page-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading a {
  color: var(--muted-strong);
  font-weight: 800;
}

.section-heading a:hover {
  color: var(--ink);
}

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

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

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

.movie-card {
  background: var(--paper);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  border-color: #cbd5e1;
}

.movie-card-image {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e2e8f0;
}

.movie-card-wide .movie-card-image {
  aspect-ratio: 16 / 10;
}

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

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

.movie-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.44), transparent 46%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-card-image::after {
  opacity: 1;
}

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

.movie-card-meta,
.rank-meta,
.detail-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p,
.rank-item p,
.category-card p,
.page-hero p,
.detail-card p,
.site-footer p {
  color: var(--muted-strong);
  line-height: 1.75;
  margin: 0;
}

.movie-card p {
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-chip {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: #fff;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-chip:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.category-chip span {
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
}

.category-chip small {
  color: var(--muted);
  line-height: 1.45;
}

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

.ranking-panel,
.side-box,
.detail-card,
.player-card,
.filter-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.ranking-panel,
.side-box,
.detail-card,
.filter-box {
  padding: 24px;
}

.rank-item {
  display: grid;
  grid-template-columns: 72px 40px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.rank-item:first-of-type {
  border-top: 0;
}

.rank-poster {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  background: #e2e8f0;
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-number {
  font-size: 24px;
  font-weight: 950;
  color: #cbd5e1;
}

.rank-content h3 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.35;
}

.rank-content p {
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero {
  width: min(100% - 32px, var(--container));
  margin: 34px auto 46px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 82% 20%, rgba(148, 163, 184, 0.32), transparent 30%),
    linear-gradient(135deg, #0f172a, #334155);
  min-height: 280px;
  padding: 56px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.page-hero h1,
.page-hero p {
  color: #fff;
  max-width: 800px;
}

.page-hero p {
  color: #dbeafe;
  font-size: 18px;
  margin-top: 16px;
}

.sub-page-hero {
  margin-top: 28px;
}

.subdir-section {
  margin-bottom: 60px;
}

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

.category-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 170px;
  overflow: hidden;
  background: #e2e8f0;
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-body {
  padding: 20px;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 23px;
  letter-spacing: -0.03em;
}

.category-card span {
  display: inline-flex;
  margin-top: 16px;
  color: var(--ink);
  font-weight: 900;
}

.library-tools {
  margin-bottom: 26px;
}

.filter-box {
  display: grid;
  gap: 18px;
}

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

.filter-chips button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 9px 14px;
  cursor: pointer;
  color: var(--muted-strong);
  font-weight: 800;
}

.filter-chips button.is-active,
.filter-chips button:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.search-summary {
  margin: 18px 0 24px;
  color: var(--muted-strong);
  font-weight: 800;
}

.search-page-block {
  min-height: 480px;
}

.ranking-list-block {
  margin-bottom: 52px;
}

.ranking-list {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 10px 24px;
  box-shadow: var(--shadow-soft);
}

.detail-layout {
  width: min(100% - 32px, var(--container));
  margin: 34px auto 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.breadcrumb {
  display: flex;
  gap: 9px;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 18px;
  font-size: 14px;
}

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

.player-card {
  padding: 0;
  overflow: hidden;
  margin-bottom: 22px;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.08));
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play-mark {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  font-size: 34px;
  padding-left: 4px;
}

.player-overlay strong {
  font-size: 18px;
  letter-spacing: 0.05em;
}

.detail-card {
  margin-bottom: 22px;
}

.detail-card h1 {
  margin: 8px 0 16px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-card h2,
.side-box h2 {
  margin: 0 0 16px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.lead-text {
  font-size: 19px;
}

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

.detail-meta a,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  background: #f1f5f9;
  color: var(--muted-strong);
}

.movie-copy .tag-list {
  margin: 18px 0 0;
}

.movie-copy .tag-list a {
  background: var(--dark);
  color: #fff;
}

.detail-side {
  position: sticky;
  top: 92px;
}

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

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

.side-list .movie-card-image {
  aspect-ratio: auto;
  height: 100%;
  min-height: 132px;
}

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

.site-footer-inner {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 56px 0 36px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 46px;
}

.site-footer h2,
.site-footer h3 {
  color: #fff;
  margin: 0 0 16px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  border-top: 1px solid #1e293b;
  text-align: center;
  color: #94a3b8;
  padding: 22px;
  font-size: 14px;
}

[hidden],
.movie-card.is-hidden {
  display: none !important;
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 64px;
  }

  .hero-poster {
    display: none;
  }

  .hero-mini-grid,
  .wide-grid,
  .category-grid,
  .split-section,
  .detail-layout,
  .site-footer-inner {
    grid-template-columns: 1fr;
  }

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

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

  .detail-side {
    position: static;
  }
}

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

  .site-logo {
    font-size: 22px;
  }

  .hero-carousel {
    min-height: 620px;
  }

  .hero-content {
    padding-bottom: 120px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-copy h2 {
    font-size: 28px;
  }

  .featured-overlap {
    margin-top: -70px;
  }

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

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

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

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .page-hero {
    padding: 34px 24px;
    border-radius: 22px;
  }

  .rank-item {
    grid-template-columns: 62px 34px minmax(0, 1fr);
  }

  .rank-poster {
    width: 62px;
    height: 62px;
  }

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

  .search-panel form,
  .search-page-form {
    flex-direction: column;
  }

  .search-panel button,
  .search-page-form button {
    min-height: 46px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .small-grid,
  .category-chip-grid {
    grid-template-columns: 1fr;
  }

  .movie-card {
    border-radius: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }
}
