* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --soft: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

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.85);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
}

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

.brand-text strong {
  font-size: 22px;
  font-weight: 800;
}

.brand-text em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 9px 13px;
  border-radius: 12px;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: #dbeafe;
  color: var(--blue-dark);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  padding: 10px 20px 18px;
  border-top: 1px solid var(--soft);
  background: #ffffff;
}

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

.mobile-link,
.mobile-chip {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #334155;
  font-weight: 650;
}

.mobile-link.is-active,
.mobile-link:hover,
.mobile-chip:hover {
  background: #eff6ff;
  color: var(--blue-dark);
}

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

.hero-carousel {
  position: relative;
  height: 68vh;
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(15, 23, 42, 0.52), rgba(15, 23, 42, 0.04));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  padding-right: 24px;
  color: #ffffff;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.9);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
}

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

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

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

.hero-tags span,
.tag-row span,
.detail-tags a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 13px;
  font-weight: 650;
}

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

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

.primary-button {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.32);
}

.primary-button:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

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

.ghost-button.dark {
  border-color: #cbd5e1;
  color: #0f172a;
  background: #ffffff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  color: #ffffff;
  font-size: 38px;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

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

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

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  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.is-active {
  width: 34px;
  background: #ffffff;
}

.quick-search {
  position: relative;
  z-index: 10;
  max-width: 980px;
  margin: -38px auto 0;
  padding: 0 20px;
}

.quick-search-form {
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-search-form label {
  display: block;
  margin-bottom: 10px;
  color: #334155;
  font-weight: 800;
}

.quick-search-form div {
  display: flex;
  gap: 12px;
}

.quick-search-form input,
.filter-input,
.filter-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  padding: 0 14px;
  outline: none;
}

.quick-search-form input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.quick-search-form button {
  min-width: 120px;
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.page-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}

.top-gap {
  padding-top: 34px;
}

.content-section {
  margin-top: 44px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-more {
  color: var(--blue-dark);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e5e7eb;
}

.movie-card.is-wide .poster-link {
  aspect-ratio: 16 / 9;
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.type-badge,
.year-badge {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 12px;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.type-badge {
  top: 10px;
  right: 10px;
}

.year-badge {
  left: 10px;
  bottom: 10px;
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card-body h3 a:hover {
  color: var(--blue-dark);
}

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

.movie-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 12px;
}

.movie-meta-line span:first-child {
  overflow: hidden;
  max-width: 70%;
  padding: 4px 7px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-row span {
  background: #eff6ff;
  color: #1d4ed8;
}

.scroll-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

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

.rail-card {
  flex: 0 0 224px;
}

.rail-buttons {
  display: flex;
  gap: 8px;
}

.rail-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: #334155;
  font-size: 28px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  cursor: pointer;
}

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

.review-item,
.rank-item {
  display: grid;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-item:hover,
.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.review-item {
  grid-template-columns: 170px 1fr;
  padding: 14px;
}

.review-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  object-fit: cover;
}

.review-copy {
  min-width: 0;
}

.review-copy strong,
.review-copy em,
.review-copy span {
  display: block;
}

.review-copy strong {
  margin-bottom: 6px;
  font-size: 20px;
}

.review-copy em {
  display: -webkit-box;
  overflow: hidden;
  color: #64748b;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.review-copy span {
  margin-top: 9px;
  color: #94a3b8;
  font-size: 13px;
}

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

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

.category-card {
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 850;
}

.category-card p {
  margin: 0;
  color: #64748b;
}

.page-hero {
  border-radius: 28px;
  background: radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.28), transparent 28%), linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.small-hero {
  padding: clamp(34px, 6vw, 72px);
}

.page-hero span,
.detail-kicker {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #bfdbfe;
  font-weight: 800;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.empty-state {
  padding: 28px;
  border: 1px dashed #94a3b8;
  border-radius: 18px;
  color: #64748b;
  text-align: center;
}

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

.rank-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-item {
  grid-template-columns: 56px 74px 1fr;
  padding: 12px;
}

.rank-num {
  color: var(--blue-dark);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 74px;
  height: 98px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-text strong,
.rank-text em {
  display: block;
}

.rank-text strong {
  margin-bottom: 4px;
  font-size: 17px;
}

.rank-text em {
  color: #64748b;
  font-size: 13px;
  font-style: normal;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: #64748b;
  font-size: 14px;
}

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

.player-section {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-video {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  background: #020617;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.2));
  color: #ffffff;
  cursor: pointer;
}

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

.play-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  font-size: 28px;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.35);
}

.detail-intro {
  padding: clamp(24px, 4vw, 36px);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-kicker {
  background: #dbeafe;
  color: #1d4ed8;
}

.detail-intro h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.detail-intro p {
  margin: 0;
  color: #475569;
  font-size: 17px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.detail-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  font-weight: 750;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  margin-top: 32px;
}

.detail-copy,
.detail-side {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.detail-copy {
  padding: clamp(24px, 4vw, 38px);
}

.detail-copy h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-copy p {
  margin: 0 0 26px;
  color: #334155;
  font-size: 17px;
}

.detail-copy p:last-child {
  margin-bottom: 0;
}

.detail-side {
  align-self: start;
  padding: 24px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 14px;
  margin: 0 0 18px;
}

.detail-side dt {
  color: #94a3b8;
}

.detail-side dd {
  margin: 0;
  color: #0f172a;
  font-weight: 700;
}

.detail-tags a {
  background: #eff6ff;
  color: #1d4ed8;
}

.site-footer {
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #64748b;
}

.footer-brand {
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 14px;
  color: var(--blue-dark);
  font-weight: 800;
}

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

  .menu-toggle {
    display: block;
  }

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

  .wide-grid,
  .rank-list,
  .rank-list.compact,
  .player-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .hero-carousel {
    height: 64vh;
    min-height: 520px;
  }

  .hero-content {
    margin-left: 22px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-form div,
  .section-heading,
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-search-form button {
    min-height: 46px;
  }

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

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

  .review-item {
    grid-template-columns: 110px 1fr;
  }

  .rank-list,
  .rank-list.compact {
    grid-template-columns: 1fr;
  }

  .player-shell,
  .player-video {
    min-height: 260px;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .nav-shell {
    height: 62px;
    padding: 0 14px;
  }

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

  .brand-text em {
    display: none;
  }

  .page-container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .movie-grid,
  .wide-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

  .review-item {
    grid-template-columns: 1fr;
  }

  .mobile-category-list {
    grid-template-columns: 1fr;
  }
}
