:root {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --white: #ffffff;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --sky: #38bdf8;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 48%, #0f172a 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.26);
}

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

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex: 0 0 auto;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.36);
}

.logo-text {
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 18px;
}

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

.main-nav a {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #93c5fd;
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.header-search input {
  width: 200px;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  padding: 6px 8px;
}

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

.header-search button,
.hero-search button,
.inline-filter button {
  border: 0;
  color: var(--white);
  cursor: pointer;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.26);
}

.header-search button {
  padding: 7px 14px;
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
  border-radius: 999px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  color: var(--white);
  min-height: 660px;
  background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.38), transparent 30%), linear-gradient(135deg, #020617 0%, #1e3a8a 48%, #020617 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.42) 1px, transparent 1px);
  background-size: 34px 34px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 76px 0 46px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.78fr);
  gap: 52px;
  align-items: center;
  min-height: 470px;
}

.hero-slide.is-active {
  display: grid;
  animation: heroFade 0.45s ease both;
}

@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

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

.hero-summary {
  max-width: 700px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: clamp(18px, 2.2vw, 24px);
}

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

.hero-tags {
  margin: 26px 0 0;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

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

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--white);
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.38);
}

.button.ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

.hero-poster img {
  height: 100%;
  object-fit: cover;
}

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.78));
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  margin-top: 24px;
}

.hero-search,
.inline-filter {
  display: flex;
  gap: 10px;
  align-items: center;
  width: min(100%, 640px);
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.hero-search input,
.inline-filter input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 12px 14px;
  color: var(--text);
  background: transparent;
}

.hero-search button,
.inline-filter button {
  padding: 12px 22px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 9px;
}

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

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

.content-section {
  padding: 56px 0;
}

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

.section-head h2,
.rank-panel-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 42px);
  letter-spacing: -0.04em;
}

.section-more,
.text-link {
  color: var(--blue);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #1e293b 0%, #2563eb 100%);
}

.large-card .card-cover {
  aspect-ratio: 16 / 9;
}

.card-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.66));
}

.card-play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--white);
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.36);
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
}

.card-body {
  padding: 17px;
}

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

.card-body h2 {
  margin: 9px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: var(--blue);
}

.card-body p {
  display: -webkit-box;
  min-height: 52px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  min-height: 26px;
  color: #1e40af;
  font-size: 12px;
  background: #eff6ff;
  border-color: #bfdbfe;
}

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

.category-tile,
.category-card-wide {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.category-image,
.category-card-cover {
  position: relative;
  display: block;
  min-height: 190px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #2563eb);
}

.category-image img,
.category-card-cover img {
  height: 100%;
  object-fit: cover;
}

.category-image span {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  color: var(--white);
  font-weight: 800;
}

.category-image::after,
.category-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.72));
}

.category-copy,
.category-card-body {
  padding: 22px 20px 22px 0;
}

.category-copy h3,
.category-card-body h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-copy p,
.category-card-body p {
  margin: 0 0 14px;
  color: var(--muted);
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-links a {
  padding: 5px 10px;
  color: #1e40af;
  font-size: 13px;
  font-weight: 750;
  border-radius: 999px;
  background: #eff6ff;
}

.two-line a {
  border-radius: 12px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 15% 20%, rgba(96, 165, 250, 0.42), transparent 31%), linear-gradient(135deg, #020617 0%, #1e3a8a 55%, #0f172a 100%);
}

.page-hero .site-container {
  padding: 76px 0;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #93c5fd;
}

.inline-filter {
  margin-top: 28px;
}

.search-page-form {
  margin-top: 30px;
}

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

.category-card-wide {
  grid-template-columns: 180px minmax(0, 1fr);
}

.rank-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rank-panel-head {
  align-items: center;
}

.rank-filter {
  max-width: 420px;
  margin-top: 0;
  border: 1px solid var(--line);
  box-shadow: none;
}

.rank-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-link {
  display: grid;
  grid-template-columns: 64px minmax(0, 1.2fr) minmax(150px, 0.7fr) 90px 110px;
  gap: 14px;
  align-items: center;
  min-height: 54px;
  padding: 10px 14px;
  border: 1px solid #eaf0f8;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.rank-link:hover {
  transform: translateX(3px);
  border-color: #bfdbfe;
  background: #eff6ff;
}

.rank-number {
  color: var(--blue);
  font-weight: 950;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-genre,
.rank-year {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-score {
  color: #1d4ed8;
  font-weight: 850;
  text-align: right;
}

.detail-hero {
  min-height: 560px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.26;
  filter: blur(18px);
  transform: scale(1.08);
}

.detail-backdrop img {
  height: 100%;
  object-fit: cover;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.72));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 54px 0 74px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.42);
  aspect-ratio: 3 / 4;
  background: #1e293b;
}

.detail-poster img {
  height: 100%;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 790px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 20px;
}

.detail-tags {
  margin-bottom: 30px;
}

.player-section {
  margin-top: -44px;
  position: relative;
  z-index: 3;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.34);
  aspect-ratio: 16 / 9;
}

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--white);
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 22px 46px rgba(37, 99, 235, 0.42);
  font-size: 34px;
}

.detail-content {
  padding-top: 38px;
}

.detail-article {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-article h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.detail-article h2:not(:first-child) {
  margin-top: 28px;
}

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

.empty-state {
  display: none;
  margin: 28px 0 0;
  padding: 22px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed #bfdbfe;
  border-radius: 18px;
  background: #eff6ff;
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-logo {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
}

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

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

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

.footer-links a:hover {
  color: #93c5fd;
}

.footer-bottom {
  padding: 18px;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

@media (max-width: 1040px) {
  .header-search {
    display: none;
  }

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

  .hero-slide {
    grid-template-columns: 1fr 330px;
  }

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

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

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

  .main-nav {
    display: none;
    flex: 1 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-top: 10px;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 11px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
  }

  .hero-section {
    min-height: auto;
  }

  .hero-inner {
    padding: 48px 0 32px;
  }

  .hero-slide,
  .hero-slide.is-active {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-poster {
    max-width: 360px;
    margin: 0 auto;
    transform: none;
  }

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

  .hero-search,
  .inline-filter {
    border-radius: 20px;
  }

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

  .category-tile,
  .category-card-wide,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .category-copy,
  .category-card-body {
    padding: 22px;
  }

  .detail-poster {
    max-width: 270px;
  }

  .rank-link {
    grid-template-columns: 48px minmax(0, 1fr) 82px;
  }

  .rank-genre,
  .rank-score {
    display: none;
  }

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

@media (max-width: 560px) {
  .site-container {
    width: min(100% - 22px, 1180px);
  }

  .logo-text {
    max-width: 210px;
    font-size: 16px;
  }

  .hero-copy h1,
  .detail-copy h1,
  .page-hero h1 {
    letter-spacing: -0.04em;
  }

  .hero-search,
  .inline-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search button,
  .inline-filter button {
    width: 100%;
  }

  .movie-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 38px 0;
  }

  .page-hero .site-container,
  .detail-hero-inner {
    padding: 42px 0;
  }

  .rank-panel {
    padding: 16px;
  }

  .rank-link {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .rank-year {
    display: none;
  }

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