:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --dark: #111827;
  --brand: #111827;
  --accent: #f59e0b;
  --radius: 24px;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 36%, #f8fafc 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

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

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

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.22);
}

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

.nav-link,
.desktop-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: #475569;
  font-size: 15px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.desktop-nav a:hover,
.desktop-nav a.active {
  color: #111827;
  background: #f1f5f9;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: #111827;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #334155;
}

.mobile-nav a:hover {
  background: #f8fafc;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 30%, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(31, 41, 55, 0.72) 48%, rgba(17, 24, 39, 0.44));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 54px;
}

.hero-copy {
  max-width: 680px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(14px);
}

.eyebrow.dark {
  background: #eef2ff;
  color: #111827;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.hero p,
.page-hero p,
.detail-copy .lead {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
}

.tag-row span {
  background: #f1f5f9;
  color: #475569;
}

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

.primary-btn,
.ghost-btn,
.soft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-btn {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 18px 30px rgba(255, 255, 255, 0.18);
}

.primary-btn:hover {
  transform: translateY(-2px);
  background: #f8fafc;
}

.primary-btn.small {
  min-height: 48px;
  white-space: nowrap;
}

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

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.soft-btn {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #111827;
}

.soft-btn:hover {
  border-color: #111827;
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 30px;
  background: linear-gradient(135deg, #1f2937, #334155);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

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

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 24px;
  backdrop-filter: blur(14px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dots button.active {
  width: 26px;
  border-radius: 999px;
  background: #ffffff;
}

.quick-search {
  margin-top: -34px;
  position: relative;
  z-index: 10;
}

.search-panel {
  padding: 26px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.search-panel p {
  margin: 0 0 18px;
  color: var(--muted);
}

.search-box,
.filter-panel {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #ffffff;
  padding: 0 16px;
  color: #111827;
  outline: none;
}

.search-box input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #111827;
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.08);
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-chips a {
  padding: 9px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #334155;
  background: #ffffff;
  transition: 0.2s ease;
}

.category-chips a:hover {
  border-color: #111827;
  color: #111827;
}

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

.soft-section {
  background: linear-gradient(180deg, #f8fafc, #ffffff);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
  font-weight: 900;
}

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

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #334155;
  font-weight: 800;
  white-space: nowrap;
}

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

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

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 300px);
  gap: 22px;
  overflow-x: auto;
  padding: 0 0 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-scroll .movie-card {
  scroll-snap-align: start;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(17, 24, 39, 0.24);
  box-shadow: 0 26px 48px rgba(15, 23, 42, 0.13);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

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

.play-dot {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 15px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.rank-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.9);
  color: #ffffff;
  font-weight: 900;
}

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

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

.movie-meta-line span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.movie-meta-line span:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #cbd5e1;
}

.movie-meta-line.bright {
  color: rgba(255, 255, 255, 0.86);
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

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

.movie-card.compact .movie-card-body {
  padding: 16px;
}

.movie-card.compact h3 {
  font-size: 17px;
}

.page-hero {
  position: relative;
  padding: 82px 0 62px;
  background:
    radial-gradient(circle at 80% 0%, rgba(17, 24, 39, 0.08), transparent 36%),
    linear-gradient(180deg, #ffffff, #f8fafc);
  border-bottom: 1px solid #e5e7eb;
}

.page-hero.slim h1 {
  color: #111827;
}

.page-hero.slim p {
  max-width: 760px;
  color: #64748b;
}

.page-search,
.filter-panel {
  margin-top: 24px;
  max-width: 880px;
}

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

.category-card {
  padding: 26px;
  border: 1px solid #e2e8f0;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
}

.category-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.category-main span {
  font-size: 24px;
  font-weight: 900;
}

.category-main strong {
  padding: 8px 12px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 13px;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.8;
}

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-preview a {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 66px 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.rank-num {
  display: grid;
  place-items: center;
  height: 50px;
  border-radius: 18px;
  background: #111827;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.rank-cover {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: #f1f5f9;
}

.rank-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.74));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 38px 0 64px;
  color: #ffffff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

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

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

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

.detail-copy {
  max-width: 820px;
}

.player-section {
  padding-top: 56px;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.12), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  z-index: 2;
}

.big-play {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  font-size: 30px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
}

.player-card.is-playing .player-cover {
  display: none;
}

.detail-text {
  max-width: 900px;
}

.detail-text h2 {
  margin: 0 0 14px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

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

.detail-text p {
  margin: 0;
  color: #475569;
  font-size: 17px;
  line-height: 2;
}

.site-footer {
  padding: 46px 0;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 40px;
  align-items: start;
}

.footer-inner p {
  max-width: 560px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 14px;
}

.is-hidden {
  display: none !important;
}

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
}

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

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

  .hero,
  .hero-content {
    min-height: 640px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 26px;
    padding: 40px 0 78px;
  }

  .hero-poster {
    display: none;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.66));
  }

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

  .category-grid,
  .footer-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(260px, 74vw);
  }

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

  .rank-item .soft-btn {
    grid-column: 2 / -1;
    width: fit-content;
  }

  .filter-panel,
  .search-box {
    align-items: stretch;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .container,
  .nav-wrap,
  .mobile-nav,
  .footer-inner,
  .hero-content {
    width: min(100% - 22px, 1180px);
  }

  .nav-wrap {
    height: 64px;
  }

  .logo {
    font-size: 17px;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 32px;
  }

  .hero p,
  .page-hero p,
  .detail-copy .lead {
    font-size: 16px;
  }

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

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

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

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-item {
    grid-template-columns: 42px 70px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .rank-info h3 {
    font-size: 17px;
  }

  .rank-info p {
    display: none;
  }

  .player-card {
    border-radius: 18px;
  }
}
