:root {
  --brand-blue: #2563eb;
  --brand-cyan: #06b6d4;
  --brand-teal: #14b8a6;
  --brand-orange: #f97316;
  --brand-red: #ef4444;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e2e8f0;
  --card: #ffffff;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: #fff;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-cyan), var(--brand-teal));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link,
.dropdown-button {
  border: 0;
  color: rgba(255, 255, 255, 0.92);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-button:hover {
  color: #dbeafe;
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  width: 210px;
  padding: 10px;
  border-radius: 18px;
  color: #1f2937;
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-link {
  display: block;
  padding: 9px 12px;
  border-radius: 12px;
  color: #334155;
}

.dropdown-link:hover,
.dropdown-link.active {
  color: var(--brand-blue);
  background: #eff6ff;
}

.header-search {
  position: relative;
  width: 280px;
}

.header-search input {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #fff;
  outline: none;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.search-results {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  overflow: hidden;
  border-radius: 18px;
  color: #1f2937;
  background: #fff;
  box-shadow: var(--shadow);
  display: none;
}

.search-results.is-open {
  display: block;
}

.search-result-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.search-result-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.search-result-item span {
  display: block;
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-item:hover {
  color: var(--brand-blue);
  background: #eff6ff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.92);
}

.mobile-link.active,
.mobile-link:hover {
  background: rgba(255, 255, 255, 0.16);
}

.mobile-category-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.mobile-category-list .dropdown-link {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  position: relative;
  min-height: 580px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: #fff;
}

.hero-content h1 {
  max-width: 780px;
  margin: 16px 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  font-weight: 900;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: var(--brand-orange);
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-red));
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.32);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.primary-button.slim,
.ghost-button.slim {
  min-height: 42px;
  padding: 0 18px;
}

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

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

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

.section-block {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.section-white {
  width: 100%;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: #fff;
}

.category-section {
  background: transparent;
}

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

.section-head h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-link {
  color: var(--brand-blue);
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card-link:hover img {
  transform: scale(1.07);
}

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.74), transparent);
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-red));
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.35);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #facc15, #f97316);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.tag-row {
  margin-top: auto;
}

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

.category-tile a {
  display: block;
  min-height: 240px;
  padding: 28px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4 55%, #14b8a6);
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.22);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:nth-child(even) a {
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.category-tile a:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.category-icon {
  font-size: 26px;
}

.category-tile h2 {
  margin: 14px 0 10px;
  font-size: 28px;
}

.category-tile p {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.category-sample {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.category-sample a {
  min-height: 0;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

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

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

.ranking-row {
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.ranking-link {
  display: grid;
  grid-template-columns: 54px 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}

.ranking-number {
  color: var(--brand-orange);
  font-size: 24px;
  font-weight: 900;
}

.ranking-link img {
  width: 68px;
  height: 92px;
  border-radius: 14px;
  object-fit: cover;
  background: #0f172a;
}

.ranking-info {
  min-width: 0;
}

.ranking-info strong,
.ranking-info em {
  display: block;
}

.ranking-info strong {
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 900;
}

.ranking-info em {
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-pill {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--brand-blue);
  background: #eff6ff;
  font-weight: 800;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1e3a8a 48%, #0891b2);
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.page-hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 86px 0;
}

.small-hero .page-hero-content {
  padding: 72px 0;
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.12;
  font-weight: 900;
}

.page-hero p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.filter-head {
  align-items: start;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.filter-bar.wide {
  max-width: 620px;
}

.filter-bar input,
.filter-bar select {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #fff;
}

.filter-bar input {
  min-width: 260px;
}

.category-overview-card {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto;
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 28px;
  align-items: center;
  padding: 30px;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.category-overview-text h2 {
  margin: 18px 0 12px;
  font-size: 30px;
}

.category-overview-text p {
  color: var(--muted);
  line-height: 1.8;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(1px);
  transform: scale(1.02);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 38px;
  align-items: end;
  padding: 78px 0 54px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #111827;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  color: #dbeafe;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.12;
  font-weight: 900;
}

.detail-one-line {
  max-width: 780px;
  color: #e5e7eb;
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta {
  margin: 20px 0;
}

.detail-meta span,
.detail-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.player-section {
  padding: 48px max(16px, calc((100% - 1180px) / 2));
  background: #020617;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.64));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-red));
  box-shadow: 0 18px 40px rgba(239, 68, 68, 0.38);
  font-size: 34px;
}

.play-overlay strong {
  font-size: 20px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.story-block {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
}

.story-block h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.story-block p {
  margin: 0;
  color: #334155;
  line-height: 1.95;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b, #0f172a);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-logo {
  color: #fff;
}

.footer-brand p {
  max-width: 420px;
  margin: 16px 0 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.footer-links h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.footer-links a {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
}

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

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

.is-filter-hidden {
  display: none;
}

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

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

  .detail-cover {
    width: min(320px, 100%);
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero {
    min-height: 520px;
  }

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

  .filter-bar {
    justify-content: stretch;
    width: 100%;
  }

  .filter-bar input,
  .filter-bar select {
    width: 100%;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .home-ranking,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .ranking-link {
    grid-template-columns: 42px 58px minmax(0, 1fr);
  }

  .ranking-pill {
    display: none;
  }
}

@media (max-width: 560px) {
  .header-inner {
    height: 62px;
  }

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

  .hero-content h1,
  .detail-info h1,
  .page-hero h1 {
    font-size: 34px;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .home-ranking,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .section-block {
    padding: 44px 0;
  }

  .section-white {
    padding-top: 44px;
    padding-bottom: 44px;
  }
}
