:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --bg-panel: #1e293b;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --brand: #38bdf8;
  --brand-2: #2563eb;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  font-family: 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 {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.34);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: white;
  background: radial-gradient(circle at 30% 20%, #7dd3fc, #0284c7 58%, #1d4ed8);
  border-radius: 12px;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.4);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #7dd3fc, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: 12px;
}

.nav-link {
  color: #d1d5db;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
}

.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.filter-panel input,
.quick-search input {
  width: 220px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.filter-panel input:focus,
.quick-search input:focus {
  border-color: rgba(56, 189, 248, 0.76);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

.nav-search button,
.quick-search button {
  color: white;
  background: #0284c7;
  border: 0;
  border-radius: 12px;
  padding: 10px 15px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.quick-search button:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 11px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  gap: 10px;
  flex-direction: column;
}

.mobile-nav.open {
  display: flex;
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: opacity 0.75s ease, visibility 0.75s ease, transform 3.8s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.12) 44%, rgba(2, 6, 23, 0.7) 100%);
}

.hero-inner {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 76px;
}

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

.hero-eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: white;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 700px;
  margin: 18px 0 0;
  color: #d1d5db;
  font-size: 18px;
}

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

.hero-meta span,
.detail-meta span {
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 14px;
}

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

.tag-pill {
  color: #bfdbfe;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-style: normal;
}

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

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

.primary-btn {
  color: white;
  background: #0284c7;
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.32);
}

.primary-btn:hover {
  background: #0369a1;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(14, 165, 233, 0.42);
}

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

.ghost-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.5);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100% - 1240px) / 2));
  bottom: 42px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.42);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 30px;
  background: var(--brand);
}

.quick-panel,
.content-section,
.detail-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  padding: 34px 0 10px;
}

.quick-search,
.quick-links,
.filter-panel,
.detail-card,
.story-card,
.player-block,
.page-hero,
.rank-list,
.ranking-item {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.quick-search {
  border-radius: 24px;
  padding: 26px;
}

.quick-search h2,
.section-heading h2,
.story-card h2,
.site-footer h2 {
  margin: 0;
  color: white;
  font-size: 28px;
  line-height: 1.2;
}

.quick-search p,
.section-subtitle,
.page-hero p,
.site-footer p,
.story-card p,
.lead-text {
  color: var(--muted-2);
}

.quick-search form {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.quick-search input {
  width: min(100%, 440px);
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border-radius: 24px;
  padding: 18px;
}

.quick-links a {
  display: grid;
  place-items: center;
  min-height: 52px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid var(--line);
  border-radius: 16px;
  font-weight: 800;
  transition: transform 0.2s ease, border 0.2s ease, color 0.2s ease;
}

.quick-links a:hover {
  color: white;
  border-color: rgba(56, 189, 248, 0.48);
  transform: translateY(-2px);
}

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

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

.section-subtitle {
  margin: 8px 0 0;
}

.section-more {
  min-width: max-content;
  color: var(--brand);
  font-weight: 800;
}

.section-more:hover {
  color: #7dd3fc;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(56, 189, 248, 0.36);
  box-shadow: 0 20px 42px rgba(2, 6, 23, 0.42);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.poster-wrap img,
.category-card img,
.wide-thumb img,
.detail-poster img,
.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover img,
.category-card:hover img,
.ranking-item:hover img {
  transform: scale(1.08);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84) 0%, rgba(2, 6, 23, 0) 58%);
  opacity: 0.76;
}

.poster-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: white;
  font-size: 36px;
  opacity: 0;
  background: rgba(2, 6, 23, 0.22);
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
}

.card-body {
  display: block;
  padding: 12px 13px 14px;
}

.card-body strong,
.wide-info strong {
  display: block;
  color: white;
  font-size: 15px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body em,
.card-body span,
.wide-info em,
.wide-info span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: 22px;
  background: #0f172a;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.26) 66%);
}

.category-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px;
}

.category-content strong {
  display: block;
  color: white;
  font-size: 24px;
  font-weight: 900;
}

.category-content em {
  display: block;
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 14px;
  font-style: normal;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
  gap: 28px;
  align-items: start;
}

.compact-heading {
  margin-bottom: 16px;
}

.rank-list {
  display: grid;
  gap: 8px;
  border-radius: 22px;
  padding: 16px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  border-radius: 14px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.58);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(14, 165, 233, 0.12);
  transform: translateX(4px);
}

.rank-row span {
  grid-row: span 2;
  color: var(--brand);
  font-weight: 900;
}

.rank-row strong {
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.movie-card-wide,
.ranking-item {
  display: flex;
  gap: 14px;
  align-items: stretch;
  padding: 12px;
  border-radius: 18px;
}

.wide-thumb {
  width: 112px;
  min-width: 112px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.wide-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wide-info strong {
  font-size: 17px;
}

.wide-info em {
  display: -webkit-box;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 32px auto 0;
  border-radius: 28px;
  padding: clamp(34px, 7vw, 72px);
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.22), transparent 42%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.94));
}

.page-hero h1 {
  font-size: clamp(34px, 6vw, 60px);
}

.page-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
  border-radius: 22px;
  padding: 18px;
}

.filter-panel input {
  width: 100%;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: color 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: white;
  background: rgba(14, 165, 233, 0.22);
  border-color: rgba(56, 189, 248, 0.44);
}

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

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

.ranking-item {
  position: relative;
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 58px;
  color: var(--brand);
  font-size: 22px;
  font-weight: 900;
}

.detail-shell {
  padding-top: 28px;
}

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

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

.player-block {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 16 / 9;
  background: black;
  margin-bottom: 24px;
}

.movie-player,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player {
  z-index: 1;
  background: black;
}

.player-cover {
  z-index: 2;
  cursor: pointer;
}

.player-cover.hidden {
  display: none;
}

.player-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.24));
}

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 86px;
  height: 86px;
  color: white;
  background: rgba(14, 165, 233, 0.86);
  border: 0;
  border-radius: 50%;
  font-size: 38px;
  cursor: pointer;
  box-shadow: 0 0 0 14px rgba(14, 165, 233, 0.18), 0 20px 50px rgba(2, 6, 23, 0.4);
}

.detail-card {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 26px;
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 24px;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 20px;
  background: #0f172a;
}

.detail-info h1 {
  font-size: clamp(32px, 6vw, 58px);
}

.lead-text {
  max-width: 780px;
  font-size: 18px;
}

.story-card {
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 24px;
}

.story-card h2 + p {
  margin-top: 12px;
}

.story-card p + h2 {
  margin-top: 26px;
}

.story-card p {
  margin-bottom: 0;
  font-size: 17px;
}

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.prev-next a {
  display: block;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prev-next a:hover {
  color: white;
  border-color: rgba(56, 189, 248, 0.46);
}

.related-section {
  width: 100%;
}

.site-footer {
  margin-top: 70px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 1));
  border-top: 1px solid var(--line);
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding: 46px 0 34px;
}

.site-footer h2 {
  font-size: 19px;
}

.site-footer p {
  margin: 10px 0 14px;
  font-size: 14px;
}

.site-footer a {
  color: var(--brand);
  font-weight: 800;
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  color: #64748b;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

  .split-section {
    grid-template-columns: 1fr;
  }
}

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

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

  .nav-shell {
    width: min(100% - 24px, 1240px);
  }

  .hero-slider {
    min-height: 78vh;
  }

  .hero-inner {
    padding-bottom: 86px;
  }

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

  .quick-search form {
    flex-direction: column;
  }

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

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

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

  .prev-next {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand-text {
    font-size: 18px;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .hero-copy p,
  .page-hero p,
  .lead-text {
    font-size: 16px;
  }

  .hero-actions,
  .detail-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

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

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

  .category-card {
    min-height: 190px;
  }

  .movie-card-wide,
  .ranking-item {
    gap: 10px;
    padding: 10px;
  }

  .wide-thumb {
    width: 82px;
    min-width: 82px;
  }

  .ranking-number {
    display: none;
  }

  .detail-shell,
  .content-section,
  .quick-panel,
  .page-hero {
    width: min(100% - 24px, 1240px);
  }

  .detail-card,
  .story-card,
  .filter-panel {
    padding: 18px;
  }

  .big-play {
    width: 68px;
    height: 68px;
    font-size: 30px;
  }
}
