:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --bg-elevated: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #10b981;
  --accent-2: #0d9488;
  --accent-soft: rgba(16, 185, 129, 0.16);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 34rem),
    linear-gradient(135deg, #0f172a 0%, #111827 45%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

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

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

.nav-wrap {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.22);
}

.brand-name {
  font-size: 20px;
  color: white;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--soft);
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.25s ease;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  color: white;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: white;
  border-radius: 4px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
}

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

.mobile-panel-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 0 20px;
}

.mobile-panel a,
.mobile-category {
  color: var(--soft);
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.6);
}

.hero-carousel {
  position: relative;
  height: 680px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 700px;
  padding-top: 30px;
}

.eyebrow,
.section-title p,
.page-hero > p,
.spotlight-panel span {
  color: #6ee7b7;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 12px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy p {
  margin: 0 0 22px;
  color: var(--soft);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.7;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  color: #d1fae5;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 800;
  transition: 0.25s ease;
}

.primary-btn,
.hero-search button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 16px 35px rgba(16, 185, 129, 0.2);
}

.ghost-btn {
  color: white;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
}

.primary-btn:hover,
.ghost-btn:hover,
.hero-search button:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 120px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 4;
}

.hero-prev,
.hero-next {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  color: white;
  font-size: 26px;
  cursor: pointer;
}

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

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

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

.hero-search,
.page-search {
  position: relative;
  z-index: 6;
  display: flex;
  gap: 10px;
  align-items: center;
  width: min(680px, calc(100% - 32px));
  margin: -78px auto 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
}

.hero-search input,
.page-search input {
  width: 100%;
  min-height: 48px;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  padding: 0 16px;
}

.hero-search input::placeholder,
.page-search input::placeholder {
  color: #94a3b8;
}

.quick-categories {
  padding-top: 78px;
}

.section-block {
  padding: 70px 0;
}

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

.section-title h2,
.page-hero h1,
.spotlight-panel h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -0.04em;
}

.section-title.center {
  text-align: center;
}

.section-title.between {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-title.between a {
  color: #6ee7b7;
  font-weight: 800;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.chip-group a {
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(30, 41, 59, 0.76);
  color: white;
  border: 1px solid var(--line);
  transition: 0.25s ease;
}

.chip-group a:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

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

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

.movie-card-link {
  display: block;
}

.movie-card {
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  transition: 0.28s ease;
}

.movie-card-link:hover .movie-card {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.34);
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.75), transparent 44%);
  pointer-events: none;
}

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

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

.score-badge,
.type-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
}

.score-badge {
  right: 10px;
  bottom: 10px;
  background: rgba(16, 185, 129, 0.94);
  color: white;
}

.type-badge {
  left: 10px;
  top: 10px;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  border: 1px solid var(--line);
}

.rank-badge {
  right: 10px;
  top: 10px;
  background: rgba(251, 191, 36, 0.94);
  color: #1f2937;
}

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

.movie-card-body h3 {
  min-height: 43px;
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.45;
  color: white;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.wide-panel {
  padding: 76px 0;
  background:
    linear-gradient(90deg, rgba(6, 78, 59, 0.18), rgba(13, 148, 136, 0.09)),
    rgba(15, 23, 42, 0.5);
  border-block: 1px solid var(--line);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 34px;
  align-items: start;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 54px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  transition: 0.24s ease;
}

.rank-row:hover {
  background: rgba(30, 41, 59, 0.96);
  transform: translateX(4px);
}

.rank-num {
  color: #6ee7b7;
  font-weight: 900;
}

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

.rank-info {
  min-width: 0;
}

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

.rank-info strong {
  color: white;
}

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

.rank-row b {
  color: #6ee7b7;
}

.spotlight-panel {
  position: sticky;
  top: 96px;
  min-height: 420px;
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.25), transparent 19rem),
    linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(16, 185, 129, 0.18);
  box-shadow: var(--shadow);
}

.spotlight-panel p {
  color: var(--soft);
  line-height: 1.8;
}

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

.category-tile,
.category-card-large {
  border-radius: 20px;
  padding: 24px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.88));
  border: 1px solid var(--line);
  min-height: 170px;
  transition: 0.25s ease;
}

.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.48);
}

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

.category-tile strong,
.category-card-large h2 {
  display: block;
  margin-top: 12px;
  color: white;
  line-height: 1.7;
}

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

.page-hero {
  padding: 72px 0 30px;
}

.small-hero,
.category-hero,
.ranking-hero {
  text-align: center;
}

.intro-text {
  max-width: 780px;
  margin: 18px auto 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.page-search {
  margin: 28px auto 0;
  border-radius: 22px;
}

.category-card-large {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.category-card-large img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  z-index: 0;
}

.category-card-large::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.2));
  z-index: 1;
}

.category-card-large span,
.category-card-large h2,
.category-card-large p {
  position: relative;
  z-index: 2;
}

.category-card-large p {
  color: var(--soft);
  line-height: 1.7;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  padding-top: 26px;
}

.breadcrumbs a {
  color: #6ee7b7;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 30px;
  padding-top: 24px;
}

.player-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: black;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.22);
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
}

.player-poster {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #020617;
  z-index: 3;
}

.player-poster.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
}

.player-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.player-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.18), rgba(2, 6, 23, 0.45));
}

.player-button {
  position: absolute;
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-size: 34px;
  box-shadow: 0 18px 50px rgba(16, 185, 129, 0.35);
  z-index: 4;
  padding-left: 5px;
}

.movie-detail-card,
.side-info {
  margin-top: 22px;
  border-radius: 22px;
  padding: 26px;
  background: rgba(30, 41, 59, 0.76);
  border: 1px solid var(--line);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
}

.movie-detail-card h1 {
  margin: 18px 0 14px;
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: -0.04em;
}

.movie-detail-card h2,
.side-info h2 {
  margin: 28px 0 12px;
  color: white;
}

.movie-detail-card p,
.lead-text {
  color: var(--soft);
  line-height: 1.9;
  font-size: 16px;
}

.lead-text {
  font-size: 18px;
}

.detail-side {
  position: sticky;
  top: 96px;
  align-self: start;
}

.side-poster {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #0f172a;
}

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

.side-info dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.side-info dt {
  color: #6ee7b7;
  font-weight: 800;
}

.side-info dd {
  margin: -8px 0 6px;
  color: var(--soft);
  line-height: 1.6;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.96);
  margin-top: 50px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.8fr 0.8fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-brand p,
.site-footer li,
.site-footer a {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: white;
}

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

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

.footer-bottom {
  text-align: center;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 18px;
}

@media (max-width: 1080px) {
  .movie-grid,
  .all-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .two-column,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .nav-toggle {
    display: block;
  }

  .brand-name {
    font-size: 17px;
  }

  .hero-carousel {
    height: 620px;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 110px;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.86) 52%, rgba(2, 6, 23, 0.32) 100%);
  }

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 92px;
  }

  .hero-search {
    margin-top: -62px;
    border-radius: 18px;
  }

  .hero-search button {
    padding: 12px 16px;
  }

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

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

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

  .rank-row {
    grid-template-columns: 34px 46px 1fr auto;
    gap: 10px;
  }

  .rank-row img {
    width: 46px;
    height: 64px;
  }

  .movie-detail-card,
  .side-info {
    padding: 20px;
  }

  .player-button {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}

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

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

  .hero-copy h1 {
    font-size: 40px;
  }

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

  .movie-card-body h3 {
    font-size: 14px;
  }

  .tag-row span,
  .detail-tags span,
  .hero-tags span {
    font-size: 12px;
  }
}
