:root {
  color-scheme: light;
  --bg: #f8fafc;
  --paper: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --violet: #7c3aed;
  --gold: #facc15;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
  color: #f8fafc;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.35);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: 15px;
}

.nav-links a,
.mobile-menu a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover {
  color: #60a5fa;
}

.search-form {
  display: flex;
  align-items: center;
  margin-left: 8px;
}

.search-form input {
  width: 220px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  padding: 10px 16px;
  color: #f8fafc;
  background: rgba(51, 65, 85, 0.9);
  outline: none;
}

.search-form input::placeholder {
  color: #94a3b8;
}

.search-form button {
  border: 0;
  border-radius: 0 999px 999px 0;
  padding: 10px 16px;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-form button:hover {
  background: var(--blue-dark);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(51, 65, 85, 0.85);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 16px 24px 22px;
  background: #0f172a;
}

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

.mobile-menu a {
  display: block;
  padding: 10px 0;
  color: #e2e8f0;
}

.mobile-menu .search-form {
  margin: 8px 0 12px;
}

.mobile-menu .search-form input {
  width: 100%;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 74vh;
  background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.35), transparent 30%), linear-gradient(135deg, #020617, #172554 48%, #0f172a);
  color: #fff;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  transform: scale(1.04);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.76) 46%, rgba(15, 23, 42, 0.25) 100%), linear-gradient(0deg, rgba(15, 23, 42, 0.86), transparent 42%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 74vh;
  padding: 98px 24px 120px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 46px;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #fde68a;
  font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin-top: 12px;
  font-size: clamp(32px, 5vw, 58px);
}

.hero-copy p {
  margin: 22px 0 0;
  max-width: 700px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 21px);
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin-top: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 12px;
  color: #1e3a8a;
  background: #dbeafe;
  font-size: 13px;
  font-weight: 700;
}

.pill.dark {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.42);
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.12);
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

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

.hero-poster-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  border-radius: 18px;
  padding: 10px 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(14px);
}

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

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

.hero-dot.is-active {
  width: 36px;
  background: #fff;
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.section.compact {
  padding-top: 32px;
}

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

.section-heading h2,
.page-title h1,
.detail-text h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.section-heading p,
.page-title p {
  max-width: 780px;
  margin: 8px 0 0;
  color: var(--muted);
}

.page-hero {
  color: #fff;
  background: linear-gradient(100deg, #172554, #581c87 56%, #1e3a8a);
}

.page-title {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
}

.page-title h1,
.page-title p {
  color: #fff;
}

.page-title p {
  color: #dbeafe;
  font-size: 18px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  border-radius: 24px;
  padding: 24px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #db2777, #7c3aed);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #0891b2, #2563eb);
}

.category-card:nth-child(5n) {
  background: linear-gradient(135deg, #ea580c, #dc2626);
}

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

.category-card strong {
  display: block;
  position: relative;
  z-index: 2;
  font-size: 22px;
  margin-bottom: 10px;
}

.category-card span {
  position: relative;
  z-index: 2;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -38px;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.poster-ribbon {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #fff;
  background: rgba(37, 99, 235, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.poster-score {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #1f2937;
  background: #fde68a;
  font-size: 12px;
  font-weight: 900;
}

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

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

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

.card-meta {
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 12px 0 0;
  overflow: hidden;
  color: #475569;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  border-radius: 999px;
  padding: 4px 9px;
  color: #334155;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px 180px;
  gap: 14px;
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.filter-bar input,
.filter-bar select {
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 11px 15px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-radius: 22px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.rank-no {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  font-size: 20px;
  font-weight: 900;
}

.rank-item img {
  width: 96px;
  height: 128px;
  border-radius: 16px;
  object-fit: cover;
}

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

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

.rank-score {
  border-radius: 999px;
  padding: 8px 14px;
  color: #713f12;
  background: #fef3c7;
  font-weight: 900;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.player-panel,
.detail-text,
.side-panel {
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.player-panel {
  overflow: hidden;
  background: #020617;
}

.video-shell {
  position: relative;
  background: #020617;
}

.video-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.45), rgba(15, 23, 42, 0.16));
  cursor: pointer;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.38);
  font-size: 32px;
}

.player-start strong {
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-text {
  margin-top: 24px;
  padding: 28px;
}

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

.detail-meta {
  margin: 0 0 22px;
  color: var(--muted);
}

.detail-section {
  margin-top: 26px;
}

.detail-section h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.detail-section p {
  margin: 0;
  color: #334155;
}

.side-panel {
  padding: 20px;
}

.side-panel + .side-panel {
  margin-top: 24px;
}

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

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

.related-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 70px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
}

.related-item strong {
  display: block;
  line-height: 1.35;
}

.related-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  display: none;
  border-radius: 24px;
  padding: 42px 24px;
  color: var(--muted);
  background: #fff;
  text-align: center;
  box-shadow: var(--soft-shadow);
}

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

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
}

.footer-inner strong {
  color: #fff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

@media (max-width: 1080px) {
  .nav-links,
  .site-header > .header-inner > .search-form {
    display: none;
  }

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

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

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

  .logo span:last-child {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-inner {
    padding: 82px 18px 108px;
  }

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

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

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

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

  .rank-item img {
    width: 76px;
    height: 104px;
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }
}

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

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

  .hero-copy h1,
  .hero-copy h2 {
    letter-spacing: -0.03em;
  }
}
