:root {
  color-scheme: light;
  --page-bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --emerald: #059669;
  --emerald-deep: #047857;
  --emerald-soft: rgba(5, 150, 105, 0.12);
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

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

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

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

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

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-size: 20px;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

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

.nav-link {
  padding: 10px 13px;
  color: #334155;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

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

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  cursor: pointer;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: var(--ink);
}

.mobile-menu {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

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

.mobile-link {
  padding: 12px 16px;
  border-radius: 14px;
  background: #ffffff;
  color: #334155;
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  height: min(720px, 70vh);
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(16, 185, 129, 0.24), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.58) 46%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.7), transparent 45%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  color: #ffffff;
}

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #ffffff;
  background: var(--emerald);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.eyebrow {
  color: var(--emerald-deep);
  background: var(--emerald-soft);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0;
  max-width: 620px;
  color: #d1d5db;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-tags,
.hero-mini-tags,
.detail-meta,
.detail-tags,
.card-meta,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span {
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  backdrop-filter: blur(8px);
}

.hero-mini-tags {
  margin-top: 14px;
}

.hero-mini-tags span,
.detail-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-mini-tags span {
  color: #a7f3d0;
  background: rgba(6, 95, 70, 0.45);
}

.detail-tags span,
.tag-row span {
  color: var(--emerald-deep);
  background: var(--emerald-soft);
}

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

.primary-button,
.ghost-button,
.section-more,
.category-card strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 22px;
  color: #ffffff;
  background: var(--emerald);
  box-shadow: 0 16px 28px rgba(5, 150, 105, 0.32);
}

.primary-button:hover,
.section-more:hover,
.category-card:hover strong {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(5, 150, 105, 0.25);
}

.ghost-button {
  min-height: 48px;
  padding: 0 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.intro-block,
.page-hero {
  padding: 42px 0 26px;
}

.intro-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: end;
  gap: 28px;
}

.intro-block h2,
.page-hero h1,
.section-heading h2,
.detail-info h1,
.detail-content h2 {
  margin: 14px 0 10px;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.intro-block h2,
.page-hero h1 {
  font-size: clamp(34px, 4vw, 52px);
}

.intro-block p,
.page-hero p,
.section-heading p,
.detail-content p {
  color: var(--muted);
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px var(--emerald-soft);
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-bottom: 32px;
}

.category-chip {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-chip:hover {
  transform: translateY(-3px);
  border-color: rgba(5, 150, 105, 0.3);
  box-shadow: var(--shadow);
}

.category-chip strong {
  color: var(--ink);
  font-size: 18px;
}

.category-chip span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.content-section {
  padding: 36px 0;
}

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

.section-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 36px);
}

.section-heading p {
  margin: 0;
}

.section-more,
.category-card strong {
  min-height: 40px;
  padding: 0 16px;
  color: var(--emerald-deep);
  background: var(--emerald-soft);
}

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

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

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

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

.movie-card a:hover {
  transform: translateY(-6px);
  border-color: rgba(5, 150, 105, 0.3);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
}

.movie-card figure {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e2e8f0;
}

.movie-card figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(2, 6, 23, 0.8));
}

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

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

.movie-card figcaption,
.movie-card em,
.rank-badge {
  position: absolute;
  z-index: 2;
}

.movie-card figcaption {
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #ffffff;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.movie-card em {
  top: 12px;
  right: 12px;
  padding: 6px 9px;
  color: #ffffff;
  background: var(--emerald);
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(5, 150, 105, 0.25);
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 50%;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.3);
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

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

.ranking-page-list {
  padding-bottom: 42px;
}

.movie-card-horizontal a {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: stretch;
}

.movie-card-horizontal figure {
  aspect-ratio: 16 / 10;
  height: 100%;
}

.movie-card-horizontal .card-body {
  display: grid;
  align-content: center;
  padding: 16px 18px;
}

.card-meta {
  margin-top: 12px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.card-meta span + span::before {
  content: "·";
  margin-right: 9px;
  color: #cbd5e1;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  padding: 56px 0 34px;
}

.compact-hero,
.category-hero {
  border-bottom: 1px solid var(--line);
}

.category-hero .filter-panel,
.compact-hero .filter-panel {
  margin-top: 24px;
  width: min(680px, 100%);
}

.category-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 34px 0 58px;
}

.category-card a {
  position: relative;
  display: grid;
  min-height: 250px;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

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

.category-card div {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 10px;
  padding: 26px;
  color: #ffffff;
  background: linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.8) 100%);
}

.category-card span {
  color: #a7f3d0;
  font-weight: 800;
  font-size: 13px;
}

.category-card h2 {
  margin: 0;
  font-size: 30px;
}

.category-card p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.7;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: blur(2px);
}

.detail-shade {
  background:
    radial-gradient(circle at 18% 24%, rgba(16, 185, 129, 0.24), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.64));
}

.detail-hero-inner {
  position: relative;
  padding: 32px 0 52px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  font-size: 14px;
  margin-bottom: 24px;
}

.breadcrumbs a:hover {
  color: #a7f3d0;
}

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

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.36);
}

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

.detail-info .eyebrow {
  color: #ffffff;
  background: var(--emerald);
}

.detail-info h1 {
  color: #ffffff;
  font-size: clamp(38px, 5vw, 70px);
}

.detail-one-line {
  max-width: 780px;
  color: #d1d5db;
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta {
  margin: 22px 0;
}

.detail-meta span {
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
}

.detail-info .primary-button {
  margin-top: 26px;
}

.watch-section {
  padding: 46px 0 24px;
}

.watch-panel {
  overflow: hidden;
  border: 1px solid #0f172a;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

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

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

.video-trigger {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.58));
  cursor: pointer;
}

.video-trigger span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--emerald);
  box-shadow: 0 18px 42px rgba(5, 150, 105, 0.38);
  font-size: 30px;
}

.video-trigger strong {
  font-size: 18px;
}

.video-trigger.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.stream-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
  background: #0f172a;
}

.stream-tab {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.stream-tab.is-active,
.stream-tab:hover {
  color: #ffffff;
  background: var(--emerald);
  border-color: var(--emerald);
}

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

.detail-content article {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.detail-content h2 {
  margin-top: 0;
  font-size: 26px;
}

.detail-content p {
  margin-bottom: 0;
  color: #334155;
}

.site-footer {
  margin-top: 48px;
  color: #cbd5e1;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 42px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.footer-about p,
.site-footer li,
.footer-bottom {
  color: #94a3b8;
  line-height: 1.8;
}

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

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  font-size: 14px;
}

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

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

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

  .mobile-toggle {
    display: inline-flex;
  }

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

  .hero-arrow {
    display: none;
  }

  .intro-block,
  .detail-layout,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(250px, 70vw);
  }

  .ranking-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 38px;
  }

  .hero-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .movie-card-horizontal a {
    grid-template-columns: 124px minmax(0, 1fr);
  }

  .movie-card-horizontal .card-body p,
  .tag-row {
    display: none;
  }

  .detail-info h1 {
    font-size: 36px;
  }

  .detail-one-line {
    font-size: 16px;
  }

  .video-trigger span {
    width: 62px;
    height: 62px;
    font-size: 24px;
  }
}
