html {
  scroll-behavior: smooth;
}

body {
  background: #020617;
  color: #f8fafc;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

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

img {
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 14px 35px rgba(16, 185, 129, 0.26);
  font-size: 0.75rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.14);
}

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0.8rem;
  background: rgba(15, 23, 42, 0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.28rem;
}

.menu-toggle span {
  width: 1.15rem;
  height: 2px;
  background: #f8fafc;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 0.8rem 1rem 1rem;
  background: rgba(2, 6, 23, 0.96);
}

.mobile-nav.is-open {
  display: grid;
  gap: 0.35rem;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
  background: #020617;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.85s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.68) 44%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
}

.hero-copy {
  max-width: 42rem;
  animation: fadeInUp 0.65s ease both;
}

.hero-kicker,
.section-kicker {
  color: #34d399;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.hero-copy h1,
.hero-copy h2 {
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 1.02;
  font-weight: 900;
  color: #fff;
  margin: 0 0 1.1rem;
  letter-spacing: -0.045em;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #dbeafe;
  line-height: 1.8;
  margin-bottom: 1.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta,
.card-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  color: #cbd5e1;
}

.hero-meta span,
.detail-meta span {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 0.38rem 0.78rem;
}

.rating {
  color: #fbbf24;
}

.hero-actions,
.detail-watch {
  margin-top: 2rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  border-radius: 0.85rem;
  padding: 0.78rem 1.2rem;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.2);
}

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

.btn-primary:hover {
  background: #059669;
}

.btn-secondary {
  margin-left: 0.8rem;
  border: 1px solid rgba(226, 232, 240, 0.22);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.5);
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.8rem;
  height: 2.8rem;
  border: 0;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.65);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(16, 185, 129, 0.82);
}

.hero-prev {
  left: 1.25rem;
}

.hero-next {
  right: 1.25rem;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.hero-dot {
  width: 0.55rem;
  height: 0.55rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 2rem;
  background: #10b981;
}

.page-shell {
  width: min(80rem, calc(100% - 2rem));
  margin: 0 auto;
}

.home-shell {
  padding: 4rem 0 5rem;
  display: grid;
  gap: 5rem;
}

.top-spaced {
  padding-top: 3rem;
  padding-bottom: 5rem;
}

.content-section {
  display: grid;
  gap: 1.35rem;
}

.category-panel,
.ranking-preview {
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 1.5rem;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(15, 23, 42, 0.44);
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.26);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section-heading h2 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  margin: 0;
}

.section-more {
  color: #34d399;
  font-weight: 700;
}

.movie-grid {
  display: grid;
  gap: 1.25rem;
}

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

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

.movie-card {
  color: #fff;
  display: grid;
  gap: 0.65rem;
}

.poster {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.28), rgba(15, 23, 42, 0.9));
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.32);
}

.poster-wide {
  width: 10rem;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
  border-radius: 0.9rem;
}

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

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

.play-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.48);
  color: #fff;
  font-size: 2rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .play-mask {
  opacity: 1;
}

.rating-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: #fbbf24;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.28rem 0.55rem;
}

.movie-card h3 {
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.35;
  margin: 0;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: #34d399;
}

.card-meta {
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #94a3b8;
}

.card-tags {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-list {
  display: grid;
  gap: 0.8rem;
}

.movie-card-horizontal {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: 1rem;
  padding: 0.8rem;
  background: rgba(15, 23, 42, 0.54);
  border: 1px solid rgba(148, 163, 184, 0.1);
  transition: background 0.2s ease, transform 0.2s ease;
}

.movie-card-horizontal:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.88);
}

.rank-number {
  width: 2rem;
  color: #34d399;
  font-size: 1.25rem;
  font-weight: 900;
  text-align: center;
}

.card-copy {
  min-width: 0;
  display: grid;
  gap: 0.4rem;
}

.card-copy p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero {
  border-radius: 1.7rem;
  padding: clamp(1.4rem, 4vw, 3rem);
  margin-bottom: 2rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(15, 23, 42, 0.78)), radial-gradient(circle at 70% 0%, rgba(34, 211, 238, 0.14), transparent 30%);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin: 0 0 0.8rem;
}

.page-hero p {
  max-width: 48rem;
  color: #cbd5e1;
  line-height: 1.8;
  margin: 0;
}

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

.category-card {
  border-radius: 1.35rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
  display: grid;
  gap: 0.8rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  background: rgba(30, 41, 59, 0.86);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.category-thumbs img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0.75rem;
  background: #0f172a;
}

.category-card h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 850;
}

.category-card p {
  color: #94a3b8;
  line-height: 1.65;
  margin: 0;
}

.category-card span {
  color: #34d399;
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12rem 12rem;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 1.25rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.58);
}

.filter-bar label {
  display: grid;
  gap: 0.35rem;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 700;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.85rem;
  color: #fff;
  background: #020617;
  padding: 0.78rem 0.9rem;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(52, 211, 153, 0.7);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #94a3b8;
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: #cbd5e1;
}

.breadcrumb a:hover {
  color: #34d399;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(15rem, 22rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 3rem);
  align-items: center;
  border-radius: 1.7rem;
  padding: clamp(1rem, 4vw, 2rem);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.88));
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-poster {
  border-radius: 1.25rem;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

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

.detail-copy h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
  margin: 0 0 1rem;
}

.detail-line {
  color: #dbeafe;
  line-height: 1.8;
  font-size: 1.08rem;
  margin-bottom: 1.15rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.tag-list span {
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.08);
  border-radius: 999px;
  padding: 0.36rem 0.72rem;
  font-size: 0.88rem;
}

.player-panel {
  margin-top: 2rem;
}

.player-shell {
  position: relative;
  border-radius: 1.35rem;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.55));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(16, 185, 129, 0.92);
  box-shadow: 0 18px 60px rgba(16, 185, 129, 0.34);
  font-size: 2rem;
  padding-left: 0.2rem;
}

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

.detail-text {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 3rem;
  border-radius: 1.35rem;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-text h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 850;
}

.detail-text p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(2, 6, 23, 0.92);
}

.footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #94a3b8;
}

.footer-inner strong {
  color: #fff;
  display: block;
  margin-bottom: 0.4rem;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

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

[hidden] {
  display: none !important;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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

@media (max-width: 1024px) {
  .grid-six,
  .grid-four,
  .category-index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-hero {
    grid-template-columns: 16rem minmax(0, 1fr);
  }
}

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

  .menu-toggle {
    display: flex;
  }

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

  .hero-content {
    align-items: flex-end;
    padding-bottom: 6rem;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.94));
  }

  .hero-control {
    display: none;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .btn-secondary {
    margin-left: 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .movie-card-horizontal {
    align-items: flex-start;
  }

  .poster-wide {
    width: 7.5rem;
  }

  .card-copy p {
    -webkit-line-clamp: 3;
  }

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

  .detail-poster {
    max-width: 17rem;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .nav-wrap {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .page-shell {
    width: min(100% - 1rem, 80rem);
  }

  .grid-six,
  .grid-four,
  .category-index-grid {
    gap: 0.9rem;
  }

  .movie-card-horizontal {
    display: grid;
  }

  .poster-wide {
    width: 100%;
  }
}
