:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --neutral-950: #0f172a;
  --neutral-900: #111827;
  --neutral-800: #1f2937;
  --neutral-700: #374151;
  --neutral-600: #4b5563;
  --neutral-500: #6b7280;
  --neutral-300: #d1d5db;
  --neutral-200: #e5e7eb;
  --neutral-100: #f3f4f6;
  --neutral-50: #f9fafb;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--neutral-900);
  background: var(--neutral-50);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.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.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.24);
}

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

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

.nav-link {
  color: var(--neutral-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--neutral-800);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-form.compact {
  width: 310px;
}

.search-form button {
  height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  color: var(--white);
  background: var(--primary);
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  color: var(--neutral-800);
  background: var(--neutral-100);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--neutral-200);
  padding: 16px;
}

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

.mobile-nav {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: var(--neutral-950);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(15, 23, 42, 0.62) 44%, rgba(15, 23, 42, 0.12) 100%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(32px, calc((100vw - 1180px) / 2));
  width: min(660px, calc(100% - 64px));
  transform: translateY(-50%);
  color: var(--white);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content h1 {
  font-size: clamp(34px, 5vw, 68px);
}

.hero-content h2 {
  margin-top: 14px;
  font-size: clamp(24px, 3vw, 42px);
  color: rgba(255, 255, 255, 0.92);
}

.hero-content p:not(.eyebrow) {
  max-width: 620px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.primary-button {
  min-height: 46px;
  padding: 0 22px;
  color: var(--white);
  background: var(--primary);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
  transition: background 0.2s ease, transform 0.2s ease;
}

.primary-button.full {
  width: 100%;
  margin-top: 16px;
}

.ghost-button {
  min-height: 46px;
  padding: 0 22px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.text-link {
  color: var(--primary);
}

.text-link:hover {
  color: var(--primary-dark);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.44);
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-arrow.left {
  left: 20px;
}

.hero-arrow.right {
  right: 20px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--white);
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 28px;
  align-items: center;
  margin-top: -64px;
  padding: 28px;
  position: relative;
  z-index: 5;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.intro-panel h2,
.section-heading h2,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  color: var(--neutral-900);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.intro-panel h2 {
  font-size: clamp(26px, 3vw, 40px);
}

.intro-panel p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--neutral-600);
}

.hero-search {
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: 18px;
  padding: 10px;
}

.section-block,
.page-main {
  padding: 64px 0;
}

.section-block + .section-block {
  padding-top: 12px;
}

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

.section-heading h2 {
  font-size: clamp(26px, 3vw, 36px);
}

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

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--neutral-200);
}

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

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

.poster-badge,
.poster-play,
.rank-badge {
  position: absolute;
  border-radius: 999px;
  font-weight: 800;
}

.poster-badge {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  color: var(--white);
  background: var(--primary);
  font-size: 12px;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--neutral-500);
  font-size: 12px;
}

.card-meta span,
.detail-meta span {
  padding: 4px 8px;
  background: var(--neutral-100);
  border-radius: 999px;
}

.card-body h2 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.card-body h2 a:hover,
.wide-content h2 a:hover,
.detail-tags a:hover {
  color: var(--primary);
}

.card-body p {
  display: -webkit-box;
  min-height: 50px;
  margin: 0;
  overflow: hidden;
  color: var(--neutral-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-list span,
.detail-tags a {
  padding: 5px 9px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-pills a {
  padding: 12px 18px;
  color: var(--neutral-700);
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 999px;
  box-shadow: var(--soft-shadow);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.category-pills a:hover {
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 32px;
  align-items: start;
}

.ranking-panel,
.side-card,
.detail-content,
.player-card,
.cover-side,
.prev-next {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.ranking-panel {
  padding: 22px;
  position: sticky;
  top: 92px;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.wide-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: var(--neutral-200);
}

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

.rank-badge {
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  color: var(--white);
  background: var(--primary);
  font-size: 12px;
}

.wide-content h2 {
  margin: 8px 0;
  font-size: 18px;
  line-height: 1.3;
}

.wide-content p {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--neutral-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-main {
  min-height: 68vh;
}

.page-hero {
  margin-bottom: 34px;
  padding: 36px;
  overflow: hidden;
  position: relative;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 28%), linear-gradient(135deg, var(--white), #eef4ff);
  border: 1px solid rgba(219, 234, 254, 0.9);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.page-hero h1 {
  font-size: clamp(32px, 4vw, 52px);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--neutral-600);
}

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

.category-card a {
  display: block;
  overflow: hidden;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px;
  background: var(--neutral-100);
}

.category-thumbs img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.category-info {
  padding: 18px;
}

.category-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-info p {
  margin: 0 0 14px;
  color: var(--neutral-600);
  font-size: 14px;
}

.category-info span {
  color: var(--primary);
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--neutral-500);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.player-card {
  overflow: hidden;
  padding: 0;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.34));
  transition: opacity 0.2s ease;
}

.player-start {
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--primary);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.36);
  font-size: 34px;
  pointer-events: auto;
}

.player-box.is-playing .play-overlay {
  opacity: 0;
}

.player-status {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  color: var(--white);
  text-align: center;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.detail-content {
  margin-top: 20px;
  padding: 28px;
}

.detail-content h1 {
  font-size: clamp(30px, 4vw, 46px);
}

.detail-one-line {
  margin: 16px 0 18px;
  color: var(--neutral-700);
  font-size: 18px;
  font-weight: 650;
}

.detail-content h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-content p {
  color: var(--neutral-700);
}

.cover-side {
  overflow: hidden;
  padding: 16px;
}

.cover-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.side-card {
  padding: 18px;
  margin-bottom: 18px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.side-list .wide-card {
  grid-template-columns: 92px minmax(0, 1fr);
  padding: 10px;
}

.side-list .wide-content p,
.side-list .text-link {
  display: none;
}

.side-list .wide-content h2 {
  font-size: 15px;
}

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
  padding: 18px;
}

.prev-next a {
  padding: 14px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 12px;
  font-weight: 800;
}

.site-footer {
  margin-top: 52px;
  color: rgba(255, 255, 255, 0.86);
  background: var(--neutral-950);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 36px;
  padding: 46px 0;
}

.footer-logo {
  color: var(--white);
}

.footer-brand p {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.68);
}

.footer-links h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 20px;
}

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

.footer-links a {
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.footer-links a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  color: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .search-form.compact {
    display: none;
  }

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

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

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

  .ranking-panel {
    position: static;
  }
}

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

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content {
    left: 24px;
    width: calc(100% - 48px);
  }

  .hero-arrow {
    display: none;
  }

  .intro-panel,
  .footer-inner,
  .filter-bar,
  .prev-next {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero {
    min-height: 540px;
  }

  .hero-content p:not(.eyebrow) {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .intro-panel,
  .page-hero,
  .detail-content {
    padding: 22px;
  }

  .four-col,
  .three-col,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .wide-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

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