:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.78);
  --panel-light: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --brand: #10b981;
  --brand-2: #22d3ee;
  --gold: #facc15;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(16, 185, 129, 0.12), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.10), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #111827 45%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.90);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 72px;
}

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

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #022c22;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.32);
}

.brand-text,
.footer-brand {
  font-size: 24px;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

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

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

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.36);
}

.top-search input,
.filter-panel input,
.filter-panel select {
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.top-search input {
  width: 150px;
  padding: 8px 4px 8px 12px;
}

.top-search button,
.primary-btn,
.ghost-btn,
.text-link,
.row-actions button,
.hero-nav button,
.menu-toggle {
  border: 0;
  cursor: pointer;
}

.top-search button,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04111f;
  font-weight: 800;
  box-shadow: 0 14px 36px rgba(16, 185, 129, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:hover,
.top-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.24);
}

.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(52, 211, 153, 0.32);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.48);
  color: #a7f3d0;
  font-weight: 750;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-btn:hover,
.text-link:hover {
  transform: translateY(-2px);
  background: rgba(16, 185, 129, 0.12);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.86);
  color: var(--text);
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px 16px;
}

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

.hero-carousel {
  position: relative;
  height: min(780px, 82vh);
  min-height: 580px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 1.4s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding-top: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 14px;
  border: 1px solid rgba(52, 211, 153, 0.34);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-summary h1 {
  margin: 20px 0 16px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.07em;
}

.hero-content p,
.page-hero p,
.detail-summary p {
  max-width: 720px;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

.hero-meta span,
.hero-tags span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(15, 23, 42, 0.70);
  color: #d1fae5;
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 13px;
  font-weight: 700;
}

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

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

.hero-nav button,
.row-actions button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.76);
  color: var(--text);
  font-size: 22px;
  border: 1px solid var(--line);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-nav button:hover,
.row-actions button:hover {
  transform: translateY(-2px);
  background: rgba(16, 185, 129, 0.22);
}

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

.hero-dot {
  width: 10px !important;
  height: 10px !important;
  min-height: auto !important;
  padding: 0 !important;
  border-radius: 999px !important;
  background: rgba(148, 163, 184, 0.62) !important;
}

.hero-dot.is-active {
  width: 34px !important;
  background: #34d399 !important;
}

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

.section-muted {
  background: rgba(15, 23, 42, 0.48);
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.section-head {
  margin-bottom: 28px;
}

.section-head.with-actions {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-head.centered {
  max-width: 760px;
  text-align: center;
}

.section-head h2,
.detail-article h2,
.site-footer h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p,
.detail-article p,
.site-footer p,
.category-tile p,
.category-overview-card p,
.movie-card p,
.spotlight p {
  color: var(--muted);
  line-height: 1.75;
}

.row-actions {
  display: flex;
  gap: 10px;
}

.movie-row {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 8px 4px 22px;
  scrollbar-width: none;
}

.movie-row::-webkit-scrollbar {
  display: none;
}

.movie-row .movie-card {
  flex: 0 0 310px;
}

.movie-grid,
.category-grid,
.category-overview-grid,
.rank-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.90), rgba(15, 23, 42, 0.95));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(52, 211, 153, 0.36);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.5s ease, opacity 0.3s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.00), rgba(2, 6, 23, 0.72));
}

.card-category,
.rank-badge,
.card-play {
  position: absolute;
  z-index: 2;
}

.card-category {
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(2, 6, 23, 0.72);
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.rank-badge {
  top: 12px;
  right: 12px;
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  color: #1f1300;
  font-weight: 900;
}

.card-play {
  left: 50%;
  top: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  color: #ecfeff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

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

.card-meta {
  justify-content: space-between;
  color: #a7f3d0;
  font-size: 13px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 20px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #34d399;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

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

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

.category-tile,
.category-overview-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius);
  padding: 22px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(2, 6, 23, 0.84));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.34);
}

.category-tile span,
.category-overview-card span {
  color: #6ee7b7;
  font-weight: 850;
}

.category-tile h2,
.category-overview-card h2 {
  margin: 12px 0 8px;
  font-size: 24px;
}

.tile-images,
.overview-posters {
  display: flex;
  min-height: 96px;
  align-items: center;
  margin-bottom: 18px;
}

.tile-images img,
.overview-posters img {
  width: 86px;
  height: 112px;
  object-fit: cover;
  border: 3px solid rgba(15, 23, 42, 0.88);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
}

.tile-images img:not(:first-child),
.overview-posters img:not(:first-child) {
  margin-left: -30px;
}

.spotlight {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 44px;
  align-items: center;
}

.spotlight-media {
  position: relative;
}

.spotlight-media::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -28px;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  filter: blur(28px);
}

.spotlight-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.spotlight-text h2 {
  margin: 18px 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

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

.rank-item {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-item > span {
  color: #facc15;
  font-size: 28px;
  font-weight: 900;
}

.rank-item a {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  min-width: 0;
  align-items: center;
}

.rank-item img {
  width: 74px;
  height: 74px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-item strong,
.rank-item em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item em {
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 72px;
  background:
    radial-gradient(circle at 24% 24%, rgba(16, 185, 129, 0.18), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.92));
  border-bottom: 1px solid var(--line);
}

.page-hero-inner {
  max-width: 820px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-top: 34px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.filter-panel input,
.filter-panel select {
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  padding: 0 14px;
  background: rgba(2, 6, 23, 0.40);
}

.filter-panel select option {
  background: #0f172a;
}

.empty-state {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  color: var(--muted);
  text-align: center;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 28px 0 18px;
  color: var(--muted);
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 32px;
  align-items: stretch;
  padding-bottom: 54px;
}

.player-box {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  border: 1px solid rgba(52, 211, 153, 0.20);
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-player {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 390px;
  background: #000;
  object-fit: contain;
}

.player-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.16), rgba(2, 6, 23, 0.30));
  color: #ecfeff;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-layer span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04111f;
  font-size: 34px;
  box-shadow: 0 20px 54px rgba(16, 185, 129, 0.38);
}

.player-box.is-playing .player-layer {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.detail-summary {
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 30px;
  padding: 30px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.detail-summary h1 {
  font-size: clamp(34px, 5vw, 58px);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
  padding-bottom: 72px;
}

.detail-article,
.detail-aside {
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
}

.detail-article {
  padding: 32px;
}

.detail-article h2:not(:first-child) {
  margin-top: 36px;
}

.detail-aside {
  overflow: hidden;
}

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

.detail-aside dl {
  margin: 0;
  padding: 22px;
}

.detail-aside div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.detail-aside div:last-child {
  border-bottom: 0;
}

.detail-aside dt {
  color: var(--muted);
}

.detail-aside dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.site-footer {
  padding: 56px 0 28px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.88);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr 1fr;
  gap: 34px;
}

.site-footer h2 {
  font-size: 18px;
  letter-spacing: 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-tags {
  flex-flow: row wrap;
}

.footer-links a {
  color: var(--muted-strong);
}

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

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

[data-card].is-hidden {
  display: none;
}

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

  .top-search {
    margin-left: auto;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

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

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

  .detail-aside {
    max-width: 420px;
  }
}

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

  .nav-shell {
    min-height: 66px;
    gap: 12px;
  }

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

  .top-search {
    display: none;
  }

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

  .hero-content h1,
  .page-hero h1,
  .detail-summary h1 {
    font-size: 42px;
  }

  .hero-nav {
    bottom: 20px;
  }

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

  .movie-row .movie-card {
    flex-basis: 82vw;
  }

  .movie-grid,
  .ranking-grid,
  .category-grid,
  .category-overview-grid,
  .rank-grid,
  .related-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .player-box,
  .movie-player {
    min-height: 240px;
  }

  .detail-summary,
  .detail-article {
    padding: 22px;
  }

  .rank-item a {
    grid-template-columns: 64px 1fr;
  }
}
