:root {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-soft: #eff6ff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-2: #60a5fa;
  --blue-soft: #dbeafe;
  --slate: #1e293b;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --radius: 24px;
  --radius-sm: 16px;
  --max: 1180px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.22), transparent 32rem),
    linear-gradient(135deg, #f8fafc 0%, #eff6ff 45%, #e2e8f0 100%);
  color: var(--text);
  min-height: 100vh;
}

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: 80;
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.94), rgba(239, 246, 255, 0.94), rgba(248, 250, 252, 0.94));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.header-inner {
  max-width: var(--max);
  height: 70px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.3);
  font-size: 14px;
}

.logo-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #2563eb, #334155);
  -webkit-background-clip: text;
  color: transparent;
}

.logo-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.nav-link {
  padding: 9px 11px;
  border-radius: 12px;
  color: #475569;
  font-size: 14px;
  white-space: nowrap;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
  background: rgba(219, 234, 254, 0.78);
}

.nav-link-muted {
  color: #64748b;
}

.global-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-search input,
.mobile-search input,
.filter-controls input,
.filter-controls select {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  outline: none;
  transition: 0.2s ease;
}

.global-search input {
  width: 220px;
  padding: 10px 14px;
}

.global-search input:focus,
.mobile-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
}

.global-search button,
.mobile-search button,
.hero-btn,
.action-link,
.filter-chip,
.category-card .category-link,
.player-actions a {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), #1d4ed8);
  color: white;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.23);
  transition: 0.2s ease;
}

.global-search button:hover,
.mobile-search button:hover,
.hero-btn:hover,
.action-link:hover,
.filter-chip:hover,
.category-card:hover .category-link,
.player-actions a:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  background: rgba(219, 234, 254, 0.86);
  border-radius: 14px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: #2563eb;
  border-radius: 99px;
  margin: 5px 0;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  padding: 16px 22px 22px;
}

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

.mobile-search {
  margin-bottom: 14px;
}

.mobile-search input {
  flex: 1;
  padding: 11px 14px;
}

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

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

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 46px 22px;
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 22px 18px;
}

.hero-shell {
  min-height: 560px;
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background:
    linear-gradient(130deg, rgba(15, 23, 42, 0.95), rgba(30, 64, 175, 0.86)),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.55), transparent 30rem);
  box-shadow: var(--shadow);
}

.hero-slide {
  display: none;
  min-height: 560px;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.72fr);
  gap: 28px;
  align-items: center;
  padding: 54px;
  position: relative;
}

.hero-slide.active {
  display: grid;
  animation: fadeIn 0.42s ease both;
}

.hero-slide:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(59, 130, 246, 0.32), transparent 24rem),
    linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.18) 100%);
  pointer-events: none;
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #60a5fa;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.hero h1 {
  color: white;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 0.96;
  margin: 16px 0 18px;
  letter-spacing: -0.06em;
}

.hero-desc {
  color: rgba(226, 232, 240, 0.92);
  font-size: 18px;
  line-height: 1.82;
  max-width: 680px;
  margin: 0 0 24px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span,
.detail-tag,
.tag-row span,
.info-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.88);
  color: #1d4ed8;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
}

.hero-meta span {
  background: rgba(255, 255, 255, 0.13);
  color: #e0f2fe;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.hero-btn.secondary {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.hero-visual {
  min-height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-poster {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(15, 23, 42, 0.5));
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.36);
  transform: rotate(2deg);
}

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

.hero-poster:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(15, 23, 42, 0.72));
}

.hero-panel {
  position: absolute;
  right: 34px;
  bottom: 30px;
  width: min(390px, calc(100% - 68px));
  z-index: 2;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  padding: 16px;
  backdrop-filter: blur(16px);
}

.hero-panel-title {
  color: white;
  font-weight: 800;
  margin-bottom: 10px;
}

.hero-mini-list {
  display: grid;
  gap: 8px;
}

.hero-mini-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #dbeafe;
  font-size: 14px;
  padding: 9px 10px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-controls {
  position: absolute;
  left: 54px;
  bottom: 36px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

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

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

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

.section-head h2,
.page-title h1,
.filter-panel h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
  color: #0f172a;
}

.section-head p,
.page-title p,
.filter-panel p {
  color: var(--muted);
  line-height: 1.8;
  margin: 9px 0 0;
}

.action-link {
  display: inline-flex;
  white-space: nowrap;
}

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

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

.movie-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.8);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
}

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

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.6));
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 12px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.3);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.movie-card h3 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-card p {
  margin: 0;
  min-height: 4.6em;
  color: #475569;
  font-size: 14px;
  line-height: 1.62;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 9px;
  font-size: 11px;
  color: #2563eb;
  background: #eff6ff;
}

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

.category-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.9)),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 14rem);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  transition: 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.7);
}

.category-card h3 {
  margin: 8px 0;
  font-size: 22px;
}

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

.category-link {
  display: inline-flex;
  width: fit-content;
}

.page-title {
  max-width: var(--max);
  margin: 0 auto;
  padding: 54px 22px 18px;
}

.filter-panel {
  max-width: var(--max);
  margin: 26px auto 8px;
  padding: 28px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.filter-controls {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 12px;
  margin-top: 20px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  padding: 13px 15px;
  border-radius: 16px;
}

.empty-state {
  margin-top: 16px;
  color: var(--muted);
}

.ranking-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px 22px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.92);
  transition: 0.2s ease;
}

.horizontal-card:hover {
  transform: translateX(4px);
  border-color: rgba(96, 165, 250, 0.75);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.horizontal-poster {
  display: block;
  width: 76px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #e2e8f0);
}

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

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

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

.horizontal-info strong {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horizontal-info em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  margin-top: 5px;
}

.mini-rank {
  color: #ef4444;
  font-weight: 900;
  font-size: 20px;
}

.side-panel {
  position: sticky;
  top: 94px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #0f172a, #1e3a8a);
  color: white;
  padding: 24px;
  box-shadow: var(--shadow);
  height: fit-content;
}

.side-panel h3 {
  margin: 0 0 16px;
  font-size: 22px;
}

.side-panel a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: #dbeafe;
}

.detail-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px 22px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.breadcrumb {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

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

.player-card,
.detail-card,
.detail-sidebar,
.related-section {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.34));
  cursor: pointer;
  transition: 0.2s ease;
}

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

.play-overlay span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue);
  padding: 16px 24px;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: #020617;
  color: #cbd5e1;
}

.detail-card {
  padding: 26px;
  margin-top: 24px;
}

.detail-card h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin: 0 0 16px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
}

.detail-card h2,
.related-section h2 {
  margin: 26px 0 12px;
  font-size: 24px;
}

.detail-card p {
  color: #334155;
  line-height: 1.9;
  margin: 0 0 16px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.detail-sidebar {
  padding: 18px;
  height: fit-content;
  position: sticky;
  top: 94px;
}

.sidebar-poster {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #dbeafe, #e2e8f0);
}

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

.sidebar-info {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.sidebar-info div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 11px;
  color: var(--muted);
}

.sidebar-info strong {
  color: var(--text);
  text-align: right;
}

.related-section {
  margin-top: 24px;
  padding: 24px;
}

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

.image-missing {
  opacity: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-footer {
  background: linear-gradient(90deg, #0f172a, #1e3a8a, #0f172a);
  color: #cbd5e1;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 44px 22px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand p {
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-logo {
  color: white;
  font-weight: 900;
  font-size: 22px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 22px 24px;
  color: #94a3b8;
  font-size: 14px;
}

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

  .menu-toggle {
    display: block;
  }

  .header-inner {
    justify-content: space-between;
  }

  .global-search {
    margin-left: auto;
  }

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

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

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

  .hero-panel {
    position: relative;
    right: auto;
    bottom: auto;
    width: auto;
    margin: -18px 42px 42px;
  }
}

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

  .hero-shell,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide {
    padding: 34px 24px;
  }

  .hero-visual {
    min-height: 320px;
  }

  .hero-controls {
    left: 24px;
    bottom: 22px;
  }

  .hero-panel {
    margin: 0 24px 30px;
  }

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

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

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

  .detail-layout,
  .ranking-layout {
    grid-template-columns: 1fr;
  }

  .detail-sidebar,
  .side-panel {
    position: static;
  }
}

@media (max-width: 540px) {
  .header-inner {
    height: 64px;
    padding: 0 16px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .logo-name {
    font-size: 17px;
  }

  .logo-subtitle {
    display: none;
  }

  .hero,
  .section,
  .page-title,
  .detail-layout,
  .ranking-layout {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-desc {
    font-size: 15px;
  }

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

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

  .mini-rank {
    display: none;
  }

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