:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #ecfdf5;
  --bg-warm: #fffbeb;
  --text: #111827;
  --muted: #64748b;
  --line: #d1fae5;
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0d9488;
  --amber: #f59e0b;
  --shadow: 0 24px 60px rgba(15, 118, 110, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(5, 150, 105, 0.08);
  backdrop-filter: blur(16px);
}

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

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

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

.brand-name {
  font-size: clamp(20px, 2vw, 26px);
  background: linear-gradient(90deg, var(--emerald-dark), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: #374151;
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--emerald);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #ecfdf5;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--emerald-dark);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
}

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

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

.section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.section-head {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-kicker,
.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #d1fae5;
  color: var(--emerald-dark);
  font-size: 14px;
  font-weight: 800;
}

.section-head h2,
.page-title h1 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
}

.section-head p,
.page-title p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.hero {
  position: relative;
  min-height: clamp(620px, 82vh, 780px);
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 16%, rgba(16, 185, 129, 0.25), transparent 28%),
    radial-gradient(circle at 84% 24%, rgba(20, 184, 166, 0.22), transparent 26%),
    linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 48%, #fffbeb 100%);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  background: linear-gradient(0deg, #ffffff, rgba(255, 255, 255, 0));
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.35)), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
  transform: scale(1.02);
}

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

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  min-height: clamp(620px, 82vh, 780px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: 54px 0 82px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  max-width: 780px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.03;
  letter-spacing: -0.055em;
  background: linear-gradient(90deg, #065f46, #0d9488, #047857);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 26px;
  color: #334155;
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 18px 36px rgba(5, 150, 105, 0.24);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover,
button.button:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 24px 48px rgba(5, 150, 105, 0.32);
}

.button.secondary {
  background: #ffffff;
  color: var(--emerald-dark);
  border: 2px solid var(--emerald);
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.14);
}

.hero-tags,
.tag-list,
.inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span,
.inline-meta span,
.category-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--emerald-dark);
  font-size: 13px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.12);
}

.hero-poster {
  position: relative;
  display: block;
  width: min(360px, 100%);
  justify-self: end;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #d1fae5;
}

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.28);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--emerald);
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card,
.category-card,
.feature-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(209, 250, 229, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(15, 118, 110, 0.1);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover,
.category-card:hover,
.feature-card:hover {
  transform: translateY(-7px);
  border-color: rgba(5, 150, 105, 0.38);
  box-shadow: var(--shadow);
}

.movie-card figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #d1fae5, #ccfbf1);
}

.movie-card.small-card figure {
  aspect-ratio: 4 / 3;
}

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

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

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--emerald);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(5, 150, 105, 0.24);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  overflow: hidden;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.scroller {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 6px 2px 24px;
  scroll-snap-type: x proximity;
}

.scroller .movie-card {
  flex: 0 0 290px;
  scroll-snap-align: start;
}

.band {
  background: linear-gradient(90deg, #ecfdf5, #f0fdfa, #fffbeb);
}

.dark-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.dark-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.6s ease;
}

.dark-card:hover img {
  transform: scale(1.08);
}

.dark-card div {
  position: absolute;
  inset: auto 0 0 0;
  padding: 30px;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0));
}

.dark-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.dark-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

.category-card,
.feature-card {
  padding: 26px;
}

.category-card h3,
.feature-card h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 23px;
}

.category-card p,
.feature-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.category-card .mini-links {
  display: grid;
  gap: 10px;
}

.category-card .mini-links a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fafc;
  color: #334155;
  font-size: 14px;
  font-weight: 750;
}

.category-card .mini-links a:hover {
  background: #ecfdf5;
  color: var(--emerald-dark);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 76px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 26px rgba(15, 118, 110, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.rank-number {
  color: var(--emerald);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 76px;
  height: 102px;
  border-radius: 16px;
  object-fit: cover;
  background: #d1fae5;
}

.rank-item h3 {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 18px;
}

.rank-item p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  padding: clamp(52px, 8vw, 88px) 0 36px;
  background:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.2), transparent 26%),
    linear-gradient(135deg, #ecfdf5, #ffffff 52%, #fffbeb);
}

.page-title {
  max-width: 850px;
}

.content-toolbar,
.search-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.08);
}

.content-toolbar h2 {
  margin: 0;
  color: #0f172a;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 34px 0 0;
}

.pagination a,
.pagination strong,
.pagination span {
  min-width: 40px;
  padding: 9px 13px;
  border-radius: 12px;
  text-align: center;
  font-weight: 800;
}

.pagination a {
  background: #ffffff;
  color: var(--emerald-dark);
  border: 1px solid var(--line);
}

.pagination strong {
  background: var(--emerald);
  color: #ffffff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  gap: 34px;
  align-items: start;
  padding: 28px 0 68px;
}

.player-card,
.detail-card,
.aside-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  background: #020617;
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.72);
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 18px 44px rgba(5, 150, 105, 0.36);
  transition: transform 0.2s ease;
}

.play-button:hover {
  transform: scale(1.08);
}

.player-caption {
  padding: 22px 24px;
}

.player-caption h1 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.14;
}

.player-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.detail-card {
  padding: 28px;
  margin-top: 24px;
}

.detail-card h2,
.aside-card h2 {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: 24px;
}

.detail-card p {
  margin: 0 0 18px;
  color: #334155;
}

.aside-card {
  position: sticky;
  top: 104px;
  padding: 24px;
}

.detail-poster {
  overflow: hidden;
  margin: 0 0 20px;
  border-radius: 22px;
  background: #d1fae5;
}

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

.info-list {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.info-list div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  color: #0f172a;
  font-weight: 800;
  text-align: right;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

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

.search-panel input,
.search-panel select {
  min-height: 46px;
  border: 1px solid #a7f3d0;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  padding: 0 14px;
  outline: none;
}

.search-panel input {
  flex: 1 1 280px;
}

.search-panel select {
  flex: 0 1 180px;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #ecfdf5);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 12px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 18px;
}

.site-footer p {
  margin: 0 0 12px;
  color: var(--muted);
}

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

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

.site-footer a {
  color: #475569;
  font-weight: 700;
}

.site-footer a:hover {
  color: var(--emerald-dark);
}

.back-top {
  display: inline-flex;
  border: 0;
  background: transparent;
  color: var(--emerald-dark);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.empty-result {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1024px) {
  .grid.cards,
  .grid.cards.three,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-inner,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    justify-self: start;
    width: min(300px, 78vw);
  }

  .aside-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .header-inner {
    height: 66px;
  }

  .hero {
    min-height: 720px;
  }

  .hero-inner {
    min-height: 720px;
    padding-top: 34px;
  }

  .hero-slide::before {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.96)), var(--hero-image);
  }

  .grid.cards,
  .grid.cards.three,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 68px minmax(0, 1fr);
  }

  .rank-item img {
    width: 68px;
    height: 92px;
  }

  .detail-card,
  .aside-card,
  .player-caption {
    padding: 20px;
  }

  .play-button {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
