* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.nav-shell {
  max-width: 1280px;
  height: 66px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #10b981, #0891b2);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(16, 185, 129, 0.22);
}

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

.main-nav a,
.nav-dropdown button {
  color: #cbd5e1;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px 0;
}

.main-nav a:hover,
.nav-dropdown button:hover {
  color: #34d399;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 40px;
  left: 0;
  min-width: 168px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: #1e293b;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  display: grid;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

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

.dropdown-panel a {
  padding: 8px 10px;
  border-radius: 10px;
}

.dropdown-panel a:hover {
  background: #334155;
}

.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(360px, 34vw);
  border-radius: 999px;
  background: #334155;
  padding: 4px;
}

.nav-search input,
.search-box input {
  width: 100%;
  color: #ffffff;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 9px 12px;
}

.nav-search input::placeholder,
.search-box input::placeholder {
  color: #94a3b8;
}

.nav-search button,
.search-box button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: #10b981;
  padding: 8px 14px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #ffffff;
  background: transparent;
  border: 0;
  font-size: 26px;
}

.mobile-menu {
  display: none;
  padding: 12px 22px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: #0f172a;
}

.mobile-menu.is-open {
  display: grid;
  gap: 8px;
}

.mobile-menu a {
  padding: 10px 12px;
  border-radius: 10px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.45);
}

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.16), transparent 34%), #020617;
}

.hero-stage {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 440px);
  gap: 42px;
  align-items: center;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 76px 24px 92px;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.2;
  filter: blur(4px);
}

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

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

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

.hero-kicker {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 999px;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  color: #cbd5e1;
  font-size: 18px;
}

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

.hero-tags span,
.detail-tags span,
.meta-row span,
.detail-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.85);
  font-size: 13px;
}

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

.btn-primary,
.btn-ghost,
.hero-actions a:not(.btn-primary):not(.btn-ghost),
.section-more,
.category-card-large span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #0891b2);
  box-shadow: 0 16px 36px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 44px rgba(16, 185, 129, 0.33);
}

.btn-ghost,
.hero-actions a:not(.btn-primary):not(.btn-ghost) {
  color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.72);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.48);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 4;
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.86);
  font-size: 28px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: #64748b;
}

.hero-dot.is-active {
  width: 28px;
  background: #10b981;
}

.hero-rail {
  max-width: 1280px;
  margin: -48px auto 0;
  padding: 0 24px 34px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 14px;
  position: relative;
  z-index: 5;
}

.hero-rail a {
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-rail img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-rail span {
  display: block;
  padding: 8px 10px;
  color: #cbd5e1;
  font-size: 13px;
}

.content-section,
.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.intro-section {
  padding-top: 42px;
  padding-bottom: 22px;
}

.intro-section h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.detail-content h2,
.rank-panel h2 {
  margin: 0;
  color: #ffffff;
  line-height: 1.15;
}

.intro-section p,
.section-head p,
.page-hero p,
.rank-panel p,
.detail-line,
.detail-content p,
.category-card-large p,
.movie-card p,
.site-footer p,
.rank-card p {
  color: #94a3b8;
}

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

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

.section-more {
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
}

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

.category-tile,
.category-card-large,
.movie-card,
.rank-panel,
.detail-side,
.detail-content article,
.rank-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.category-tile {
  min-height: 150px;
  padding: 22px;
}

.category-tile span {
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
}

.category-tile p {
  margin: 10px 0 0;
  color: #94a3b8;
  font-size: 14px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

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

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

.movie-card {
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 22px 60px rgba(16, 185, 129, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.poster-rating,
.poster-play {
  position: absolute;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.poster-rating {
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.poster-play {
  left: 10px;
  bottom: 10px;
  padding: 6px 10px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-card h2 a:hover {
  color: #34d399;
}

.movie-card p {
  margin: 0 0 12px;
  min-height: 48px;
  font-size: 14px;
}

.meta-row span {
  font-size: 12px;
  padding: 4px 8px;
}

.rank-panel {
  position: sticky;
  top: 88px;
  padding: 22px;
}

.rank-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.rank-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.58);
}

.rank-row span {
  color: #10b981;
  font-weight: 900;
}

.rank-row strong {
  overflow: hidden;
  color: #e5e7eb;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row em {
  color: #fbbf24;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.wide {
  width: 100%;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 12% 20%, rgba(16, 185, 129, 0.16), transparent 35%), linear-gradient(135deg, #0f172a, #020617);
}

.slim-hero,
.category-hero {
  padding: 72px 24px;
  text-align: center;
}

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

.page-hero p {
  max-width: 760px;
  margin: 16px auto 0;
}

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

.category-card-large {
  overflow: hidden;
}

.category-card-large a {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  align-items: center;
}

.category-cover-set {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-cover-set img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.category-card-large h2 {
  margin: 0 0 8px;
  color: #ffffff;
}

.category-card-large span {
  margin-top: 10px;
  color: #ffffff;
  background: #10b981;
}

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

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

.feature-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.feature-links a {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.86);
}

.feature-links em {
  color: #34d399;
  font-style: normal;
}

.search-box {
  max-width: 720px;
  margin: 28px auto 0;
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.86);
}

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

.rank-card {
  display: grid;
  grid-template-columns: 96px 60px minmax(0, 1fr) 70px;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rank-number {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, #10b981, #0891b2);
}

.rank-card h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 20px;
}

.rank-card strong {
  color: #fbbf24;
  font-size: 20px;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  filter: blur(4px);
}

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

.detail-shell {
  position: relative;
  z-index: 2;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
}

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

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

.detail-line {
  max-width: 840px;
  font-size: 18px;
}

.detail-meta,
.detail-tags {
  margin: 18px 0;
}

.player-section {
  padding-top: 34px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.52));
  cursor: pointer;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #0891b2);
  font-size: 34px;
  box-shadow: 0 18px 48px rgba(16, 185, 129, 0.33);
}

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

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.detail-content article,
.detail-side {
  padding: 24px;
}

.detail-content p {
  font-size: 16px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px 14px;
}

.detail-side dt {
  color: #94a3b8;
}

.detail-side dd {
  margin: 0;
  color: #e5e7eb;
}

.site-footer {
  margin-top: 42px;
  padding: 48px 24px 24px;
  background: linear-gradient(180deg, #0f172a, #020617);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 34px;
}

.site-footer h3 {
  color: #ffffff;
  margin: 0 0 12px;
}

.site-footer a {
  display: block;
  color: #94a3b8;
  margin: 7px 0;
}

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

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.footer-bottom {
  max-width: 1280px;
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  color: #64748b;
  text-align: center;
}

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

  .menu-toggle {
    display: block;
  }

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

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

  .hero-poster {
    display: none;
  }

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

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

  .split-section,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    height: auto;
    min-height: 64px;
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .brand {
    flex: 1;
  }

  .nav-search {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .hero-stage {
    min-height: 560px;
  }

  .hero-slide {
    padding: 54px 18px 88px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-actions a,
  .btn-primary,
  .btn-ghost {
    width: 100%;
  }

  .hero-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
  }

  .content-section,
  .detail-shell {
    padding: 38px 16px;
  }

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

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

  .category-card-large a,
  .detail-layout,
  .rank-card {
    grid-template-columns: 1fr;
  }

  .rank-card strong {
    text-align: left;
  }

  .detail-poster {
    max-width: 240px;
  }

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

@media (max-width: 480px) {
  .category-grid,
  .movie-grid,
  .compact-grid,
  .category-large-grid {
    grid-template-columns: 1fr;
  }

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

  .search-box {
    border-radius: 22px;
    flex-direction: column;
  }
}
