:root {
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-500: #3b82f6;
  --primary-600: #1e40af;
  --primary-700: #1e3a8a;
  --secondary-50: #ecfdf5;
  --secondary-600: #059669;
  --secondary-700: #047857;
  --accent-50: #fffbeb;
  --accent-500: #f59e0b;
  --accent-600: #92400e;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 34px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-2xl: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(30, 64, 175, 0.25);
}

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

.brand-text strong {
  color: var(--primary-600);
  font-size: 20px;
  letter-spacing: 0.02em;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

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

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

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

.header-search input,
.filter-bar input,
.search-page-form input {
  width: 250px;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  padding: 10px 14px;
  outline: none;
  color: var(--gray-800);
  background: var(--white);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input:focus,
.filter-bar input:focus,
.search-page-form input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

.header-search button,
.search-page-form button {
  border: 0;
  color: var(--white);
  background: var(--primary-600);
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

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

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--gray-700);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
  padding: 14px 24px 20px;
}

.mobile-nav a {
  padding: 10px 0;
  color: var(--gray-700);
  font-weight: 700;
}

.hero-section {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700) 48%, var(--secondary-600));
  padding: 64px 0 72px;
}

.hero-intro {
  text-align: center;
  margin-bottom: 42px;
}

.hero-intro h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-intro p {
  max-width: 760px;
  margin: 0 auto;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 21px);
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  background: var(--gray-900);
  aspect-ratio: 21 / 9;
}

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

.hero-slide.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(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: clamp(24px, 5vw, 58px);
  right: clamp(24px, 5vw, 58px);
  bottom: clamp(26px, 5vw, 58px);
  max-width: 760px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 14px;
  color: var(--white);
  background: rgba(59, 130, 246, 0.9);
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
}

.hero-content h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1.08;
  font-weight: 900;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--gray-200);
  font-size: 16px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: var(--white);
  background: var(--primary-600);
}

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

.button.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.button.ghost:hover {
  background: rgba(255, 255, 255, 0.26);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.45);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
  transition: background 0.2s ease;
}

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

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

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

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

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

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

.content-section {
  padding: 64px 0;
}

.soft-bg {
  background: linear-gradient(135deg, var(--secondary-50), var(--primary-50));
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.12;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--gray-600);
}

.section-link,
.text-link,
.panel-title a {
  color: var(--primary-600);
  font-weight: 800;
}

.section-link:hover,
.text-link:hover,
.panel-title a:hover {
  color: var(--primary-700);
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--primary-100), var(--secondary-50));
}

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

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

.movie-type {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  color: var(--white);
  background: var(--primary-600);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}

.movie-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.movie-body strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 46px;
  color: var(--gray-900);
  font-size: 16px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card:hover .movie-body strong {
  color: var(--primary-600);
}

.movie-meta,
.movie-line {
  display: -webkit-box;
  overflow: hidden;
  color: var(--gray-500);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.category-tile {
  display: grid;
  min-height: 150px;
  align-content: space-between;
  padding: 22px;
  color: var(--gray-900);
  background: var(--white);
  border: 1px solid rgba(30, 64, 175, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span {
  color: var(--primary-600);
  font-weight: 900;
  font-size: 20px;
}

.category-tile strong {
  font-size: 28px;
}

.category-tile small {
  color: var(--gray-500);
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
}

.ranking-panel,
.detail-side,
.detail-article {
  border-radius: var(--radius-2xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

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

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.panel-title h2 {
  margin: 0;
}

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

.compact-card {
  border-radius: 16px;
  box-shadow: none;
  border: 1px solid var(--gray-200);
}

.compact-card:hover {
  transform: none;
  background: var(--gray-50);
  box-shadow: var(--shadow-sm);
}

.compact-link {
  display: grid;
  grid-template-columns: auto 72px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px;
}

.ranking-list .compact-link {
  grid-template-columns: auto 92px minmax(0, 1fr);
}

.compact-link img {
  width: 72px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--primary-50);
}

.ranking-list .compact-link img {
  width: 92px;
  height: 116px;
}

.rank-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.compact-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.compact-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-info small,
.compact-info em {
  color: var(--gray-500);
  font-style: normal;
  font-size: 13px;
}

.compact-info em {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page-hero,
.detail-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700) 54%, var(--secondary-600));
  padding: 56px 0;
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 4px 12px;
  color: var(--primary-100);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-weight: 800;
}

.page-hero h1,
.detail-info h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--primary-100);
  font-size: 18px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  border-radius: var(--radius-2xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.category-cover-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-cover-pair img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 16px;
  background: var(--primary-50);
}

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

.category-overview-card p {
  color: var(--gray-600);
}

.category-overview-card span {
  display: inline-flex;
  margin: 10px 0;
  padding: 5px 10px;
  color: var(--primary-700);
  background: var(--primary-50);
  border-radius: 999px;
  font-weight: 800;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.filter-bar input {
  width: min(520px, 100%);
}

.filter-bar span {
  color: var(--gray-600);
  font-weight: 800;
}

.search-page-form {
  display: flex;
  gap: 10px;
  max-width: 640px;
  margin-top: 24px;
}

.search-page-form input {
  flex: 1;
  width: auto;
}

.search-summary {
  margin-bottom: 22px;
  padding: 18px;
  color: var(--gray-700);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  font-weight: 800;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  background: rgba(255, 255, 255, 0.12);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

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

.detail-one-line {
  max-width: 820px;
  color: var(--primary-100);
  font-size: 19px;
}

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

.detail-meta-list span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background: #050816;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050816;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 12px;
  place-content: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(30, 64, 175, 0.28), rgba(0, 0, 0, 0.72));
  cursor: pointer;
}

.player-start span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  margin: 0 auto;
  color: var(--primary-700);
  background: var(--white);
  border-radius: 999px;
  font-size: 34px;
  box-shadow: var(--shadow-lg);
}

.player-start strong {
  font-size: 20px;
}

.video-shell.is-playing .player-start {
  display: none;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.detail-article,
.detail-side {
  padding: 28px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 14px;
}

.detail-article p {
  margin: 0 0 24px;
  color: var(--gray-700);
  font-size: 17px;
  line-height: 1.9;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

.detail-side dt {
  color: var(--gray-500);
}

.detail-side dd {
  margin: 0;
  font-weight: 800;
}

.detail-side a {
  color: var(--primary-600);
}

.site-footer {
  color: var(--gray-300);
  background: var(--gray-900);
}

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

.footer-brand .brand-text strong {
  color: var(--white);
}

.footer-about p,
.site-footer a,
.footer-bottom {
  color: var(--gray-400);
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.site-footer a {
  display: block;
  margin: 8px 0;
}

.site-footer a:hover {
  color: var(--primary-100);
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

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

@media (max-width: 1100px) {
  .six-grid,
  .five-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .two-column-layout,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .hero-carousel {
    aspect-ratio: 4 / 3;
    min-height: 430px;
  }

  .hero-content p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .category-overview-grid,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1240px);
  }

  .hero-section,
  .page-hero,
  .detail-hero {
    padding: 42px 0;
  }

  .content-section {
    padding: 42px 0;
  }

  .section-heading,
  .filter-bar,
  .search-page-form {
    align-items: stretch;
    flex-direction: column;
  }

  .six-grid,
  .five-grid,
  .four-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-body {
    padding: 12px;
  }

  .movie-body strong {
    min-height: 42px;
    font-size: 15px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 42px;
  }

  .compact-link,
  .ranking-list .compact-link {
    grid-template-columns: auto 70px minmax(0, 1fr);
  }

  .compact-link img,
  .ranking-list .compact-link img {
    width: 70px;
    height: 88px;
  }

  .detail-article,
  .detail-side {
    padding: 20px;
  }
}
