html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #020617;
  color: #e2e8f0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 10%, rgba(6, 182, 212, 0.14), transparent 32rem),
    radial-gradient(circle at 85% 15%, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 50%, #020617 100%);
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(51, 65, 85, 0.7);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 0 26px rgba(6, 182, 212, 0.35);
}

.brand-copy {
  display: grid;
  gap: 0;
}

.brand-copy strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: #94a3b8;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #cbd5e1;
  font-weight: 600;
}

.nav-link {
  position: relative;
  padding: 22px 0;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 14px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: #22d3ee;
  transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #22d3ee;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  border: 0;
  color: #e2e8f0;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid rgba(51, 65, 85, 0.65);
}

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

.mobile-nav-link:hover {
  color: #22d3ee;
  background: rgba(30, 41, 59, 0.7);
}

.hero-carousel {
  position: relative;
  height: 82vh;
  min-height: 620px;
  overflow: hidden;
  margin-top: 68px;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.1)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.35) 45%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  top: 50%;
  width: min(640px, calc(100% - 64px));
  transform: translateY(-50%);
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags a,
.card-tags span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  padding: 5px 11px;
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.12);
  font-size: 13px;
}

.hero-content h1 {
  margin: 18px 0 16px;
  color: #fff;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
  color: #94a3b8;
}

.hero-meta span {
  border-radius: 10px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.72);
}

.hero-actions,
.detail-title-row,
.section-head,
.section-head-link,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.3);
}

.ghost-btn,
.section-more {
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.55);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.22);
  border-color: rgba(34, 211, 238, 0.6);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.52);
  backdrop-filter: blur(12px);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}

.hero-arrow:hover {
  transform: translateY(-50%) scale(1.08);
  background: rgba(15, 23, 42, 0.86);
}

.hero-prev {
  left: 22px;
  transform: translateY(-50%);
}

.hero-next {
  right: 22px;
  transform: translateY(-50%);
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: #22d3ee;
}

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

.page-top {
  padding-top: 112px;
}

section + section {
  margin-top: 72px;
}

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

.section-head h2,
.inner-hero h1,
.detail-content h1 {
  margin: 0;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-head p,
.inner-hero p {
  margin: 8px 0 0;
  color: #94a3b8;
}

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

.category-card,
.category-overview-card,
.search-panel,
.detail-content,
.related-panel,
.inner-hero {
  border: 1px solid rgba(51, 65, 85, 0.62);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.7));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.category-card,
.category-overview-card {
  padding: 20px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.45);
}

.category-icon,
.category-main-link span {
  color: #22d3ee;
  font-size: 22px;
}

.category-card h3,
.category-overview-card h2 {
  margin: 10px 0 8px;
  color: #fff;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
}

.category-samples,
.overview-links {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.category-samples a,
.overview-links a {
  color: #cbd5e1;
  font-size: 13px;
}

.category-samples a:hover,
.overview-links a:hover {
  color: #22d3ee;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 16px;
  padding: 18px;
  margin-bottom: 26px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 999px;
  padding: 9px 16px;
  color: #94a3b8;
  background: rgba(2, 6, 23, 0.45);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font: inherit;
}

.search-box input::placeholder {
  color: #64748b;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-chip {
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 999px;
  padding: 9px 14px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #fff;
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(6, 182, 212, 0.25);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.62);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.55);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 24px 70px rgba(6, 182, 212, 0.13);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.movie-card-compact .poster-wrap {
  aspect-ratio: 16 / 10;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 58%);
  opacity: 0.8;
}

.type-badge,
.rank-num {
  position: absolute;
  z-index: 2;
  top: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 700;
}

.type-badge {
  left: 10px;
}

.rank-num {
  right: 10px;
  color: #67e8f9;
}

.play-hover,
.player-button {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: #fff;
  background: rgba(6, 182, 212, 0.9);
  box-shadow: 0 0 28px rgba(6, 182, 212, 0.4);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p {
  min-height: 44px;
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 12px;
}

.card-tags span {
  padding: 3px 8px;
  font-size: 11px;
}

.inner-hero {
  padding: 42px;
  margin-bottom: 34px;
}

.inner-hero span {
  color: #22d3ee;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.inner-hero h1 {
  margin-top: 8px;
  font-size: clamp(34px, 5vw, 58px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: #94a3b8;
}

.breadcrumb a:hover {
  color: #22d3ee;
}

.player-section {
  margin-bottom: 34px;
}

.player {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 26px;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.45);
}

.player video,
.player-cover,
.player-cover img,
.player-cover-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player video {
  z-index: 1;
  background: #000;
}

.player-cover {
  z-index: 2;
  display: block;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-cover img {
  object-fit: cover;
}

.player-cover-shade {
  background:
    radial-gradient(circle at center, rgba(6, 182, 212, 0.18), rgba(2, 6, 23, 0.35)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.2));
}

.player-button {
  width: 86px;
  height: 86px;
  font-size: 34px;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  gap: 26px;
  align-items: start;
}

.detail-content,
.related-panel {
  padding: 28px;
}

.detail-title-row {
  align-items: flex-start;
  margin-bottom: 18px;
}

.detail-content h1 {
  font-size: clamp(30px, 4vw, 52px);
}

.detail-content h2,
.related-panel h2 {
  margin: 28px 0 12px;
  color: #fff;
  font-size: 24px;
}

.detail-content p {
  margin: 0 0 14px;
  color: #cbd5e1;
}

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

.detail-meta span {
  border-radius: 12px;
  padding: 8px 11px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.82);
}

.related-panel {
  position: sticky;
  top: 90px;
}

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

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

.ranking-row a {
  display: grid;
  grid-template-columns: 64px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(51, 65, 85, 0.62);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.55);
}

.ranking-row a:hover {
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(30, 41, 59, 0.82);
}

.ranking-index {
  color: #67e8f9;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.ranking-row img {
  width: 92px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ranking-title strong {
  color: #fff;
  font-size: 17px;
}

.ranking-title em {
  color: #94a3b8;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-meta {
  color: #94a3b8;
  white-space: nowrap;
}

.empty-state {
  margin: 22px 0;
  padding: 20px;
  border-radius: 18px;
  color: #94a3b8;
  text-align: center;
  background: rgba(15, 23, 42, 0.7);
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(51, 65, 85, 0.7);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), #020617);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 20px;
}

.footer-inner p {
  max-width: 560px;
  margin: 8px 0 0;
  color: #94a3b8;
}

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

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

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 30px;
  color: #64748b;
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 16px;
    font-size: 14px;
  }

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

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

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

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

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

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

  .hero-carousel {
    min-height: 560px;
    height: 76vh;
  }

  .hero-content {
    left: 20px;
    width: calc(100% - 40px);
  }

  .hero-arrow {
    display: none;
  }

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

  .filter-row {
    justify-content: flex-start;
  }

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

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

  .related-panel {
    position: static;
  }

  .ranking-row a {
    grid-template-columns: 46px 74px minmax(0, 1fr);
  }

  .ranking-meta {
    grid-column: 3;
  }
}

@media (max-width: 560px) {
  .brand-copy small {
    display: none;
  }

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

  .hero-actions,
  .detail-title-row,
  .section-head-link,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .rank-grid {
    grid-template-columns: 1fr;
  }

  .page-main {
    width: min(100% - 24px, 1180px);
  }

  .inner-hero,
  .detail-content,
  .related-panel {
    padding: 22px;
  }

  .player-button {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
