:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #ecfdf5;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #020617;
  --emerald: #059669;
  --emerald-deep: #047857;
  --blue: #2563eb;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.top-nav {
  width: min(1180px, calc(100% - 32px));
  min-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: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--blue));
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.28);
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 650;
  color: #334155;
}

.nav-menu a {
  position: relative;
  padding: 22px 0;
  transition: color 0.2s ease;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  height: 3px;
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--emerald);
  transition: transform 0.2s ease;
}

.nav-menu a:hover {
  color: var(--emerald);
}

.nav-menu a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  display: block;
  margin: 5px auto;
  border-radius: 99px;
  background: #0f172a;
}

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

.page-pad {
  padding-top: 42px;
  padding-bottom: 72px;
}

.hero-carousel {
  position: relative;
  min-height: 70vh;
  height: 720px;
  max-height: 820px;
  overflow: hidden;
  background: var(--dark);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  transition: opacity 0.7s ease, transform 1.2s ease;
  transform: scale(1.03);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 40%, rgba(16, 185, 129, 0.32), transparent 28%), linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.04) 44%, rgba(2, 6, 23, 0.75));
}

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

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 720px;
  color: #ffffff;
}

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

.hero-kicker span,
.detail-label {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--emerald);
  font-size: 14px;
  font-weight: 800;
}

.hero-kicker em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
}

.hero-content h1 {
  margin: 24px 0 18px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.7;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 650;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--emerald);
  box-shadow: 0 16px 36px rgba(5, 150, 105, 0.34);
}

.primary-button:hover {
  transform: translateY(-2px);
  background: var(--emerald-deep);
  box-shadow: 0 18px 42px rgba(5, 150, 105, 0.42);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.ghost-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.24);
}

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

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
  color: #ffffff;
}

.hero-arrow {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 32px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

.intro-search {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 28px;
  align-items: center;
  margin-top: -58px;
  position: relative;
  z-index: 4;
}

.intro-copy,
.search-panel,
.content-card {
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 28px;
  box-shadow: var(--soft-shadow);
}

.intro-copy {
  padding: 30px;
}

.intro-copy h2,
.section-head h2,
.content-card h2 {
  margin: 0;
  color: var(--text);
}

.intro-copy p,
.section-head p,
.content-card p {
  color: var(--muted);
  line-height: 1.8;
}

.search-panel {
  padding: 20px;
}

.search-label {
  display: block;
  margin-bottom: 10px;
  color: #334155;
  font-weight: 800;
}

.js-search {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 18px;
  outline: none;
  color: var(--text);
  background: #f8fafc;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.js-search:focus {
  border-color: rgba(5, 150, 105, 0.7);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: #475569;
  background: #ffffff;
  cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
  border-color: var(--emerald);
  color: #ffffff;
  background: var(--emerald);
}

section.main-wrap,
.main-wrap > section {
  margin-top: 72px;
}

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

.section-head h2 {
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
}

.section-more {
  flex: 0 0 auto;
  color: var(--emerald);
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
  height: 100%;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card a:hover {
  transform: translateY(-6px);
  border-color: rgba(5, 150, 105, 0.45);
  box-shadow: var(--shadow);
}

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

.movie-card.compact .poster-wrap {
  aspect-ratio: 4 / 5;
}

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

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

.card-type,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.card-type {
  right: 12px;
  background: rgba(5, 150, 105, 0.92);
}

.rank-badge {
  left: 12px;
  background: rgba(2, 6, 23, 0.76);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card.compact .card-body h3 {
  font-size: 16px;
}

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

.card-meta {
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.highlight-block {
  padding: 42px;
  border-radius: 34px;
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.wide-grid,
.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.wide-card a {
  position: relative;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 18px;
  min-height: 154px;
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wide-card a:hover {
  transform: translateY(-4px);
  box-shadow: var(--soft-shadow);
}

.wide-card img {
  width: 118px;
  height: 150px;
  border-radius: 16px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.wide-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.wide-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wide-card .tag-row {
  margin-top: 12px;
}

.wide-card .tag-row span {
  background: #ecfdf5;
  color: #047857;
  border-color: #bbf7d0;
}

.wide-rank {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.24);
}

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

.category-card a {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  border-radius: 28px;
  color: #ffffff;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card a:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-card span {
  width: max-content;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 800;
}

.category-card h2 {
  margin: 14px 0 8px;
  font-size: 26px;
}

.category-card p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.category-card strong {
  color: #a7f3d0;
}

.page-hero {
  padding: 58px;
  border-radius: 34px;
  color: #ffffff;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.small-hero {
  color: var(--text);
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
}

.page-hero span {
  color: var(--emerald);
  font-weight: 900;
}

.page-hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(34px, 6vw, 56px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: currentColor;
  opacity: 0.82;
  line-height: 1.85;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  color: #64748b;
  font-size: 14px;
}

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

.detail-page {
  padding-bottom: 72px;
}

.detail-hero {
  min-height: 620px;
  color: #ffffff;
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  padding-top: 42px;
  padding-bottom: 64px;
}

.detail-hero .breadcrumb {
  color: rgba(255, 255, 255, 0.72);
}

.detail-hero .breadcrumb a {
  color: #a7f3d0;
}

.detail-intro {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  max-width: 980px;
}

.detail-cover {
  width: 280px;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.detail-intro h1 {
  margin: 20px 0 16px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
  line-height: 1.75;
}

.detail-meta {
  color: rgba(255, 255, 255, 0.78);
}

.watch-section h2 {
  font-size: clamp(28px, 5vw, 42px);
  margin: 0 0 22px;
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.82));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-symbol {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--emerald);
  box-shadow: 0 18px 42px rgba(5, 150, 105, 0.38);
  font-size: 34px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.content-card {
  padding: 28px;
}

.content-card p {
  margin-bottom: 0;
  font-size: 16px;
}

.site-footer {
  margin-top: 84px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 42px;
  padding: 48px 0;
}

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

.site-footer p {
  max-width: 420px;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 17px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 10px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 16px;
  text-align: center;
  color: #94a3b8;
}

[data-hidden="true"] {
  display: none !important;
}

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

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

  .wide-grid,
  .ranking-list,
  .detail-content,
  .intro-search {
    grid-template-columns: 1fr;
  }

  .intro-search {
    margin-top: 28px;
  }
}

@media (max-width: 780px) {
  .top-nav {
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu a {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .nav-menu a::after {
    display: none;
  }

  .nav-menu a:hover {
    background: #ecfdf5;
  }

  .hero-carousel {
    min-height: 620px;
    height: 620px;
  }

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

  .hero-controls {
    bottom: 20px;
  }

  .hero-arrow {
    width: 40px;
    height: 40px;
  }

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

  .highlight-block,
  .page-hero {
    padding: 24px;
    border-radius: 24px;
  }

  .wide-card a {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
  }

  .wide-card img {
    width: 96px;
    height: 128px;
  }

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

  .detail-cover {
    width: min(260px, 78vw);
  }

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

@media (max-width: 520px) {
  .main-wrap,
  .top-nav,
  .footer-inner,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 18px;
  }

  .hero-carousel {
    min-height: 580px;
    height: 580px;
  }

  .hero-content p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-actions,
  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .ghost-button,
  .filter-button {
    width: 100%;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .wide-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }

  .card-body p {
    min-height: auto;
  }

  .player-shell {
    border-radius: 18px;
  }
}
