:root {
  --page: #f7f9fc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #dbeafe;
  --gold: #f59e0b;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--brand);
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #38bdf8);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

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

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

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.header-search,
.mobile-search,
.wide-search,
.page-search,
.category-tools form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.wide-search input,
.page-search input,
.category-tools input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  color: var(--ink);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
}

.header-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.page-search input:focus,
.category-tools input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.header-search button,
.mobile-search button,
.wide-search button,
.page-search button,
.category-tools button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: var(--brand);
  font-weight: 800;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: var(--ink);
  background: #eef2ff;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 16px 18px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(59, 130, 246, 0.28), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.36));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  min-height: 640px;
  gap: 52px;
  color: #ffffff;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #bfdbfe;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--brand);
}

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

.hero-copy h2 {
  margin: 18px 0 10px;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 850;
}

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

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

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

.hero-tags span,
.detail-tags a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.detail-tags a,
.tag-row span {
  color: #1e40af;
  background: #eff6ff;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-btn,
.ghost-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  padding: 12px 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #0ea5e9);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.35);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-btn:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  padding: 11px 20px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
}

.text-btn {
  color: var(--brand);
}

.hero-poster,
.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.hero-poster img,
.detail-poster img {
  aspect-ratio: 2 / 3;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 32px;
  line-height: 1;
}

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

.hero-dot {
  width: 28px;
  height: 8px;
  border-radius: 999px;
}

.hero-dot.active {
  background: #ffffff;
}

.intro-panel,
.section-block,
.detail-content,
.player-section,
.category-overview-list,
.ranking-list-page {
  margin-top: 46px;
  margin-bottom: 46px;
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: center;
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.07);
}

.intro-panel h2,
.section-heading h2,
.category-tools h2,
.content-card h2,
.editor-box h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.intro-panel p,
.category-overview-card p,
.editor-box p,
.content-card p,
.ranking-card p {
  color: var(--muted);
}

.wide-search input,
.page-search input {
  flex: 1;
  width: 100%;
}

.section-heading,
.category-overview-head,
.category-tools {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading.compact {
  margin-bottom: 14px;
}

.section-heading > a,
.category-overview-head > a {
  color: var(--brand);
  font-weight: 900;
}

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

.category-card,
.category-overview-card,
.editor-box,
.content-card,
.ranking-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.category-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.mini-card:hover,
.ranking-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-covers {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.category-covers img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.category-card h3,
.movie-card h3,
.ranking-card h2,
.category-overview-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}


.filter-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 560px);
}

.filter-tools input,
.filter-tools select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.filter-tools input {
  flex: 1;
}

.filter-tools select {
  width: 150px;
}

.filter-search-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 14px;
  color: #ffffff;
  background: var(--brand);
  font-weight: 800;
  white-space: nowrap;
}

.movie-card[hidden] {
  display: none;
}

.empty-result {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--card);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e2e8f0;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.25s ease;
}

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

.poster-type {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.75);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card h3 {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.movie-line {
  display: -webkit-box;
  min-height: 43px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  max-height: 64px;
  overflow: hidden;
}

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

.rank-list,
.mini-grid {
  display: grid;
  gap: 12px;
}

.mini-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  position: relative;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mini-card img {
  width: 54px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  object-fit: cover;
}

.mini-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.rank-badge {
  position: absolute;
  left: -6px;
  top: -6px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.editor-box,
.content-card {
  padding: 24px;
}

.editor-box {
  position: sticky;
  top: 92px;
}

.editor-box p {
  margin-bottom: 22px;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-brand {
  color: #ffffff;
  margin-bottom: 14px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 17px;
}

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

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

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

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

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

.page-hero {
  padding: 92px 0;
}

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

.page-hero .container,
.detail-hero-inner {
  position: relative;
  z-index: 2;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.38), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.78));
}

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

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

.category-overview-list {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  padding: 24px;
}

.category-overview-head {
  margin-bottom: 18px;
}

.category-overview-head p {
  max-width: 760px;
  margin: 0;
}

.category-tools {
  align-items: center;
}

.category-tools form {
  min-width: 340px;
}

.category-tools input {
  width: 100%;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-poster {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.ranking-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.ranking-poster span {
  position: absolute;
  left: 8px;
  top: 8px;
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--brand);
  font-weight: 900;
}

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

.detail-hero-inner {
  padding: 84px 0 70px;
}

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

.detail-poster {
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.detail-copy h1 {
  margin-bottom: 16px;
}

.detail-tags {
  margin: 22px 0;
}

.player-section {
  scroll-margin-top: 90px;
}

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

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.62));
  cursor: pointer;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--brand);
  background: #ffffff;
  font-size: 34px;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.34);
}

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

.content-card p {
  margin: 12px 0 0;
  font-size: 16px;
}

.info-card dl {
  display: grid;
  gap: 14px;
  margin: 14px 0 0;
}

.info-card div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
}

.info-card dt {
  color: var(--muted);
  font-weight: 800;
}

.info-card dd {
  margin: 0;
}

.info-card a {
  color: var(--brand);
  font-weight: 900;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 44px;
  height: 44px;
  display: none;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--brand);
  box-shadow: var(--shadow);
}

.back-top.visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

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

  .detail-content {
    grid-template-columns: 1fr 1fr;
  }

  .info-card {
    grid-column: 1 / -1;
  }
}

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

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

  .header-inner {
    min-height: 62px;
  }

  .hero-content,
  .intro-panel,
  .split-layout,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    min-height: 700px;
    padding: 80px 0 100px;
  }

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

  .editor-box {
    position: static;
  }

  .category-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .category-tools form {
    min-width: 0;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

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

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

  .detail-content,
  .category-overview-head,
  .section-heading {
    display: grid;
  }

  .detail-content {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .wide-search,
  .page-search,
  .mobile-search,
  .filter-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-search button,
  .wide-search button,
  .page-search button,
  .filter-search-link,
  .filter-tools select {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .brand-name {
    font-size: 18px;
  }
}
