:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --accent-50: #ecfdf5;
  --accent-500: #10b981;
  --orange-500: #f97316;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 25px 60px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  box-shadow: var(--shadow-sm);
}

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

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

.brand-text em {
  font-style: normal;
  color: var(--gray-500);
  font-size: 12px;
  margin-top: 3px;
}

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

.nav-link,
.mobile-panel a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--gray-700);
  font-weight: 600;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-panel a:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  width: 190px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s;
}

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

.dropdown-panel a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--gray-600);
}

.dropdown-panel a:hover {
  background: var(--gray-100);
  color: var(--primary-700);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  background: var(--gray-100);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px;
  min-width: 280px;
}

.header-search:focus-within {
  border-color: var(--primary-400);
  background: var(--white);
}

.header-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 12px;
  min-width: 0;
}

.header-search button {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--primary-600);
  color: var(--white);
  cursor: pointer;
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--gray-700);
  border-radius: 2px;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 16px;
  border-top: 1px solid var(--gray-200);
}

.mobile-panel.is-open {
  display: grid;
  gap: 6px;
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: var(--gray-900);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62) 46%, rgba(15, 23, 42, 0.18)), linear-gradient(0deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.05));
}

.hero-content {
  position: absolute;
  inset: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: var(--white);
}

.hero-label {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.88);
  font-weight: 700;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.hero h1 {
  margin: 0 0 18px;
  max-width: 760px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.info-pills span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  padding: 6px 12px;
  font-size: 13px;
  backdrop-filter: blur(10px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 12px 20px;
  font-weight: 800;
  transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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

.btn-light {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.section {
  padding-top: 54px;
  padding-bottom: 54px;
}

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

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

.section-title span {
  display: block;
  color: var(--primary-600);
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin-bottom: 3px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
}

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

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

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

.movie-card {
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-100);
}

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

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

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

.card-body {
  padding: 15px;
}

.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--gray-900);
  font-weight: 900;
  font-size: 17px;
  line-height: 1.35;
  margin: 6px 0 8px;
}

.card-title:hover {
  color: var(--primary-600);
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
}

.tag-row span {
  background: var(--primary-50);
  color: var(--primary-700);
  padding: 4px 9px;
  font-size: 12px;
}

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

.category-card,
.category-overview-card {
  min-height: 160px;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
  border: 1px solid rgba(14, 165, 233, 0.14);
  transition: transform 0.22s, box-shadow 0.22s;
}

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

.category-card strong,
.category-overview-card h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 22px;
}

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

.category-overview-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.category-overview-card div span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--gray-600);
  font-size: 13px;
}

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

.rank-panel,
.side-card,
.content-card,
.player-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}

.rank-panel {
  position: sticky;
  top: 94px;
  padding: 22px;
}

.rank-panel h2,
.side-card h2,
.content-card h2 {
  margin: 0 0 18px;
}

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

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  border-radius: 16px;
}

.movie-card-horizontal .poster {
  aspect-ratio: 2 / 3;
}

.movie-card-horizontal .card-body {
  padding: 12px 14px;
}

.movie-card-horizontal .card-title {
  -webkit-line-clamp: 2;
  font-size: 15px;
  margin-top: 2px;
}

.movie-card-horizontal .card-body p {
  min-height: 0;
  font-size: 13px;
}

.rank-badge {
  position: absolute;
  left: 9px;
  top: 9px;
  z-index: 2;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange-500), #facc15);
  color: var(--white);
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}

.page-hero {
  padding: 58px 0;
  color: var(--white);
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 34%), linear-gradient(135deg, var(--primary-700), var(--primary-500));
}

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

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.detail-head .breadcrumb {
  color: var(--gray-500);
  padding: 28px 0 18px;
}

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

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 170px 170px 170px;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: var(--white);
  color: var(--gray-700);
  padding: 12px 14px;
  outline: 0;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card {
  overflow: hidden;
}

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

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 20px;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.1));
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

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

.play-icon {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 165, 233, 0.92);
  color: var(--white);
  font-size: 34px;
  box-shadow: var(--shadow-lg);
}

.player-cover strong {
  font-size: 24px;
}

.player-cover em {
  font-style: normal;
  opacity: 0.82;
}

.content-card {
  padding: 28px;
}

.content-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
}

.content-card h2 {
  margin-top: 28px;
  font-size: 22px;
}

.content-card p {
  color: var(--gray-700);
  font-size: 16px;
  white-space: pre-line;
}

.lead-text {
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
  color: var(--gray-900) !important;
  font-weight: 700;
}

.info-pills {
  margin-bottom: 18px;
}

.info-pills span,
.detail-tags span {
  background: var(--primary-50);
  color: var(--primary-700);
}

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

.detail-aside {
  display: grid;
  gap: 20px;
  position: sticky;
  top: 94px;
}

.side-card {
  padding: 20px;
}

.poster-info img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 16px;
  background: var(--gray-200);
}

.poster-info .btn {
  width: 100%;
}

.site-footer {
  background: var(--gray-900);
  color: rgba(255, 255, 255, 0.72);
  margin-top: 30px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  color: var(--white);
  margin-bottom: 14px;
}

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

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

.footer-links a:hover {
  color: var(--primary-400);
}

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

[data-filter-card].is-hidden {
  display: none;
}

@media (max-width: 1180px) {
  .movie-grid,
  .large-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .rank-panel,
  .detail-aside {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero {
    min-height: 560px;
    height: 76vh;
  }

  .hero-control {
    display: none;
  }

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

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

  .filter-search {
    grid-column: 1 / -1;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .page-shell,
  .hero-content,
  .footer-inner,
  .copyright {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-text em {
    display: none;
  }

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

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

  .movie-grid,
  .large-grid,
  .category-grid,
  .category-overview-grid,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .content-card,
  .side-card,
  .rank-panel {
    padding: 18px;
  }
}
