:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111c33;
  --card: rgba(30, 41, 59, 0.74);
  --card-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(34, 211, 238, 0.38);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --blue: #3b82f6;
  --gold: #f59e0b;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 30rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 72%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

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

.nav-wrap {
  width: min(1240px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.24);
  color: white;
}

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

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

.nav-links a:hover,
.nav-links a.is-active {
  color: white;
  background: rgba(34, 211, 238, 0.12);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: white;
  background: rgba(148, 163, 184, 0.12);
}

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

.main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 620px;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.06);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.20) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.86) 0%, transparent 46%);
}

.hero-content,
.hero-slide-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-slide-content {
  position: absolute;
  inset: 0;
}

.hero-copy {
  max-width: 720px;
  padding: 84px 0 110px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.10);
  color: var(--cyan);
  font-weight: 700;
}

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

.hero p {
  max-width: 650px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

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

.hero-meta {
  margin-top: 26px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 6px 11px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.55);
  font-size: 13px;
}

.pill.cyan {
  color: #a5f3fc;
  border-color: rgba(34, 211, 238, 0.38);
  background: rgba(34, 211, 238, 0.10);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.22s ease;
}

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 30px rgba(34, 211, 238, 0.22);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(34, 211, 238, 0.30);
}

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

.btn.ghost:hover {
  border-color: var(--line-strong);
  background: rgba(34, 211, 238, 0.12);
}

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

.hero-arrow,
.hero-dot {
  color: white;
  background: rgba(2, 6, 23, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: 0.22s ease;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.hero-arrow:hover,
.hero-dot:hover,
.hero-dot.is-active {
  background: rgba(34, 211, 238, 0.55);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
}

.section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

.section.compact {
  padding-top: 34px;
}

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

.section-kicker {
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section h2,
.page-title h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-head p,
.page-title p,
.article-card p,
.detail-copy p {
  color: var(--muted);
  line-height: 1.8;
}

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

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

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

.movie-card,
.category-card,
.article-card,
.rank-row,
.watch-panel,
.detail-hero,
.search-panel {
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 22px 52px rgba(34, 211, 238, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4.2;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(8, 145, 178, 0.2));
}

.poster-link img,
.category-cover img,
.detail-poster img,
.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 0.52s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), transparent 46%);
  opacity: 0.88;
}

.card-badge,
.card-score {
  position: absolute;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  left: 10px;
  top: 10px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.82);
}

.card-score {
  right: 10px;
  bottom: 10px;
  color: #fef3c7;
  background: rgba(2, 6, 23, 0.82);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  min-height: 48px;
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.5;
}

.card-body p {
  min-height: 44px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: 20px;
}

.search-panel input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: white;
  background: rgba(15, 23, 42, 0.82);
}

.search-panel input:focus {
  border-color: var(--line-strong);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tabs button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--soft);
  background: rgba(148, 163, 184, 0.10);
  transition: 0.22s ease;
}

.filter-tabs button.is-active,
.filter-tabs button:hover {
  color: white;
  background: rgba(34, 211, 238, 0.26);
}

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 24px;
}

.category-cover {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(8, 145, 178, 0.2));
}

.category-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.90), rgba(2, 6, 23, 0.18));
}

.category-content {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 24px;
}

.category-content h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-content p {
  margin: 0;
  color: var(--soft);
  line-height: 1.7;
}

.page-title {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 10px;
}

.page-title p {
  max-width: 760px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 74px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  transition: 0.22s ease;
}

.rank-row:hover {
  border-color: var(--line-strong);
  transform: translateX(4px);
}

.rank-no {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #cffafe;
  font-weight: 900;
  background: rgba(34, 211, 238, 0.12);
}

.rank-thumb {
  width: 74px;
  height: 96px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-info p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.rank-score {
  color: #fef3c7;
  font-size: 22px;
  font-weight: 900;
}

.detail-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  padding: 24px;
  border-radius: 28px;
}

.detail-poster {
  aspect-ratio: 3 / 4.25;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(8, 145, 178, 0.2));
}

.detail-copy {
  align-self: center;
}

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

.detail-copy p {
  max-width: 800px;
  margin-top: 18px;
  font-size: 17px;
}

.watch-panel {
  overflow: hidden;
  border-radius: 26px;
}

.watch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.watch-head h2 {
  margin: 0;
  font-size: 22px;
}

.video-wrap {
  position: relative;
  background: #020617;
}

.video-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.22));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.video-wrap.is-playing .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 24px 60px rgba(34, 211, 238, 0.28);
}

.play-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.20);
  font-size: 20px;
}

.article-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
}

.article-card {
  padding: 24px;
  border-radius: 24px;
}

.article-card h2,
.article-card h3 {
  margin: 0 0 14px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud span {
  padding: 8px 11px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(34, 211, 238, 0.12);
}

.breadcrumb {
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 0;
  color: var(--muted);
}

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

.footer {
  border-top: 1px solid var(--line);
  margin-top: 70px;
  padding: 34px 0;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.30);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hidden-card {
  display: none !important;
}

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

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

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

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
  }

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

  .hero,
  .hero-content,
  .hero-slide-content,
  .hero-slide img {
    min-height: 560px;
  }

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

  .section-head,
  .footer-inner,
  .watch-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .detail-poster {
    max-width: 300px;
  }
}

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

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

  .section {
    padding: 42px 0;
  }

  .card-body {
    padding: 13px;
  }

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

  .rank-row {
    grid-template-columns: 40px 60px 1fr;
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
    font-size: 16px;
  }

  .rank-thumb {
    width: 60px;
    height: 80px;
  }
}
