:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #22d3ee;
  --blue: #38bdf8;
  --deep: #020617;
  --slate: #111827;
  --soft: rgba(15, 23, 42, 0.08);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #eef6ff 48%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.96));
  color: #fff;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.24);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #0f172a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.28);
  font-size: 15px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.84);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-link {
  display: block;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
}

.mobile-link.active {
  color: var(--cyan);
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-slider {
  position: relative;
  min-height: 72vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.06);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 26%, rgba(34, 211, 238, 0.24), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.76) 45%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 42%);
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 72vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 72px 0 92px;
  color: #fff;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 7px 12px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.18);
  border: 1px solid rgba(103, 232, 249, 0.26);
  border-radius: 999px;
  font-size: 14px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-shadow: 0 12px 35px rgba(0, 0, 0, 0.36);
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(226, 232, 240, 0.94);
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.detail-meta span,
.tag-row span,
.card-meta span,
.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #0f172a;
  background: #e0f2fe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

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

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

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

.primary-btn {
  color: #020617;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 45px rgba(14, 165, 233, 0.28);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.small-btn {
  min-height: 38px;
  padding: 0 15px;
  color: #0369a1;
  background: #e0f2fe;
}

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

.hero-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.45);
  transform: perspective(900px) rotateY(-7deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 30px;
  pointer-events: none;
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.hero-control:hover {
  background: rgba(14, 165, 233, 0.6);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  background: var(--cyan);
}

main {
  min-height: 60vh;
}

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

.section {
  padding: 64px 0 0;
}

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

.section-title,
.page-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-subtitle,
.page-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: var(--shadow);
}

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.poster-frame img {
  width: 100%;
  aspect-ratio: 2 / 2.9;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 42px;
  padding: 5px 9px;
  color: #0f172a;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.card-body {
  padding: 16px;
}

.card-meta {
  gap: 7px;
  margin-bottom: 10px;
}

.card-meta span {
  min-height: 24px;
  padding: 3px 8px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
}

.movie-card h3 {
  min-height: 56px;
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.45;
}

.movie-card h3 a:hover {
  color: #0891b2;
}

.movie-card p {
  min-height: 70px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.38), transparent 34%),
    linear-gradient(135deg, #0f172a, #164e63);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 65px rgba(15, 23, 42, 0.22);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.category-card span {
  color: rgba(226, 232, 240, 0.9);
  font-size: 14px;
}

.ranking-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 76px minmax(0, 1fr) 96px;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #0f172a;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  border-radius: 14px;
  font-weight: 900;
}

.rank-item img {
  width: 76px;
  height: 104px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.rank-info strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

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

.side-panel {
  padding: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

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

.compact-list {
  display: grid;
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.compact-card:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.52);
}

.compact-card img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.compact-card strong {
  display: block;
  overflow: hidden;
  margin-bottom: 4px;
  font-size: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 170px 170px;
  gap: 14px;
  padding: 18px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  font: inherit;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.16);
}

.detail-hero {
  padding: 44px 0;
  color: #fff;
  background:
    radial-gradient(circle at 84% 12%, rgba(34, 211, 238, 0.28), transparent 32%),
    linear-gradient(135deg, #020617, #0f172a 50%, #164e63);
}

.detail-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: rgba(226, 232, 240, 0.8);
  font-size: 14px;
}

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

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-intro {
  max-width: 780px;
  margin: 0 0 22px;
  color: rgba(226, 232, 240, 0.92);
  font-size: 18px;
}

.detail-meta span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
}

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

.player-card {
  overflow: hidden;
  background: #fff;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72)),
    var(--poster-bg);
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.play-cover.is-hidden {
  display: none;
}

.play-button {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  color: #020617;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(34, 211, 238, 0.38);
  font-size: 32px;
  transform: translateZ(0);
}

.player-info {
  padding: 24px;
}

.player-info h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.content-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.article-panel {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.article-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.article-panel p {
  margin: 0 0 20px;
  color: #334155;
  font-size: 16px;
  line-height: 1.85;
}

.page-shell {
  padding: 46px 0 0;
}

.site-footer {
  margin-top: 72px;
  padding: 46px 0 28px;
  color: rgba(226, 232, 240, 0.86);
  background: #020617;
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 220px 220px;
  gap: 36px;
}

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

.site-footer p {
  max-width: 560px;
  margin: 0;
  color: rgba(203, 213, 225, 0.75);
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer a:not(.brand) {
  display: block;
  margin: 8px 0;
  color: rgba(203, 213, 225, 0.78);
}

.site-footer a:hover {
  color: var(--cyan);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 22px;
  color: rgba(148, 163, 184, 0.9);
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 34px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  text-align: center;
}

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

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

  .mobile-toggle {
    display: block;
  }

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

  .hero-inner,
  .detail-wrap,
  .content-grid,
  .ranking-panel {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

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

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

@media (max-width: 640px) {
  .nav-shell {
    height: 62px;
  }

  .brand {
    font-size: 18px;
  }

  .hero,
  .hero-slider,
  .hero-inner {
    min-height: 76vh;
  }

  .hero-inner {
    padding: 58px 0 82px;
  }

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

  .hero-control {
    top: auto;
    bottom: 72px;
  }

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

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

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

  .rank-item .small-btn {
    grid-column: 2 / 4;
  }

  .rank-item img {
    width: 58px;
    height: 78px;
  }

  .section-header,
  .page-header {
    align-items: start;
    flex-direction: column;
  }

  .article-panel,
  .side-panel {
    padding: 20px;
  }
}
