:root {
  --sky: #0ea5e9;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #f0f9ff 0%, #f8fafc 34%, #ffffff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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, var(--sky), var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: rgba(255, 255, 255, 0.92);
  margin-left: 10px;
}

.nav-links a,
.nav-dropdown button {
  border: 0;
  color: inherit;
  background: transparent;
  padding: 10px 0;
  cursor: pointer;
}

.nav-links a:hover,
.nav-dropdown button:hover,
.nav-links .active {
  color: #fef3c7;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 180px;
  padding: 8px;
  display: grid;
  gap: 3px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  border-radius: 16px;
  color: #334155;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-panel a {
  padding: 9px 12px;
  border-radius: 10px;
}

.nav-dropdown-panel a:hover {
  color: #0369a1;
  background: #e0f2fe;
}

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

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

.nav-search input,
.mobile-search input,
.page-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.93);
  color: #0f172a;
  outline: none;
}

.nav-search input {
  width: 245px;
  padding: 10px 16px;
}

.nav-search button,
.mobile-search button,
.page-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--blue);
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  color: #fff;
}

.mobile-panel.is-open {
  display: grid;
  gap: 10px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
}

.mobile-search input {
  width: 100%;
  padding: 10px 14px;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #0369a1;
}

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

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

.hero-backdrop,
.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-backdrop::after,
.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.25), transparent 28%), linear-gradient(0deg, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.05));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  align-items: center;
  gap: 44px;
  color: #fff;
}

.hero-copy {
  max-width: 760px;
  animation: fadeUp 0.8s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.hero-copy h1 {
  font-size: clamp(34px, 6vw, 68px);
}

.hero-copy h2 {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 50px);
}

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

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

.hero-tags {
  margin-top: 18px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.tag-row span {
  color: #0369a1;
  background: #e0f2fe;
}

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

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

.primary-btn {
  color: var(--blue);
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-4px);
}

.hero-poster {
  display: block;
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
  transform: rotate(2deg);
}

.hero-poster::before {
  content: "";
  display: block;
  aspect-ratio: 3 / 4;
}

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

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

.hero-dots button {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots button.active {
  background: #fff;
}

.section-pad {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

.section-head {
  margin-bottom: 24px;
}

.section-head p {
  margin: 0 0 6px;
  color: var(--sky);
  font-weight: 800;
}

.section-head h2 {
  margin: 0;
  color: #1e293b;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-head.with-link {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-head.with-link a {
  color: var(--blue);
  font-weight: 800;
}

.section-head.light p,
.section-head.light h2 {
  color: #fff;
}

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

.pill-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 18px;
  padding: 18px;
  color: #0369a1;
  background: #fff;
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.12);
  font-weight: 800;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.14);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #dbeafe;
}

.movie-card img,
.rank-mini-item img,
.rank-row img,
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-card img {
  transition: transform 0.3s ease;
}

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

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

.movie-score {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 6px 9px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
  font-size: 12px;
}

.movie-info {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.movie-info strong {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.35;
}

.movie-meta,
.movie-summary {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.hot-section {
  width: min(1320px, calc(100% - 32px));
}

.hot-panel {
  border-radius: 34px;
  padding: 32px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb 52%, #06b6d4);
  box-shadow: 0 30px 70px rgba(37, 99, 235, 0.22);
}

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

.rank-mini-item {
  display: grid;
  grid-template-columns: 36px 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  padding: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.rank-mini-item img {
  height: 58px;
  border-radius: 13px;
}

.rank-mini-item strong,
.rank-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-mini-item em,
.rank-row em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
}

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

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 26px;
  color: #fff;
  background: #0f172a;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card img {
  position: absolute;
  inset: 0;
  filter: saturate(1.05);
  transform: scale(1.04);
  transition: transform 0.35s ease;
}

.category-card:hover img {
  transform: scale(1.12);
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), rgba(14, 165, 233, 0.25));
}

.category-copy {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 8px;
  padding: 20px;
}

.category-copy strong {
  font-size: 24px;
}

.category-copy em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.6;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--sky), var(--blue), var(--cyan));
}

.page-hero {
  min-height: 330px;
  display: grid;
  place-items: center;
  padding: 60px 16px;
  text-align: center;
}

.page-hero > div {
  width: min(920px, 100%);
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 60px);
}

.compact-hero {
  min-height: 300px;
}

.rank-hero {
  background: linear-gradient(135deg, #0f172a, #2563eb 58%, #06b6d4);
}

.category-hero.from-red {
  background: linear-gradient(135deg, #dc2626, #7c3aed);
}

.category-hero.from-purple {
  background: linear-gradient(135deg, #7c3aed, #db2777);
}

.category-hero.from-rose {
  background: linear-gradient(135deg, #f43f5e, #ec4899);
}

.category-hero.from-amber {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.category-hero.from-indigo {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
}

.category-hero.from-stone {
  background: linear-gradient(135deg, #57534e, #b45309);
}

.category-hero.from-slate {
  background: linear-gradient(135deg, #0f172a, #475569);
}

.category-hero.from-green {
  background: linear-gradient(135deg, #16a34a, #0d9488);
}

.category-hero.from-blue {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.category-hero.from-cyan {
  background: linear-gradient(135deg, #0891b2, #22c55e);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 170px 170px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border-color: var(--line);
  padding: 12px 15px;
  background: var(--soft);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 52px 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.rank-row img {
  height: 86px;
  border-radius: 16px;
}

.rank-number.big {
  width: 42px;
  height: 42px;
}

.rank-copy em {
  color: #64748b;
}

.rank-copy span {
  display: block;
  margin-top: 6px;
  color: #475569;
  line-height: 1.6;
}

.rank-heat {
  border-radius: 999px;
  padding: 8px 12px;
  color: #b45309;
  background: #fef3c7;
  font-weight: 900;
}

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

.detail-layout {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 660px;
  margin: 0 auto;
  padding: 58px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  align-items: center;
  gap: 34px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.42);
  aspect-ratio: 16 / 9;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.46), rgba(2, 6, 23, 0.12));
  cursor: pointer;
}

.video-shell.is-playing .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding-left: 6px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.34);
  font-size: 34px;
}

.detail-copy {
  min-width: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 60px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.detail-tags {
  margin-top: 16px;
}

.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.article-card,
.side-rank {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 26px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.article-card h2,
.side-rank h2 {
  margin: 0 0 16px;
  color: #1e293b;
  font-size: 24px;
}

.article-card h2:not(:first-child) {
  margin-top: 30px;
}

.article-card p {
  margin: 0;
  color: #334155;
  font-size: 17px;
  line-height: 2;
}

.side-rank {
  display: grid;
  gap: 12px;
}

.side-rank .rank-mini-item {
  grid-template-columns: 32px 54px minmax(0, 1fr);
  color: #1e293b;
  background: #f8fafc;
}

.side-rank .rank-mini-item em {
  color: #64748b;
}

.page-search {
  justify-content: center;
  margin-top: 24px;
}

.page-search input {
  width: min(520px, 72vw);
  padding: 14px 18px;
}

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.7);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 14px;
  color: rgba(255, 255, 255, 0.78);
}

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

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

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed #bae6fd;
  border-radius: 24px;
  padding: 34px;
  text-align: center;
  color: #0369a1;
  background: #f0f9ff;
  font-weight: 800;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

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

  .hero-content,
  .detail-layout,
  .detail-body {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

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

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

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

  .movie-grid,
  .featured-grid,
  .category-grid,
  .large-category-grid,
  .rank-mini-grid,
  .pill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .rank-row {
    grid-template-columns: 42px 72px minmax(0, 1fr);
  }

  .rank-row img {
    height: 72px;
  }

  .rank-heat {
    grid-column: 2 / -1;
    width: fit-content;
  }

  .footer-inner {
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .brand-text {
    font-size: 17px;
  }

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

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

  .primary-btn,
  .ghost-btn,
  .page-search input,
  .page-search button {
    width: 100%;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .large-category-grid,
  .rank-mini-grid,
  .pill-grid {
    grid-template-columns: 1fr;
  }

  .section-pad {
    padding: 42px 0;
  }

  .hot-panel,
  .article-card,
  .side-rank {
    padding: 20px;
    border-radius: 22px;
  }

  .detail-layout {
    padding: 34px 0;
    min-height: auto;
  }

  .detail-hero {
    min-height: auto;
  }
}
