:root {
  color-scheme: dark;
  --site-bg: #020617;
  --panel-bg: rgba(15, 23, 42, 0.82);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.22);
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --brand: #3b82f6;
  --brand-strong: #2563eb;
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow-hero: 0 28px 80px rgba(15, 23, 42, 0.5);
  --shadow-card: 0 18px 38px rgba(2, 6, 23, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.25), transparent 28rem),
    radial-gradient(circle at 82% 4%, rgba(147, 51, 234, 0.20), transparent 24rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #111827 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #7c3aed 58%, #f59e0b);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.38);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 15px;
}

.main-nav a,
.mobile-panel a {
  border-radius: 999px;
  padding: 9px 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.18);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.75);
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.92);
}

.mobile-panel.open {
  display: grid;
  gap: 8px;
}

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

.hero-slider {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: scale(1.01);
  transition: opacity 0.65s ease, transform 0.65s ease;
  background-size: cover;
  background-position: center;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.78) 46%, rgba(2, 6, 23, 0.38) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.18) 48%, rgba(2, 6, 23, 0.86) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: 40px;
  align-items: center;
  padding: 92px 0 72px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(96, 165, 250, 0.36);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.16);
  font-size: 14px;
  font-weight: 700;
}

.hero-title {
  margin: 20px 0 18px;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.07em;
  font-weight: 900;
}

.hero-copy {
  max-width: 720px;
  color: var(--text-soft);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.20);
}

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

.btn-primary,
.btn-ghost,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.36);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-soft {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.24);
}

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

.hero-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow-hero);
  backdrop-filter: blur(18px);
}

.hero-poster {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.40), rgba(245, 158, 11, 0.18));
}

.hero-poster img,
.poster-image,
.related-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card h2 {
  margin: 18px 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.hero-card p {
  color: var(--text-soft);
}

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

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

.hero-dot.active {
  background: #ffffff;
}

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

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

.section-head h2,
.page-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.section-head p,
.page-subtitle {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--text-soft);
}

.page-hero {
  padding: 64px 0 32px;
}

.page-panel {
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.72));
  box-shadow: var(--shadow-card);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.44);
  box-shadow: 0 24px 52px rgba(2, 6, 23, 0.38);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 2.8;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 25%, rgba(96, 165, 250, 0.38), transparent 46%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.92));
}

.poster-image {
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .poster-image {
  transform: scale(1.06);
}

.quality-badge,
.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.quality-badge {
  left: 10px;
  color: #0f172a;
  background: #fbbf24;
}

.year-badge {
  right: 10px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.76);
}

.rank-badge {
  left: 10px;
  top: 44px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
}

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

.movie-card-title {
  margin: 0 0 8px;
  min-height: 2.8em;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.movie-card-desc {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.category-card {
  min-height: 188px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(124, 58, 237, 0.14)),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.48);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 23px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: var(--text-soft);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 22px 0 30px;
}

.search-input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 0 18px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.74);
  outline: none;
}

.search-input:focus {
  border-color: rgba(96, 165, 250, 0.72);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

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

.hot-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
}

.hot-index {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
}

.hot-title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.hot-meta {
  color: var(--text-muted);
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 34px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow-card);
}

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

.detail-content {
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow-card);
}

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

.detail-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.detail-one-line {
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 20px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.info-item {
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.56);
}

.info-label {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
}

.info-value {
  display: block;
  margin-top: 3px;
  font-weight: 800;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.24);
  font-size: 13px;
}

.player-section {
  margin-top: 40px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-lg);
  background: #000000;
  box-shadow: var(--shadow-hero);
  aspect-ratio: 16 / 9;
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
}

.play-trigger {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(37, 99, 235, 0.34), rgba(2, 6, 23, 0.56));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 22px 42px rgba(37, 99, 235, 0.42);
  font-size: 38px;
  padding-left: 5px;
}

.content-panel {
  margin-top: 30px;
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.74);
}

.content-panel h2 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 900;
}

.content-panel p {
  margin: 0;
  color: var(--text-soft);
  font-size: 17px;
}

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

.related-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
}

.related-poster {
  aspect-ratio: 2 / 2.8;
  overflow: hidden;
}

.related-card h3 {
  min-height: 2.8em;
  margin: 0;
  padding: 10px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  line-height: 1.4;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  color: var(--text-muted);
}

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

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

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

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

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-slider {
    min-height: 760px;
  }

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

  .hero-card {
    max-width: 520px;
  }

  .section-head,
  .search-panel {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .hot-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .nav-shell {
    min-height: 66px;
  }

  .logo {
    font-size: 18px;
  }

  .hero-slider {
    min-height: 820px;
  }

  .hero-inner {
    padding-top: 56px;
    gap: 26px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .movie-grid,
  .category-grid,
  .info-list,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .page-panel,
  .detail-content,
  .content-panel {
    padding: 22px;
  }

  .hot-item {
    grid-template-columns: 58px 1fr;
  }

  .hot-item .btn-soft {
    grid-column: 1 / -1;
  }
}
