:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --emerald: #059669;
  --teal: #0d9488;
  --cyan: #0891b2;
  --rose: #e11d48;
  --amber: #d97706;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 44%, #f1f5f9 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.28);
}

.brand-text {
  white-space: nowrap;
  font-size: 19px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--emerald);
  background: #ecfdf5;
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.header-search input,
.hero-search input {
  width: 260px;
  border: 0;
  outline: 0;
  padding: 11px 16px;
  background: transparent;
  color: var(--ink);
}

.header-search button,
.hero-search button {
  border: 0;
  color: #ffffff;
  padding: 11px 17px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  font-weight: 800;
  cursor: pointer;
}

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: #f1f5f9;
  font-size: 20px;
}

.mobile-nav {
  display: none;
  padding: 8px 24px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.mobile-nav a {
  display: block;
  padding: 11px 0;
  color: #475569;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 38px;
  align-items: center;
  padding: 64px max(24px, calc((100vw - 1280px) / 2)) 118px;
  color: #ffffff;
  background: radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.38), transparent 30%), linear-gradient(135deg, #047857 0%, #0f766e 42%, #155e75 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.14), rgba(15, 23, 42, 0.36));
  pointer-events: none;
}

.hero-copy,
.hero-stage {
  position: relative;
  z-index: 2;
}

.hero-label,
.eyebrow,
.section-title span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 20px 0 18px;
  max-width: 760px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.07em;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #ccfbf1;
  font-size: 20px;
  line-height: 1.8;
}

.hero-search {
  display: flex;
  width: min(100%, 560px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.hero-search input {
  flex: 1;
  min-width: 0;
}

.hero-stage {
  min-height: 430px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.36);
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.25) 56%, rgba(2, 6, 23, 0.52));
}

.hero-content {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 32px;
  color: #ffffff;
}

.hero-content h2 {
  margin: 16px 0 12px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #d1fae5;
  line-height: 1.75;
}

.hero-actions,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn,
.chip-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.32);
}

.btn.ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.btn.soft,
.chip-row a {
  color: #047857;
  background: #ecfdf5;
}

.btn:hover,
.chip-row a:hover,
.category-tile:hover,
.movie-card:hover {
  transform: translateY(-3px);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  right: 24px;
  bottom: 22px;
  display: flex;
  gap: 8px;
}

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

.hero-dots button.is-active {
  width: 28px;
  background: #ffffff;
}

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

.section.overlap {
  margin-top: -82px;
  position: relative;
  z-index: 3;
}

.section.tint {
  max-width: none;
  background: linear-gradient(135deg, #eff6ff, #ecfeff 48%, #f0fdfa);
}

.section.tint > * {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

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

.section-title span,
.page-hero span,
.detail-content .eyebrow {
  color: var(--emerald);
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.section-title h2,
.page-hero h1,
.detail-content h1 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-title a {
  color: var(--emerald);
  font-weight: 800;
}

.featured-card {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 30px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.featured-poster {
  min-height: 330px;
  overflow: hidden;
  border-radius: 22px;
  background: #0f172a;
}

.featured-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-info {
  align-self: center;
}

.featured-info h2 {
  margin: 14px 0;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.05em;
}

.featured-info p,
.page-hero p,
.detail-content p,
.side-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0 22px;
}

.meta-strip span {
  padding: 7px 11px;
  border-radius: 999px;
  color: #334155;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
}

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

.movie-card {
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: 0.2s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #0f766e);
}

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

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

.duration {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  min-height: 46px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 16px;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--emerald);
}

.card-body p {
  min-height: 42px;
  margin: 0 0 12px;
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.65;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

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

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

.category-tile {
  position: relative;
  min-height: 172px;
  overflow: hidden;
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--soft-shadow);
  transition: 0.2s ease;
}

.category-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.28), transparent 62%);
}

.category-tile strong {
  position: relative;
  display: block;
  margin-bottom: 12px;
  font-size: 24px;
}

.category-tile p {
  position: relative;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.rank-panel {
  padding-bottom: 78px;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

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

.rank-row a {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 15px 18px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  border: 1px solid var(--line);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
}

.rank-score {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.subpage {
  min-height: 60vh;
}

.page-hero {
  padding: 78px max(24px, calc((100vw - 1280px) / 2));
  color: var(--ink);
  background: radial-gradient(circle at 18% 15%, rgba(20, 184, 166, 0.18), transparent 28%), linear-gradient(135deg, #ffffff, #f0fdfa 50%, #ecfeff);
}

.page-hero.rank-hero {
  background: radial-gradient(circle at 80% 20%, rgba(244, 63, 94, 0.18), transparent 26%), linear-gradient(135deg, #fff7ed, #ecfeff);
}

.page-hero.small {
  padding-top: 62px;
  padding-bottom: 62px;
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 18px;
}

.hero-search.inner {
  margin-top: 24px;
  border-color: var(--line);
  box-shadow: var(--soft-shadow);
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--emerald);
  font-weight: 800;
}

.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.player-card,
.detail-content,
.side-card {
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.68));
  cursor: pointer;
  transition: opacity 0.22s ease;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  font-size: 36px;
  box-shadow: 0 24px 60px rgba(8, 145, 178, 0.36);
}

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

.detail-content {
  margin-top: 24px;
  padding: 30px;
}

.detail-content h1 {
  margin-bottom: 16px;
}

.detail-content h2 {
  margin: 30px 0 12px;
  font-size: 24px;
}

.detail-content .lead {
  font-size: 18px;
  color: #334155;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.tag-cloud a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 13px;
  font-weight: 800;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 20px;
}

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

.poster-card div,
.info-card {
  padding: 20px;
}

.poster-card h2,
.info-card h2 {
  margin: 0 0 10px;
}

.info-card dl {
  display: grid;
  grid-template-columns: 76px 1fr;
  row-gap: 12px;
  margin: 0;
}

.info-card dt {
  color: var(--muted);
  font-weight: 800;
}

.info-card dd {
  margin: 0;
}

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

.movie-card.compact .card-link {
  display: grid;
  grid-template-columns: 150px 1fr;
}

.movie-card.compact .poster-wrap {
  aspect-ratio: auto;
  min-height: 120px;
}

.movie-card.compact .card-body h3 {
  min-height: auto;
}

.site-footer {
  margin-top: 48px;
  padding: 54px 24px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b 58%, #0f172a);
}

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

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

.site-footer a {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
}

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

.hidden-card {
  display: none;
}

@media (max-width: 1080px) {
  .hero,
  .featured-card,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 780px) {
  .nav-shell {
    padding: 12px 16px;
  }

  .nav-links,
  .header-search {
    display: none;
  }

  .menu-button {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero {
    min-height: auto;
    padding: 42px 16px 92px;
  }

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

  .hero-bg {
    min-height: 470px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 24px;
  }

  .hero-actions {
    display: grid;
  }

  .section,
  .detail-layout,
  .breadcrumb {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .movie-grid,
  .search-grid,
  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-card.compact .card-link {
    display: block;
  }

  .rank-list.full,
  .category-grid.large,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-row a {
    grid-template-columns: 48px 1fr;
  }

  .rank-score {
    display: none;
  }

  .featured-card,
  .detail-content {
    padding: 18px;
  }

  .card-body h3 {
    font-size: 15px;
  }
}

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

  .hero-search {
    border-radius: 18px;
    flex-direction: column;
  }

  .hero-search input,
  .hero-search button {
    width: 100%;
  }
}
