:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #f8fafc;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --card: rgba(30, 41, 59, 0.72);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.18), transparent 34rem),
    radial-gradient(circle at 85% 12%, rgba(37, 99, 235, 0.18), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.32);
}

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

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--cyan);
}

.mobile-toggle {
  display: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  padding: 9px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  color: #cbd5e1;
}

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

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

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

.hero-slide {
  display: none;
  min-height: 650px;
  position: relative;
  isolation: isolate;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.88) 42%, rgba(2, 6, 23, 0.34) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  display: block;
  animation: fadeIn 0.9s ease both;
}

.hero-glow {
  position: absolute;
  inset: auto -12% -26% 40%;
  height: 360px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.34), transparent 68%);
  filter: blur(8px);
  z-index: -1;
}

.hero-inner {
  min-height: 650px;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
  gap: 42px;
  padding: 76px 0 64px;
}

.hero-eyebrow,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(8, 145, 178, 0.12);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero-title {
  margin: 20px 0 10px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-title span,
.gradient-text {
  color: transparent;
  background: linear-gradient(90deg, #fff, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-movie {
  margin: 0;
  color: #e2e8f0;
  font-size: clamp(24px, 3.4vw, 42px);
  font-weight: 800;
}

.hero-desc {
  max-width: 720px;
  color: #cbd5e1;
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.68);
  padding: 5px 10px;
  font-size: 13px;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.12);
}

.btn-primary {
  color: #020617;
  border-color: transparent;
  background: linear-gradient(135deg, #67e8f9, #60a5fa);
  font-weight: 800;
}

.hero-poster-panel {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.94));
  box-shadow: var(--shadow);
  padding: 16px;
  transform: rotate(1deg);
}

.hero-poster-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  background: #0f172a;
}

.hero-panel-content {
  padding: 16px 6px 4px;
}

.hero-panel-content strong {
  display: block;
  font-size: 20px;
}

.hero-panel-content p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--cyan);
}

.page-hero,
.detail-hero {
  padding: 64px 0 34px;
}

.page-hero h1,
.detail-copy h1 {
  margin: 16px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-hero p,
.section-head p,
.detail-copy p {
  color: #cbd5e1;
}

.section {
  padding: 48px 0;
}

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

.section-head h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.cover-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.cover-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover img {
  transform: scale(1.06);
  opacity: 0.86;
}

.badge-row {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 700;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.3;
}

.card-body h3 a:hover {
  color: var(--cyan);
}

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

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

.category-card {
  display: flex;
  min-height: 170px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.76));
  padding: 20px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.45);
}

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

.category-card p {
  color: #cbd5e1;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 74px 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  padding: 10px 14px;
}

.rank-num {
  color: var(--cyan);
  font-size: 20px;
  font-weight: 900;
}

.rank-item img {
  width: 74px;
  height: 98px;
  border-radius: 14px;
  object-fit: cover;
  background: #0f172a;
}

.rank-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
}

.rank-title:hover {
  color: var(--cyan);
}

.rank-text {
  margin: 0;
  color: var(--muted);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  padding: 14px;
  margin: 24px 0 28px;
}

.search-input,
.filter-select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.68);
  padding: 13px 15px;
  outline: none;
}

.search-input:focus,
.filter-select:focus {
  border-color: rgba(34, 211, 238, 0.58);
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: minmax(270px, 0.45fr) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  padding: 14px;
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  background: #0f172a;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

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

.player-section {
  padding: 28px 0 48px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.20), rgba(2, 6, 23, 0.72)),
    rgba(2, 6, 23, 0.28);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  color: #020617;
  background: linear-gradient(135deg, #67e8f9, #60a5fa);
  font-size: 36px;
  box-shadow: 0 0 50px rgba(34, 211, 238, 0.46);
}

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

.detail-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  padding: 24px;
}

.detail-panel h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.detail-panel p {
  color: #cbd5e1;
}

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

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a:hover {
  color: var(--cyan);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(1.01);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

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

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

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

  .hero-poster-panel {
    max-width: 360px;
    transform: none;
  }

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

  .rank-item {
    grid-template-columns: 54px 58px minmax(0, 1fr);
  }

  .rank-item .btn {
    grid-column: 2 / -1;
    width: fit-content;
  }

  .rank-item img {
    width: 58px;
    height: 78px;
  }

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

@media (max-width: 620px) {
  .nav-wrap,
  .container,
  .mobile-nav {
    width: min(100% - 22px, 1200px);
  }

  .hero-carousel,
  .hero-slide,
  .hero-inner {
    min-height: 720px;
  }

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

  .card-body {
    padding: 12px;
  }

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

  .page-hero,
  .detail-hero {
    padding-top: 38px;
  }
}
