:root {
  --page-bg: #0f172a;
  --page-bg-deep: #020617;
  --panel: rgba(30, 41, 59, 0.72);
  --panel-strong: #1e293b;
  --panel-soft: rgba(51, 65, 85, 0.46);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --emerald: #10b981;
  --emerald-bright: #34d399;
  --cyan: #22d3ee;
  --amber: #fbbf24;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.46);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.2), transparent 28%), linear-gradient(180deg, var(--page-bg) 0%, #111827 44%, var(--page-bg-deep) 100%);
  color: var(--text);
}

body.no-scroll {
  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: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.32);
  backdrop-filter: blur(16px);
}

.nav-shell,
.footer-grid,
.page-section,
.content-panel,
.detail-layout,
.quick-search-section,
.inner-hero,
.overview-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--emerald-bright), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.38);
}

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

.nav-links a,
.mobile-panel a {
  color: var(--muted-strong);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
  color: var(--emerald-bright);
}

.menu-button {
  display: none;
  border: 0;
  color: var(--muted-strong);
  background: rgba(51, 65, 85, 0.7);
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid var(--border);
}

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: var(--page-bg-deep);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-gradient,
.detail-shade,
.category-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.72) 42%, rgba(2, 6, 23, 0.08));
}

.hero-content {
  position: absolute;
  inset: auto 0 0;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  left: 0;
  right: 0;
  padding: 0 0 72px;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-meta span,
.detail-meta span,
.card-region,
.card-year,
.tag-row span,
.ranking-number,
.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.16);
  color: #d1fae5;
  border: 1px solid rgba(52, 211, 153, 0.22);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.hero-content h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: var(--muted-strong);
  font-size: 20px;
  line-height: 1.75;
}

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

.primary-button,
.ghost-button,
.jump-search button,
.filter-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--emerald), #059669);
  box-shadow: 0 16px 36px rgba(16, 185, 129, 0.3);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover,
.jump-search button:hover,
.filter-bar button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(16, 185, 129, 0.38);
}

.ghost-button {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-size: 38px;
  line-height: 1;
  background: rgba(2, 6, 23, 0.54);
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.76);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.3s ease, background 0.3s ease;
}

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

.quick-search-section {
  padding: 48px 0 24px;
}

.quick-search-card,
.content-panel,
.story-card,
.side-card,
.player-card,
.overview-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.82), rgba(51, 65, 85, 0.5));
  box-shadow: var(--shadow);
}

.quick-search-card {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 32px;
  padding: 34px;
}

.quick-search-card h2,
.inner-hero h1,
.category-hero-copy h1,
.detail-copy h1 {
  margin: 10px 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.quick-search-card p,
.inner-hero p,
.category-hero-copy p,
.detail-copy p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.8;
}

.jump-search,
.filter-bar {
  display: flex;
  gap: 12px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
}

.jump-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 0 14px;
}

.filter-bar select {
  max-width: 170px;
  color: var(--muted-strong);
}

.page-section,
.content-panel {
  margin-top: 58px;
}

.content-panel {
  padding: 34px;
}

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

.section-title-row h2,
.story-card h2,
.side-card h2,
.footer-grid h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.section-title-row a,
.text-link,
.side-card a {
  color: var(--emerald-bright);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 56px rgba(2, 6, 23, 0.42);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #334155;
}

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

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

.cover-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.08));
  transition: opacity 0.25s ease;
}

.movie-card:hover .cover-shade {
  opacity: 1;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(16, 185, 129, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.75);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-region,
.card-year,
.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(5, 150, 105, 0.92);
  color: white;
  font-size: 12px;
}

.card-year {
  left: auto;
  right: 10px;
  background: rgba(0, 0, 0, 0.68);
}

.rank-badge {
  top: auto;
  left: 10px;
  bottom: 10px;
  background: rgba(251, 191, 36, 0.92);
  color: #111827;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  min-height: 50px;
  margin: 0 0 10px;
  color: white;
  font-size: 18px;
  line-height: 1.4;
}

.card-body h3 a:hover {
  color: var(--emerald-bright);
}

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

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  padding: 4px 9px;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  box-shadow: 0 15px 40px rgba(2, 6, 23, 0.28);
}

.category-tile img,
.category-hero img,
.detail-hero > img,
.overview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.2));
}

.tile-copy {
  position: absolute;
  inset: auto 18px 18px;
}

.tile-copy strong,
.tile-copy em {
  display: block;
}

.tile-copy strong {
  font-size: 22px;
  margin-bottom: 8px;
}

.tile-copy em {
  color: var(--muted-strong);
  font-size: 13px;
  font-style: normal;
  line-height: 1.55;
}

.inner-hero {
  padding: 84px 0 24px;
}

.inner-hero p {
  max-width: 760px;
}

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

.overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  padding: 18px;
}

.overview-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  height: 160px;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.overview-image img {
  min-width: 0;
}

.overview-copy h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.overview-copy p {
  margin: 0 0 14px;
  color: var(--muted-strong);
  line-height: 1.7;
}

.category-hero,
.detail-hero {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background: var(--page-bg-deep);
}

.category-hero img,
.detail-hero > img {
  position: absolute;
  inset: 0;
}

.category-hero-copy,
.detail-copy {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 130px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted-strong);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--emerald-bright);
}

.category-hero-copy p,
.detail-copy p {
  max-width: 760px;
  font-size: 18px;
}

.category-hero .filter-bar {
  max-width: 760px;
  margin-top: 28px;
}

.empty-state {
  display: none;
  margin: 34px 0 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--muted-strong);
  text-align: center;
  background: var(--panel);
}

.empty-state.is-visible {
  display: block;
}

.ranking-section {
  padding-bottom: 60px;
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 54px 96px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(30, 41, 59, 0.62);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ranking-row:hover {
  transform: translateY(-2px);
  border-color: rgba(52, 211, 153, 0.34);
  background: rgba(30, 41, 59, 0.9);
}

.ranking-number {
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: white;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.ranking-row img {
  width: 96px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-info strong,
.ranking-info em {
  display: block;
}

.ranking-info strong {
  margin-bottom: 5px;
  font-size: 17px;
}

.ranking-info em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.ranking-action {
  color: var(--emerald-bright);
  font-weight: 800;
}

.list-filter {
  max-width: 520px;
  margin-bottom: 20px;
}

.detail-hero {
  min-height: 560px;
}

.detail-copy {
  padding-top: 160px;
}

.detail-meta span {
  color: white;
  background: rgba(5, 150, 105, 0.7);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  margin-top: 36px;
  margin-bottom: 60px;
}

.detail-main,
.detail-side {
  display: grid;
  align-content: start;
  gap: 24px;
}

.player-card,
.story-card,
.side-card {
  padding: 20px;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #020617;
}

.video-frame video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2), rgba(2, 6, 23, 0.22));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.player-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 6px;
  font-size: 34px;
  background: rgba(16, 185, 129, 0.92);
  box-shadow: 0 20px 60px rgba(16, 185, 129, 0.36);
  transition: transform 0.2s ease;
}

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

.story-card h2,
.side-card h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.story-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
  font-size: 17px;
}

.large-tags span {
  padding: 8px 13px;
  font-size: 14px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px 16px;
  margin: 0;
  color: var(--muted-strong);
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
}

.side-recommendations {
  display: grid;
  gap: 16px;
}

.movie-card.compact .card-body {
  padding: 14px;
}

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

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

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.75), var(--page-bg-deep));
}

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

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

.footer-about p,
.footer-grid li a,
.footer-bottom {
  color: var(--muted);
}

.footer-about p {
  max-width: 560px;
  line-height: 1.75;
}

.footer-grid h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

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

.footer-grid li a:hover {
  color: var(--emerald-bright);
}

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 34px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
  font-size: 14px;
}

.is-hidden-by-filter {
  display: none !important;
}

@media (max-width: 1080px) {
  .three-cols,
  .four-cols,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-layout,
  .quick-search-card,
  .overview-grid {
    grid-template-columns: 1fr;
  }

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

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

  .brand {
    font-size: 22px;
  }

  .nav-links {
    display: none;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-carousel {
    height: 76vh;
    min-height: 560px;
  }

  .hero-content {
    padding-bottom: 78px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-arrow {
    top: auto;
    bottom: 92px;
    width: 42px;
    height: 42px;
    font-size: 30px;
  }

  .quick-search-card,
  .content-panel,
  .player-card,
  .story-card,
  .side-card {
    padding: 18px;
  }

  .jump-search,
  .filter-bar {
    flex-direction: column;
    border-radius: var(--radius-md);
  }

  .filter-bar select {
    max-width: none;
  }

  .three-cols,
  .four-cols,
  .category-grid,
  .detail-side,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .overview-card {
    grid-template-columns: 1fr;
  }

  .ranking-row {
    grid-template-columns: 42px 72px 1fr;
  }

  .ranking-row img {
    width: 72px;
    height: 46px;
  }

  .ranking-action {
    display: none;
  }

  .category-hero-copy,
  .detail-copy {
    padding-top: 96px;
  }

  .category-hero,
  .detail-hero {
    min-height: 520px;
  }

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