:root {
  color-scheme: light;
  --page: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #ecfdf5;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --emerald: #10b981;
  --emerald-dark: #047857;
  --teal: #14b8a6;
  --blue-soft: #eff6ff;
  --radius: 24px;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(6, 78, 59, 0.98));
  color: #ffffff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand:hover {
  opacity: 0.86;
  transform: translateY(-1px);
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
  color: #ecfdf5;
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

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

.brand-text small {
  color: #cbd5e1;
  font-size: 12px;
  margin-top: 3px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  color: #e2e8f0;
}

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

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #34d399;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 2px;
}

.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  display: grid;
  gap: 12px;
}

.hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #0f172a;
  color: #ffffff;
}

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

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.05);
  filter: saturate(1.08) contrast(1.02);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 76% 42%, rgba(16, 185, 129, 0.28), transparent 32%), linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.76) 48%, rgba(15, 23, 42, 0.42));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 660px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 390px;
  gap: 56px;
  align-items: center;
  padding: 54px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border: 1px solid rgba(16, 185, 129, 0.42);
  border-radius: 999px;
  padding: 7px 14px;
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.35);
  font-size: 14px;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 22px 0 18px;
  font-size: clamp(40px, 7vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-line {
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
  max-width: 760px;
}

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

.hero-tags span,
.tag-row span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.07);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #475569;
  font-size: 13px;
}

.hero-tags span,
.large-tags span {
  color: #d1fae5;
  background: rgba(15, 23, 42, 0.42);
  border-color: rgba(255, 255, 255, 0.16);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.32);
}

.btn-ghost {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(1.5deg);
}

.hero-poster::before {
  content: "";
  display: block;
  padding-top: 142%;
}

.hero-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-control {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(14px);
}

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

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
}

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

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

.hero-dot.is-active {
  width: 32px;
  background: var(--emerald);
}

.hero-strip {
  width: min(1180px, calc(100% - 32px));
  margin: -56px auto 0;
  position: relative;
  z-index: 10;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.strip-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  align-items: center;
  gap: 24px;
}

.strip-inner h2,
.section-head h2,
.rank-panel h2,
.story-panel h2,
.detail-side h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.strip-inner p,
.section-head p,
.category-body p,
.story-panel p,
.detail-side,
.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
}

.quick-search,
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  outline: 0;
  background: #ffffff;
  color: var(--ink);
}

.quick-search input,
.filter-bar input {
  flex: 1;
}

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

.quick-search button,
.filter-bar button {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  background: var(--slate-900);
  color: #ffffff;
  cursor: pointer;
}

.category-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.category-cloud a,
.category-pill,
.text-link {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: var(--emerald-dark);
  font-weight: 700;
}

.category-cloud a {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
}

.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 68px auto;
}

.soft-panel {
  padding: 30px;
  border-radius: 30px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

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

.section-more {
  color: var(--emerald-dark);
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

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

.movie-poster::before {
  content: "";
  display: block;
  padding-top: 142%;
}

.movie-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.82));
}

.poster-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.92);
  font-size: 13px;
  font-weight: 800;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #ffffff;
  font-weight: 900;
}

.movie-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.movie-title {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  color: var(--ink);
}

.movie-title:hover {
  color: var(--emerald-dark);
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.movie-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.category-pill {
  margin-top: auto;
  font-size: 13px;
}

.movie-card-small .movie-card-body {
  padding: 13px;
}

.movie-card-small .movie-title {
  font-size: 15px;
}

.movie-card-small .movie-desc,
.movie-card-small .tag-row {
  display: none;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 28px;
}

.rank-panel {
  position: sticky;
  top: 92px;
  border-radius: 26px;
  padding: 24px;
  background: var(--slate-900);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.rank-panel h2 {
  color: #ffffff;
}

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

.movie-card-wide {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: none;
}

.movie-card-wide .movie-poster::before {
  padding-top: 140%;
}

.movie-card-wide .movie-title {
  color: #ffffff;
}

.movie-card-wide .movie-meta,
.movie-card-wide .movie-desc {
  color: #cbd5e1;
}

.movie-card-wide .tag-row {
  display: none;
}

.ranking-page-list .movie-card-wide {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.ranking-page-list .movie-card-wide .movie-title {
  color: var(--ink);
}

.ranking-page-list .movie-card-wide .movie-meta,
.ranking-page-list .movie-card-wide .movie-desc {
  color: var(--muted);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.page-hero {
  min-height: 410px;
  display: grid;
  place-items: center start;
  padding: 84px max(16px, calc((100vw - 1180px) / 2));
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.68)), var(--hero-image);
  background-position: center;
  background-size: cover;
}

.slim-hero {
  min-height: 330px;
  background: linear-gradient(135deg, #0f172a, #1e293b, #065f46);
}

.page-hero > div {
  max-width: 800px;
}

.hero-note {
  margin-top: 16px;
  font-size: 15px !important;
  color: #cbd5e1 !important;
}

.filter-bar {
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-bar select {
  min-width: 150px;
}

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

.category-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  overflow: hidden;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.category-cover {
  position: relative;
  min-height: 260px;
  background: #0f172a;
}

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

.category-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.84));
}

.category-cover span {
  position: absolute;
  z-index: 2;
  left: 18px;
  bottom: 18px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.category-body {
  padding: 24px;
}

.category-body h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-body ul {
  margin: 16px 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.category-body li a {
  color: var(--slate-700);
}

.category-body li a:hover {
  color: var(--emerald-dark);
}

.detail-hero {
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.76)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 70px 0;
}

.detail-cover {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.45);
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  color: #cbd5e1;
  font-size: 14px;
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.player-section {
  margin-top: 38px;
}

.cinema-player {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 32px 70px rgba(15, 23, 42, 0.28);
}

.cinema-player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.18), rgba(2, 6, 23, 0.72));
  color: #ffffff;
  cursor: pointer;
}

.player-play span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 20px 42px rgba(16, 185, 129, 0.36);
  font-size: 30px;
  padding-left: 4px;
}

.player-play strong {
  font-size: 20px;
}

.cinema-player.is-playing .player-play {
  opacity: 0;
  pointer-events: none;
}

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

.story-panel,
.detail-side {
  border-radius: 26px;
  padding: 28px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.story-panel p {
  font-size: 17px;
}

.detail-side {
  position: sticky;
  top: 92px;
}

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

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

.detail-side dd {
  margin: 0;
  color: var(--slate-800);
}

.empty-state {
  padding: 30px;
  border-radius: 20px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
}

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

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

.footer-grid h2,
.footer-grid h3 {
  color: #ffffff;
  margin: 0 0 14px;
}

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

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-poster {
    width: min(320px, 80vw);
  }

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

  .rank-panel,
  .detail-side {
    position: static;
  }

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

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

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

@media (max-width: 720px) {
  .hero,
  .hero-stage,
  .hero-content {
    min-height: 620px;
  }

  .hero-content {
    padding: 34px 0 92px;
    gap: 26px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-strip {
    margin-top: -28px;
  }

  .strip-inner,
  .category-card {
    grid-template-columns: 1fr;
  }

  .quick-search,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .movie-title {
    font-size: 16px;
  }

  .movie-desc {
    display: none;
  }

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

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

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

@media (max-width: 460px) {
  .brand-text strong {
    font-size: 20px;
  }

  .movie-grid,
  .compact-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-small .movie-desc {
    display: block;
  }

  .movie-card-wide {
    grid-template-columns: 92px minmax(0, 1fr);
  }
}
