:root {
  --color-primary: #0284c7;
  --color-primary-dark: #0369a1;
  --color-primary-soft: #f0f9ff;
  --color-secondary: #b45309;
  --color-accent: #dc2626;
  --color-bg: #fafaf9;
  --color-card: #ffffff;
  --color-text: #1c1917;
  --color-muted: #78716c;
  --color-border: #e7e5e4;
  --shadow-soft: 0 10px 30px rgba(28, 25, 23, 0.08);
  --shadow-card: 0 8px 22px rgba(28, 25, 23, 0.10);
  --radius-lg: 18px;
  --radius-md: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(231, 229, 228, 0.9);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  width: min(100% - 32px, var(--container));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary), #38bdf8);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.28);
}

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

.brand-text strong {
  font-size: 20px;
}

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

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

.nav-link {
  padding: 9px 13px;
  color: #57534e;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search {
  width: 228px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  background: #f5f5f4;
  border: 1px solid var(--color-border);
  border-radius: 999px;
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 10px;
  color: var(--color-text);
}

.header-search button,
.primary-button {
  border: 0;
  color: #ffffff;
  background: var(--color-primary);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f5f5f4;
  color: var(--color-text);
  cursor: pointer;
}

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

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

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

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

.hero-copy {
  max-width: 700px;
  color: #ffffff;
  animation: slideUp 0.55s ease both;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  color: #7dd3fc;
}

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

.hero p {
  margin: 0;
  max-width: 620px;
  color: #e7e5e4;
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags {
  margin: 24px 0;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: inherit;
  font-size: 13px;
  font-weight: 650;
}

.tag-row span,
.detail-meta span {
  background: #f5f5f4;
  color: #57534e;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: 999px;
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  font-weight: 700;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.7);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.36);
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

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

.hero-category-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.hero-category-strip .container {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
}

.hero-category-strip span {
  color: #bae6fd;
  font-weight: 800;
  white-space: nowrap;
}

.hero-category-strip a {
  white-space: nowrap;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.stats-strip a,
.category-card,
.category-overview-card,
.story-card,
.filter-panel,
.movie-card,
.category-panel {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.stats-strip a {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stats-strip strong {
  color: var(--color-primary);
  font-size: 34px;
  line-height: 1;
}

.stats-strip span {
  color: var(--color-muted);
  font-weight: 700;
}

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

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

.section-heading h2,
.category-panel h2,
.story-card h2,
.player-section h2 {
  margin: 4px 0 0;
  color: var(--color-text);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

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

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

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

.carousel-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 220px;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  scrollbar-width: none;
}

.carousel-row::-webkit-scrollbar {
  display: none;
}

.movie-card {
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-link {
  display: flex;
  height: 100%;
  flex-direction: column;
}

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

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

.movie-card:hover .movie-cover img,
.detail-poster:hover img {
  transform: scale(1.04);
}

.type-pill,
.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  min-width: 32px;
  text-align: center;
  background: rgba(220, 38, 38, 0.92);
}

.movie-info {
  padding: 14px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.movie-info h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.movie-meta {
  margin-top: auto;
  color: var(--color-muted);
  font-size: 13px;
}

.movie-meta span + span::before {
  margin-right: 8px;
  content: "·";
  color: #a8a29e;
}

.movie-card-list .movie-link {
  flex-direction: row;
}

.movie-card-list .wide-cover {
  width: 184px;
  flex: 0 0 184px;
  aspect-ratio: 4 / 3;
}

.movie-card-list .movie-info {
  padding: 18px;
}

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

.ranking-list,
.latest-list {
  display: grid;
  gap: 14px;
}

.category-panel {
  padding: 22px;
}

.category-mini-grid,
.category-overview-grid {
  display: grid;
  gap: 14px;
}

.category-card {
  display: block;
  padding: 16px;
  box-shadow: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.category-card:hover {
  background: var(--color-primary-soft);
  transform: translateY(-2px);
}

.category-card span {
  display: block;
  color: var(--color-primary-dark);
  font-weight: 850;
}

.category-card strong {
  display: block;
  margin-top: 5px;
  font-size: 28px;
}

.category-card p {
  margin: 8px 0 0;
  color: var(--color-muted);
  font-size: 13px;
}

.category-sections {
  display: grid;
  gap: 4px;
}

.page-hero {
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.35), transparent 36%), linear-gradient(135deg, #0f172a, #1c1917);
}

.small-page-hero {
  padding: 72px 0 66px;
}

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

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

.breadcrumb {
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #e7e5e4;
  font-size: 14px;
}

.breadcrumb a {
  color: #bae6fd;
}

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

.category-overview-card {
  padding: 22px;
}

.category-overview-card h2 {
  margin: 8px 0;
  font-size: 24px;
}

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

.category-overview-card ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.category-overview-card li + li {
  margin-top: 8px;
}

.category-overview-card li a {
  color: var(--color-primary-dark);
  font-size: 14px;
  font-weight: 700;
}

.category-count {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--color-primary);
  border-radius: 16px;
  font-size: 20px;
  font-weight: 900;
}

.filter-panel {
  margin-bottom: 18px;
  padding: 18px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text);
  background: #ffffff;
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.result-line {
  margin: 8px 0 18px;
  color: var(--color-muted);
  font-weight: 750;
}

.empty-message {
  padding: 24px;
  color: var(--color-muted);
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.detail-hero {
  padding: 48px 0 54px;
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.24), transparent 35%), linear-gradient(135deg, #0f172a, #1c1917 72%);
}

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

.detail-poster {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

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

.detail-copy h1 {
  margin: 10px 0 16px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
}

.lead-text {
  max-width: 840px;
  margin: 0 0 22px;
  color: #e7e5e4;
  font-size: 18px;
}

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

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

.player-shell {
  position: relative;
  margin-top: 18px;
  overflow: hidden;
  background: #000000;
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  aspect-ratio: 16 / 9;
}

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

.player-mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.70));
  cursor: pointer;
}

.player-mask.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.play-ring {
  width: 74px;
  height: 74px;
  display: inline-grid;
  place-items: center;
  padding-left: 5px;
  color: #ffffff;
  background: var(--color-primary);
  border-radius: 999px;
  box-shadow: 0 16px 36px rgba(2, 132, 199, 0.38);
  font-size: 34px;
}

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

.player-mask em {
  color: #e7e5e4;
  font-style: normal;
  font-weight: 750;
}

.content-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 28px;
}

.story-card {
  padding: 26px;
}

.story-card p {
  margin: 14px 0 0;
  color: #57534e;
  font-size: 16px;
}

.large-ranking {
  gap: 16px;
}

.site-footer {
  margin-top: 70px;
  padding: 42px 0;
  color: #d6d3d1;
  background: #1c1917;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  gap: 24px;
  align-items: start;
}

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

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

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

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

.footer-copy {
  white-space: nowrap;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 1080px) {
  .header-search {
    width: 190px;
  }

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

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

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

@media (max-width: 860px) {
  .nav-wrap {
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .main-nav {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px 14px;
  }

  .header-search {
    order: 4;
    width: 100%;
  }

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

  .hero-control {
    display: none;
  }

  .stats-strip,
  .filter-panel,
  .content-section,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    align-items: start;
  }

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

@media (max-width: 640px) {
  .brand-text small {
    display: none;
  }

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

  .hero-category-strip .container {
    min-height: 58px;
  }

  .movie-grid,
  .compact-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-card-list .movie-link {
    flex-direction: column;
  }

  .movie-card-list .wide-cover {
    width: 100%;
    flex-basis: auto;
    aspect-ratio: 16 / 10;
  }

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

  .small-page-hero {
    padding: 52px 0;
  }

  .player-shell {
    border-radius: 16px;
  }
}
