:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --teal: #14b8a6;
  --cyan: #06b6d4;
  --orange: #f97316;
  --yellow: #facc15;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(20, 184, 166, 0.16), transparent 30%),
    radial-gradient(circle at 90% 8%, rgba(6, 182, 212, 0.16), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon,
.footer-brand span,
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 14px 30px rgba(20, 184, 166, 0.28);
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  transition: transform 0.24s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text {
  display: grid;
  gap: 3px;
}

.brand-text strong {
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted-strong);
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a,
.mini-links a {
  transition: color 0.18s ease, transform 0.18s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover,
.mini-links a:hover {
  color: #2dd4bf;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(30, 41, 59, 0.9);
  border-radius: 12px;
  padding: 10px 13px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-strong);
}

.mobile-nav.open {
  display: grid;
  gap: 12px;
}

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

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.68) 45%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(2, 6, 23, 0) 38%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: 78px;
}

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

.eyebrow,
.page-hero span,
.section-head span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2dd4bf;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1 {
  margin: 14px 0 18px;
  color: #fff;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy h2 + p,
.hero-copy p {
  color: var(--muted-strong);
  font-size: 19px;
  line-height: 1.8;
  max-width: 660px;
}

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

.hero-meta span,
.detail-meta span,
.score-badge {
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--muted-strong);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #fff;
  box-shadow: 0 16px 36px rgba(20, 184, 166, 0.22);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

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

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 72px;
  display: flex;
  gap: 10px;
}

.hero-controls button,
.hero-dots button {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
}

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

.hero-dots button {
  width: 26px;
  height: 5px;
  border-radius: 999px;
  padding: 0;
  opacity: 0.55;
}

.hero-dots button.active {
  width: 42px;
  background: #2dd4bf;
  opacity: 1;
}

.quick-search {
  margin-top: -32px;
  position: relative;
  z-index: 5;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
}

.search-box span {
  color: #2dd4bf;
  font-weight: 900;
}

.search-box input,
.movie-select {
  width: 100%;
  min-height: 46px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.movie-select {
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.7);
}

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

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

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.section-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 13px;
  font-weight: 900;
}

.section-head h2 {
  margin: 4px 0 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

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

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: grid;
  height: 100%;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(45, 212, 191, 0.55);
  background: rgba(15, 23, 42, 0.95);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(6, 182, 212, 0.12));
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 55%);
}

.score-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  color: #fde68a;
  font-size: 13px;
  font-weight: 900;
}

.play-badge,
.play-dot {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(20, 184, 166, 0.88);
  box-shadow: 0 12px 26px rgba(20, 184, 166, 0.28);
}

.play-badge {
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  transform: scale(0.92);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.card-link:hover .play-badge {
  opacity: 1;
  transform: scale(1);
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.meta-line {
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.meta-line span:not(:last-child)::after {
  content: "";
}

.card-body h3 {
  margin: 0;
  color: #fff;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.chip-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip-row span,
.detail-tags span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  color: #99f6e4;
  background: rgba(20, 184, 166, 0.12);
  font-size: 12px;
}

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

.movie-card-horizontal .card-link {
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 112px;
}

.horizontal-poster {
  aspect-ratio: auto;
  height: 100%;
}

.play-dot {
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.category-grid,
.category-overview-grid {
  display: grid;
  gap: 18px;
}

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

.category-tile,
.category-card-large {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

.category-tile {
  min-height: 184px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.category-tile img,
.category-card-media img,
.page-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.category-tile::before,
.category-card-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.18));
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile small {
  margin-top: 8px;
  color: var(--muted-strong);
  line-height: 1.55;
}

.category-tile:hover img,
.category-card-large:hover img {
  transform: scale(1.06);
  opacity: 0.62;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: flex;
  align-items: end;
  padding: 90px 0 70px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(6, 182, 212, 0.08));
  border-bottom: 1px solid var(--line);
}

.slim-hero {
  min-height: 300px;
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

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

.page-hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.62)),
    linear-gradient(0deg, var(--bg), rgba(2, 6, 23, 0.08));
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 220px;
}

.category-card-media {
  position: relative;
  overflow: hidden;
}

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

.category-card-body {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 22px;
}

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

.category-card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.mini-links {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 14px;
}

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

.rank-row a {
  display: grid;
  grid-template-columns: 58px 110px minmax(0, 1fr) 84px;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row a:hover {
  transform: translateX(6px);
  border-color: rgba(45, 212, 191, 0.5);
}

.rank-row strong {
  color: #2dd4bf;
  font-size: 26px;
  text-align: center;
}

.rank-row img {
  width: 110px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info {
  display: grid;
  gap: 6px;
}

.rank-info b {
  font-size: 18px;
}

.rank-info small {
  color: var(--muted);
}

.rank-row em {
  color: #fde68a;
  font-style: normal;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding-top: 30px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #2dd4bf;
}

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

.detail-primary {
  display: grid;
  gap: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.2), rgba(0, 0, 0, 0.42));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  font-size: 34px;
  box-shadow: 0 22px 52px rgba(20, 184, 166, 0.36);
}

.play-overlay b {
  font-size: 20px;
}

.player-shell.playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-card,
.side-panel {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

.detail-card {
  display: grid;
  gap: 22px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.035em;
}

.detail-card h2,
.side-panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
}

.lead-text {
  color: #99f6e4 !important;
  font-size: 17px;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.side-panel {
  padding: 20px;
}

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

.side-related {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-related img {
  width: 110px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
}

.side-related span {
  display: grid;
  gap: 6px;
}

.side-related b {
  color: #fff;
  font-size: 15px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.side-related small {
  color: var(--muted);
}

.accent-panel {
  display: grid;
  gap: 12px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(6, 182, 212, 0.08));
  border-color: rgba(20, 184, 166, 0.24);
}

.accent-panel a {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.48);
  color: var(--muted-strong);
}

.empty-state {
  display: none;
  margin-top: 22px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.empty-state.show {
  display: block;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.footer-brand span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

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

.site-footer h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 9px;
  color: var(--muted);
}

.footer-bottom {
  padding: 18px 0 28px;
  color: var(--muted);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 14px;
}

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

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

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

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

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

  .mobile-toggle {
    display: inline-flex;
  }

  .hero-carousel {
    height: 560px;
  }

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

  .hero-controls {
    right: 18px;
    bottom: 28px;
  }

  .hero-dots {
    left: 24px;
    transform: none;
  }

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

  .movie-grid,
  .hot-grid,
  .library-grid,
  .featured-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .category-card-media {
    min-height: 180px;
  }

  .rank-row a {
    grid-template-columns: 42px 86px minmax(0, 1fr);
  }

  .rank-row em {
    grid-column: 3;
  }
}

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

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel {
    height: 520px;
  }

  .hero-copy p {
    font-size: 16px;
    line-height: 1.65;
  }

  .movie-grid,
  .hot-grid,
  .library-grid,
  .featured-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal .card-link,
  .side-related {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .page-hero {
    min-height: 310px;
    padding: 70px 0 50px;
  }

  .detail-card {
    padding: 20px;
  }

  .play-overlay span {
    width: 68px;
    height: 68px;
  }
}
