:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --secondary: #8b5cf6;
  --accent: #f97316;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --white: #ffffff;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-medium: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-hard: 0 28px 70px rgba(15, 23, 42, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.32);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 650;
  color: #475569;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--primary-dark);
}

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

.nav-search input,
.mobile-nav input,
.filter-panel input {
  width: 260px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  padding: 10px 16px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-nav input:focus,
.filter-panel input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

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

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

.mobile-toggle {
  display: none;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px 24px 22px;
  background: #ffffff;
}

.mobile-nav.is-open {
  display: grid;
  gap: 14px;
}

.mobile-nav input {
  width: 100%;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #0f172a;
}

.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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 28%, rgba(14, 165, 233, 0.26), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.62) 44%, rgba(15, 23, 42, 0.25) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.7), transparent 50%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 72px;
  max-width: 680px;
  color: #ffffff;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--primary);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.3);
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-content p {
  margin: 0;
  max-width: 610px;
  color: #e2e8f0;
  font-size: 17px;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin-top: 20px;
  color: #cbd5e1;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.card-meta a {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  padding: 5px 11px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.inline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.28);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.inline-btn:hover {
  transform: translateY(-2px);
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.main-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
}

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

.section-title {
  margin: 0;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.grid,
.category-grid {
  display: grid;
  gap: 24px;
}

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

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

.content-split {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  gap: 32px;
  align-items: start;
}

.movie-card,
.category-card,
.panel,
.detail-card,
.player-card,
.rank-row {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.75);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

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

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

.card-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.card-thumb img,
.mini-thumb img,
.detail-cover img,
.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .card-thumb img,
.mini-card:hover .mini-thumb img {
  transform: scale(1.05);
}

.duration {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.card-tags span,
.detail-tags span {
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 750;
}

.movie-card h2 {
  margin: 0 0 9px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.mini-card h3:hover,
.rank-title:hover {
  color: var(--primary-dark);
}

.movie-card p {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 16px;
  overflow: hidden;
  color: #64748b;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  color: #64748b;
  font-size: 13px;
}

.card-meta span,
.card-meta a,
.detail-meta span {
  background: #f1f5f9;
}

.feature-strip {
  margin: 62px 0;
  border-radius: 34px;
  padding: 34px;
  background: linear-gradient(135deg, #eef2ff, #e0f2fe);
}

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

.category-card {
  display: block;
  padding: 24px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 19px;
}

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

.category-card span {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.sidebar-list,
.mini-list {
  display: grid;
  gap: 14px;
}

.mini-card {
  display: flex;
  gap: 13px;
  border-radius: 16px;
  padding: 10px;
  background: #ffffff;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.mini-card:hover {
  background: #f8fafc;
  box-shadow: var(--shadow-soft);
}

.mini-thumb {
  position: relative;
  width: 128px;
  height: 78px;
  flex: 0 0 128px;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.mini-thumb span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  padding: 2px 6px;
  font-size: 11px;
}

.mini-info {
  min-width: 0;
  padding: 4px 0;
}

.mini-info h3 {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-info p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  padding: 70px 24px;
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.page-hero a {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.page-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
}

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

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chips a,
.inline-btn {
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  border: 1px solid #e2e8f0;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 750;
}

.filter-chips a:hover {
  color: var(--primary-dark);
  border-color: #bae6fd;
  box-shadow: var(--shadow-soft);
}

.no-result {
  grid-column: 1 / -1;
  border-radius: 24px;
  background: #ffffff;
  padding: 48px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.no-result strong {
  display: block;
  color: #0f172a;
  font-size: 24px;
}

.no-result p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(14, 165, 233, 0.28), rgba(15, 23, 42, 0.44)),
    rgba(15, 23, 42, 0.2);
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.95);
  box-shadow: 0 18px 45px rgba(14, 165, 233, 0.35);
  font-size: 34px;
  transform: translateX(3px);
}

.play-overlay.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.detail-card {
  padding: 28px;
  margin-bottom: 24px;
}

.detail-kicker {
  display: inline-flex;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 850;
}

.detail-card h1 {
  margin: 16px 0 12px;
  color: #0f172a;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.detail-intro {
  margin: 18px 0 0;
  color: #334155;
  font-size: 18px;
  font-weight: 650;
}

.detail-section {
  margin-top: 26px;
}

.detail-section h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 22px;
}

.detail-section p {
  margin: 0;
  color: #475569;
  white-space: pre-line;
}

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

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  box-shadow: var(--shadow-soft);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 142px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  font-weight: 900;
}

.rank-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

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

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 34px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 38px;
}

.footer-brand {
  color: #ffffff;
  margin-bottom: 14px;
}

.footer-grid p {
  max-width: 420px;
  margin: 0;
  color: #94a3b8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a:hover {
  color: #38bdf8;
}

.footer-copy {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  padding: 20px 24px 28px;
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
}

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

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

  .side-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
  }

  .nav-wrap {
    padding: 0 16px;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 70px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .main-shell {
    padding: 38px 16px;
  }

  .feature-strip,
  .detail-card,
  .panel {
    padding: 22px;
  }

  .section-head,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .rank-row {
    grid-template-columns: 38px 108px minmax(0, 1fr);
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .grid.cards-4,
  .grid.cards-3,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    height: 520px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .mini-thumb {
    width: 106px;
    height: 68px;
    flex-basis: 106px;
  }

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

  .rank-num {
    position: absolute;
    margin: 8px;
  }
}
