:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #10b981;
  --accent: #f59e0b;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--slate-50);
  color: var(--slate-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--slate-200);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--slate-900);
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), #0f766e);
  box-shadow: var(--shadow-sm);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--slate-700);
}

.desktop-nav a,
.nav-dropdown button {
  border: 0;
  background: transparent;
  padding: 8px 0;
  color: var(--slate-700);
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.nav-dropdown button:hover {
  color: var(--primary);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: 100%;
  left: -16px;
  width: 220px;
  padding: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-panel a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
}

.nav-dropdown-panel a:hover {
  background: #eff6ff;
}

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

.header-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
  min-height: 42px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--slate-100);
  color: var(--slate-900);
  padding: 0 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.search-page-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: transparent;
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.header-search button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: var(--white);
  padding: 0 16px;
  font-weight: 700;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--slate-100);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: var(--slate-700);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--slate-200);
  background: var(--white);
  padding: 12px 20px 18px;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-weight: 700;
  color: var(--slate-700);
}

.mobile-nav.is-open {
  display: block;
}

.hero {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.05));
}

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

.hero-copy {
  max-width: 720px;
  color: var(--white);
  animation: slideIn 0.5s ease both;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: #60a5fa;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 620px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  backdrop-filter: blur(8px);
}

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

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

.hero-dots button.is-active {
  width: 36px;
  background: var(--white);
}

.section {
  padding: 72px 0;
}

.section-white {
  background: var(--white);
}

.section-soft {
  background: var(--slate-50);
}

.section-dark {
  background: var(--slate-900);
  color: var(--white);
}

.section-gradient {
  background: linear-gradient(135deg, #eff6ff, var(--slate-50));
}

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

.section-heading-row h2,
.featured-layout h2,
.ranking-layout h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 22px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-ghost.light {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--white);
}

.full-width {
  width: 100%;
}

.card {
  overflow: hidden;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--slate-300);
  box-shadow: var(--shadow-md);
}

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

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 320px;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 14px;
  scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

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

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #1d4ed8, #0f172a);
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0));
}

.poster-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 8px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.78);
}

.category-badge {
  left: 10px;
  top: 10px;
  background: rgba(37, 99, 235, 0.9);
}

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

.movie-card h3 {
  margin: 0;
  color: var(--slate-900);
  font-size: 17px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--primary);
}

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

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--slate-500);
  font-size: 13px;
}

.movie-meta-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

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

.tag-list span,
.detail-tags span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-600);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card a {
  display: block;
  padding: 26px;
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  min-height: 52px;
  margin: 0 0 18px;
  color: var(--slate-600);
}

.category-samples {
  display: grid;
  gap: 8px;
}

.category-samples a,
.category-samples span {
  display: block;
  overflow: hidden;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-layout,
.ranking-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.7fr;
  gap: 36px;
  align-items: start;
}

.featured-layout p,
.ranking-layout p {
  margin: 16px 0 24px;
  color: var(--slate-600);
}

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

.ranking-layout p {
  color: var(--slate-300);
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 56px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateX(4px);
}

.rank-number {
  color: #93c5fd;
  font-size: 20px;
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: var(--slate-300);
  font-size: 13px;
}

.page-hero {
  background: linear-gradient(135deg, var(--primary), var(--slate-800));
  color: var(--white);
  padding: 72px 0;
}

.compact-hero {
  padding: 56px 0;
}

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

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--slate-500);
  font-size: 14px;
}

.page-hero .breadcrumb {
  color: #bfdbfe;
}

.breadcrumb a {
  color: inherit;
  font-weight: 800;
}

.breadcrumb a::after {
  content: "/";
  margin-left: 8px;
  opacity: 0.6;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
}

.empty-state {
  margin-top: 24px;
  padding: 48px;
  text-align: center;
  color: var(--slate-600);
  font-weight: 800;
}

.search-page-form {
  display: flex;
  gap: 12px;
  max-width: 720px;
  margin-top: 28px;
}

.search-page-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
}

.search-status {
  margin-bottom: 22px;
  color: var(--slate-600);
  font-weight: 800;
}

.ranking-page-list {
  display: grid;
  gap: 16px;
}

.ranking-card a {
  display: grid;
  grid-template-columns: 72px 180px 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px;
}

.ranking-card-number {
  color: var(--primary);
  font-size: 30px;
  font-weight: 900;
}

.ranking-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8, #0f172a);
}

.ranking-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-card p {
  margin: 0 0 10px;
  color: var(--slate-600);
}

.player-section {
  background: #020617;
  padding: 36px 0;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: var(--white);
  background: linear-gradient(to top, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.3));
  text-align: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.38);
  font-size: 30px;
  line-height: 1;
  padding-left: 4px;
}

.player-cover-title {
  max-width: min(80%, 720px);
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 900;
}

.player-tools {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.player-shell:hover .player-tools {
  opacity: 1;
  pointer-events: auto;
}

.player-tools button {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  padding: 8px 14px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.detail-section {
  padding-top: 42px;
}

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

.detail-main {
  padding: 30px;
}

.detail-main h1 {
  margin: 18px 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
}

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

.detail-meta span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.detail-main section {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--slate-200);
}

.detail-main h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.detail-main p {
  margin: 0;
  color: var(--slate-700);
  font-size: 16px;
  line-height: 1.9;
  white-space: pre-line;
}

.lead-text {
  font-weight: 800;
}

.detail-side {
  display: grid;
  gap: 20px;
  position: sticky;
  top: 92px;
}

.side-card {
  padding: 18px;
}

.side-card > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #1d4ed8, #0f172a);
}

.side-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 800;
}

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

.side-related {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
}

.side-related img {
  width: 96px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, #1d4ed8, #0f172a);
}

.side-related span {
  color: var(--slate-800);
  font-size: 14px;
  font-weight: 800;
}

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

.site-footer {
  background: var(--slate-900);
  color: var(--slate-300);
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

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

.site-footer p {
  max-width: 520px;
  margin: 16px 0 0;
  color: var(--slate-400);
}

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

.site-footer a:not(.site-logo) {
  display: block;
  margin: 8px 0;
  color: var(--slate-300);
  font-size: 14px;
}

.site-footer a:hover {
  color: #60a5fa;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--slate-800);
  color: var(--slate-400);
  font-size: 14px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .hero {
    height: 600px;
  }
}

@media (max-width: 1100px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-grid,
  .featured-layout,
  .ranking-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
    margin-left: auto;
  }

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

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .ranking-card a {
    grid-template-columns: 56px 1fr;
  }

  .ranking-thumb {
    display: none;
  }

  .rank-row {
    grid-template-columns: 44px 1fr;
  }

  .rank-meta {
    display: none;
  }

  .footer-grid,
  .footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .container-custom {
    width: min(100% - 24px, 1280px);
  }

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

  .hero-copy p {
    font-size: 16px;
  }

  .hero-actions,
  .section-heading-row,
  .search-page-form {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .related-grid,
  .editor-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-scroll {
    grid-auto-columns: min(86vw, 320px);
  }

  .detail-main {
    padding: 22px;
  }
}
