:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-soft: #f5f5f5;
  --text: #171717;
  --muted: #737373;
  --line: #e5e5e5;
  --primary: #3b4760;
  --primary-dark: #263145;
  --primary-soft: #ebeef5;
  --accent: #eab308;
  --shadow: 0 20px 50px rgba(23, 23, 23, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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(229, 229, 229, 0.92);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #111827);
  box-shadow: 0 12px 30px rgba(38, 49, 69, 0.28);
}

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

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

.nav-link,
.mobile-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: #525252;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

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

.header-search input,
.mobile-search input,
.search-large input,
.filter-bar input,
.filter-bar select {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 10px 14px;
  color: var(--text);
  outline: none;
}

.header-search input {
  width: 170px;
}

.header-search button,
.mobile-search button,
.search-large button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
}

.header-search button,
.mobile-search button,
.search-large button,
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 24px rgba(38, 49, 69, 0.22);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
}

.menu-toggle {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px 18px;
}

.mobile-logo {
  margin-bottom: 12px;
  font-weight: 900;
  color: var(--primary-dark);
}

.mobile-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.hero-slider {
  max-width: 1200px;
  margin: 24px auto 0;
  padding: 0 22px;
}

.hero-stage {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border-radius: 30px;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: scale(1.02);
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 24%, rgba(234, 179, 8, 0.28), transparent 32%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.58) 42%, rgba(0, 0, 0, 0.16) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 58%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 70px);
  bottom: clamp(34px, 8vw, 78px);
  max-width: 680px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 12px 0 16px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-line {
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  max-width: 650px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  font-size: 30px;
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

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

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

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 12px 24px rgba(23, 23, 23, 0.04);
}

.hero-thumb.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.hero-thumb img {
  width: 52px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-thumb span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  font-weight: 800;
}

.content-section {
  max-width: 1200px;
  margin: 54px auto;
  padding: 0 22px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.04em;
}

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

.section-head a {
  flex: 0 0 auto;
  color: var(--primary-dark);
  font-weight: 900;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 30px rgba(23, 23, 23, 0.05);
  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;
  aspect-ratio: 2 / 3;
  background: #111827;
}

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

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

.score-badge,
.type-badge {
  position: absolute;
  top: 10px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.score-badge {
  right: 10px;
  color: #111827;
  background: var(--accent);
}

.type-badge {
  left: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h3 a {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-line,
.card-line {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card-line {
  min-height: 42px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 10px;
}

.movie-card.compact .card-line,
.movie-card.compact .tag-row {
  display: none;
}

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

.rank-panel,
.copy-card,
.category-card-full,
.category-tile,
.page-hero,
.detail-top {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(23, 23, 23, 0.06);
}

.rank-panel {
  padding: 20px;
}

.rank-panel h2 {
  margin: 0 0 16px;
}

.rank-row {
  display: grid;
  grid-template-columns: 46px 56px minmax(0, 1fr) 54px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-weight: 900;
}

.top-rank .rank-number {
  color: #111827;
  background: var(--accent);
}

.rank-cover img {
  width: 56px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.rank-info p,
.rank-info span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.rank-info span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-score {
  color: var(--primary-dark);
  font-weight: 900;
  text-align: right;
}

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

.category-tile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 14px;
  padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span,
.category-card-full h2 {
  color: var(--primary-dark);
  font-weight: 900;
}

.category-tile strong {
  display: block;
  margin-top: 6px;
  font-size: 34px;
  line-height: 1;
}

.category-tile p,
.category-card-full p {
  color: var(--muted);
}

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

.mini-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 2 / 3;
  background: #111827;
}

.mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-card span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 7px 7px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.page-hero,
.detail-top {
  max-width: 1200px;
  margin: 24px auto 0;
  padding: clamp(28px, 6vw, 62px);
  background:
    radial-gradient(circle at 80% 10%, rgba(234, 179, 8, 0.18), transparent 28%),
    linear-gradient(135deg, #1f2937, #111827);
  color: #fff;
}

.slim-hero,
.category-hero,
.search-hero {
  min-height: 260px;
  display: flex;
  align-items: center;
}

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

.category-card-full {
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-count {
  float: right;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: #111827;
  background: var(--accent);
  font-size: 20px;
  font-weight: 900;
}

.category-card-full h2 {
  margin: 0 0 8px;
  color: var(--text);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.filter-bar input {
  flex: 1 1 280px;
}

.filter-bar select {
  min-width: 160px;
}

.rank-list {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 8px 18px;
  background: #fff;
}

.rank-list .rank-row {
  grid-template-columns: 58px 70px minmax(0, 1fr) 70px;
  padding: 14px 0;
}

.rank-list .rank-cover img {
  width: 70px;
  height: 92px;
}

.search-large {
  margin-top: 24px;
  max-width: 700px;
}

.search-large input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
}

.search-large button {
  padding: 14px 22px;
}

.search-status {
  margin-bottom: 18px;
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 900;
}

.detail-top {
  background:
    radial-gradient(circle at 75% 20%, rgba(234, 179, 8, 0.22), transparent 30%),
    linear-gradient(135deg, #1f2937, #111827 62%, #000);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.detail-info h1 {
  max-width: 800px;
}

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

.detail-meta span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.08);
}

.large-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.detail-info .primary-btn {
  display: inline-flex;
  margin-top: 24px;
}

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

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
  display: block;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.24));
  cursor: pointer;
}

.player-wrap.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: var(--accent);
  box-shadow: 0 18px 50px rgba(234, 179, 8, 0.35);
  font-size: 30px;
  text-indent: 4px;
}

.player-overlay strong {
  max-width: 80%;
  font-size: clamp(20px, 3vw, 34px);
  text-align: center;
}

.detail-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.copy-card {
  padding: 24px;
}

.copy-card h2 {
  margin: 0 0 12px;
  color: var(--primary-dark);
}

.copy-card p {
  margin: 0;
  color: #404040;
  white-space: pre-line;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: #111827;
  color: #fff;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 22px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.62);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.72);
}

.hidden-card {
  display: none !important;
}

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

  .split-section,
  .detail-copy {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    order: -1;
  }
}

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

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero-stage {
    min-height: 520px;
  }

  .hero-image {
    min-height: 520px;
  }

  .hero-thumbs,
  .category-grid,
  .category-full-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .category-tile {
    grid-template-columns: 1fr;
  }

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

  .rank-list .rank-row,
  .rank-row {
    grid-template-columns: 42px 54px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

  .detail-poster {
    max-width: 260px;
  }
}

@media (max-width: 520px) {
  .nav-shell,
  .hero-slider,
  .content-section {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .hero-stage {
    min-height: 500px;
    border-radius: 20px;
  }

  .hero-image {
    min-height: 500px;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 46px;
  }

  .hero-content p,
  .page-hero p,
  .detail-line {
    font-size: 15px;
  }

  .hero-control {
    display: none;
  }

  .movie-grid,
  .featured-grid,
  .small-grid,
  .catalog-grid {
    gap: 12px;
  }

  .card-body {
    padding: 11px;
  }

  .page-hero,
  .detail-top {
    margin-left: 14px;
    margin-right: 14px;
    padding: 26px 18px;
    border-radius: 22px;
  }

  .detail-info h1,
  .page-hero h1,
  .hero-content h1 {
    letter-spacing: -0.04em;
  }

  .footer-inner {
    flex-direction: column;
  }
}
