:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-strong: #1e293b;
  --line: #1f2937;
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --brand: #14b8a6;
  --brand-strong: #0d9488;
  --brand-soft: rgba(20, 184, 166, 0.16);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.14), transparent 34rem), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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;
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #042f2e;
  background: linear-gradient(135deg, #5eead4, #14b8a6);
  box-shadow: 0 10px 30px rgba(20, 184, 166, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #cbd5e1;
  font-size: 15px;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search {
  width: 220px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.58);
  border-radius: 999px;
  overflow: hidden;
}

.header-search input {
  width: 100%;
  height: 38px;
  border: 0;
  outline: 0;
  color: #e2e8f0;
  background: transparent;
  padding: 0 16px;
}

.header-search button {
  height: 38px;
  border: 0;
  color: #042f2e;
  background: #2dd4bf;
  padding: 0 14px;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #cbd5e1;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  padding: 0 0 16px;
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  color: #cbd5e1;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.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;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.image-hidden {
  opacity: 0;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.12));
}

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

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  margin-bottom: 18px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 999px;
  color: #99f6e4;
  background: rgba(20, 184, 166, 0.12);
  font-size: 14px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-meta {
  color: #cbd5e1;
  font-size: 18px;
  margin-bottom: 16px;
}

.hero-desc {
  max-width: 680px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
  margin: 0 0 30px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: #14b8a6;
}

.btn-primary:hover {
  background: #0d9488;
}

.btn-ghost {
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: rgba(15, 23, 42, 0.42);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  transform: translateY(-50%);
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

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

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

.hero-dot.is-active {
  width: 64px;
  background: #14b8a6;
}

.main-section {
  padding: 56px 0;
}

.main-section.tight {
  padding-top: 32px;
}

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

.section-title {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-link {
  color: #5eead4;
  font-weight: 700;
  white-space: nowrap;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

.movie-card,
.category-tile,
.rank-row,
.info-panel {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.18);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 184, 166, 0.42);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.poster.wide {
  aspect-ratio: 21 / 9;
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.76));
  pointer-events: none;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #042f2e;
  background: #5eead4;
  font-size: 12px;
  font-weight: 800;
}

.play-chip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.92);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p {
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #94a3b8;
  font-size: 12px;
}

.card-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.95);
  padding: 5px 8px;
}

.featured-card .movie-card-body {
  min-height: 138px;
}

.category-tile {
  min-height: 150px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -70px;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.14);
}

.category-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(20, 184, 166, 0.38);
}

.category-tile h3 {
  margin: 0 0 10px;
  font-size: 21px;
}

.category-tile p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.7;
  font-size: 14px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 84px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  transform: translateX(3px);
  border-color: rgba(20, 184, 166, 0.38);
}

.rank-num {
  color: #5eead4;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

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

.rank-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
}

.rank-desc {
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-action {
  color: #5eead4;
  font-weight: 800;
}

.page-hero {
  padding: 70px 0 44px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(19, 78, 74, 0.42));
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
}

.filter-bar input,
.filter-bar select,
.search-panel input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  outline: none;
  border-radius: 12px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.72);
  padding: 0 14px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
}

.empty-state {
  display: none;
  color: #94a3b8;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
  text-align: center;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.92fr);
  gap: 28px;
  align-items: start;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumbs a {
  color: #5eead4;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.72));
  cursor: pointer;
}

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

.player-button-inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.94);
  box-shadow: 0 20px 70px rgba(20, 184, 166, 0.28);
  font-size: 18px;
  font-weight: 900;
}

.detail-title {
  margin: 24px 0 12px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  color: #cbd5e1;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.95);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.info-panel {
  padding: 22px;
  margin-bottom: 20px;
}

.info-panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.info-panel p {
  margin: 0 0 14px;
  color: #cbd5e1;
  line-height: 1.9;
}

.info-panel p:last-child {
  margin-bottom: 0;
}

.side-poster {
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, #0f172a, #134e4a);
  box-shadow: var(--shadow);
}

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

.related-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.related-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.92);
  transition: border-color 0.2s ease;
}

.related-item:hover {
  border-color: rgba(20, 184, 166, 0.38);
}

.related-item img {
  width: 74px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.related-item h3 {
  margin: 2px 0 7px;
  font-size: 14px;
  line-height: 1.45;
}

.related-item p {
  margin: 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.78);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 28px;
  padding: 32px 0;
}

.footer-brand {
  color: #e2e8f0;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: flex-end;
  color: #94a3b8;
}

.footer-links a:hover {
  color: #5eead4;
}

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

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

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

  .mobile-toggle {
    display: block;
  }

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

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

  .hero-shade {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.92));
  }

  .grid.featured-grid,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

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

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

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

  .hero-arrow {
    display: none;
  }

  .hero-dot {
    width: 28px;
  }

  .hero-dot.is-active {
    width: 42px;
  }

  .rank-row {
    grid-template-columns: 42px 70px 1fr;
  }

  .rank-action {
    display: none;
  }

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