:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #0f3f78;
  --primary-soft: #e0f2fe;
  --cyan: #0891b2;
  --amber: #f59e0b;
  --danger: #e11d48;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 32px rgba(15, 23, 42, 0.09);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.12), transparent 30%), linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", 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: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #0f3f78, #0891b2 58%, #f59e0b);
  border-radius: 14px;
  box-shadow: 0 12px 26px rgba(8, 145, 178, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: rgba(241, 245, 249, 0.72);
  border-radius: 999px;
}

.site-nav a,
.mobile-links a {
  padding: 10px 16px;
  color: #334155;
  border-radius: 999px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.mobile-links a:hover,
.mobile-links a.active {
  color: #ffffff;
  background: linear-gradient(135deg, #0f3f78, #0891b2);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 22px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.94);
}

.mobile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0 18px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 44px 0 26px;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: center;
  padding: 56px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  filter: blur(2px);
}

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

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  max-width: 760px;
  margin: 22px 0 16px;
  color: #ffffff;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.32);
}

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

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-tags a,
.hero-tags span {
  padding: 8px 12px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-poster {
  overflow: hidden;
  border-radius: 30px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.34);
}

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

.hero-dots {
  position: absolute;
  left: 56px;
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 8px;
  padding: 0;
  background: rgba(255, 255, 255, 0.24);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

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

.search-panel {
  position: relative;
  z-index: 4;
  width: min(980px, calc(100% - 44px));
  margin: -34px auto 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.search-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  outline: none;
  font: inherit;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.section {
  padding: 46px 0;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--cyan);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.section h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: var(--ink);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-desc,
.page-title p,
.detail-title p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(8, 145, 178, 0.32);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.13);
}

.poster-link {
  display: block;
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #164e63, #0f172a 72%);
}

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

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

.poster-frame img.image-missing,
.hero-poster img.image-missing {
  opacity: 0;
}

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.78), transparent);
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  color: #0f172a;
  background: #fbbf24;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

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

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #0f172a;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-title:hover {
  color: var(--cyan);
}

.movie-meta {
  margin: 9px 0 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.movie-meta a:hover {
  color: var(--primary);
}

.movie-line {
  display: -webkit-box;
  min-height: 58px;
  margin: 0;
  overflow: hidden;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

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

.tag-row span,
.detail-tag-row span,
.filter-tags button {
  padding: 5px 9px;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid rgba(14, 165, 233, 0.16);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  padding: 26px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 20px;
  color: #64748b;
  line-height: 1.75;
}

.page-title {
  padding: 48px 0 28px;
}

.page-title h1 {
  font-size: clamp(36px, 6vw, 64px);
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.filter-tags button {
  cursor: pointer;
  font: inherit;
}

.filter-tags button.active {
  color: #ffffff;
  background: linear-gradient(135deg, #0f3f78, #0891b2);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 74px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.rank-num {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #0f3f78, #0891b2);
  border-radius: 16px;
  font-weight: 950;
}

.rank-cover {
  overflow: hidden;
  width: 62px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #164e63, #0f172a);
  border-radius: 12px;
}

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

.rank-copy h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 950;
}

.rank-copy p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.rank-score {
  color: #f59e0b;
  font-size: 22px;
  font-weight: 950;
  text-align: right;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 42px 0;
  color: #ffffff;
  background: #020617;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  filter: blur(2px);
}

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

.detail-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #164e63, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.34);
}

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

.detail-title h1 {
  color: #ffffff;
  font-size: clamp(34px, 5vw, 62px);
}

.detail-title p {
  color: #dbeafe;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 8px 12px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 999px;
  font-weight: 800;
}

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

.detail-main {
  padding: 42px 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.content-panel,
.side-panel,
.player-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.content-panel {
  padding: 30px;
}

.content-panel h2,
.side-panel h2,
.player-card h2 {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: 26px;
  font-weight: 950;
}

.content-panel p {
  margin: 0 0 18px;
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
}

.player-card {
  margin-bottom: 28px;
  padding: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
  border-radius: 20px;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.72));
  border: 0;
  cursor: pointer;
  font: inherit;
}

.player-start.hidden {
  display: none;
}

.play-icon {
  position: relative;
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-radius: 999px;
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.36);
}

.play-icon::before {
  content: "";
  margin-left: 5px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 23px solid #0f172a;
}

.side-panel {
  padding: 20px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-thumb {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #164e63, #0f172a);
  border-radius: 12px;
}

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

.side-link strong {
  display: -webkit-box;
  overflow: hidden;
  color: #0f172a;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.side-link span {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
}

.site-footer {
  margin-top: 40px;
  padding: 48px 0 24px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #06182f, #0f172a);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  color: #ffffff;
}

.site-footer p {
  max-width: 420px;
  color: #cbd5e1;
  line-height: 1.75;
}

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

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

.footer-links a {
  padding: 7px 10px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.footer-links a:hover {
  color: #0f172a;
  background: #fbbf24;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.empty-state {
  display: none;
  padding: 34px;
  color: #64748b;
  text-align: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
}

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 300px;
    padding: 42px;
  }
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-shell {
    min-height: 720px;
    border-radius: 26px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 30px;
  }

  .hero-poster {
    width: min(250px, 72vw);
    margin: 0 auto;
  }

  .hero-dots {
    left: 30px;
  }

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

  .movie-grid,
  .category-grid,
  .footer-grid,
  .content-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    width: min(260px, 70vw);
  }
}

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

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

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

  .movie-title {
    font-size: 15px;
  }

  .section-head {
    display: block;
  }

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

  .rank-score {
    grid-column: 3;
    text-align: left;
  }
}
