:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --amber: #f59e0b;
  --rose: #fb7185;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  color: #082f49;
  font-size: 14px;
  box-shadow: 0 14px 38px rgba(34, 211, 238, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(34, 211, 238, 0.12);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.header-search input,
.mobile-search input {
  width: 230px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  padding: 10px 12px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: #64748b;
}

.header-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.play-action,
.filter-select {
  border: 0;
  border-radius: 999px;
}

.header-search button,
.mobile-search button,
.primary-btn,
.play-action {
  cursor: pointer;
  color: #082f49;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.24);
}

.header-search button,
.mobile-search button {
  padding: 9px 16px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.9);
}

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.96);
}

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

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 8px 0;
}

.main {
  min-height: 65vh;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.85s ease;
  background-position: center;
  background-size: cover;
}

.hero-slide.active,
.hero-slide:first-child {
  opacity: 1;
  pointer-events: auto;
}

.hero-carousel.ready .hero-slide:first-child:not(.active) {
  opacity: 0;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.58) 42%, rgba(2, 6, 23, 0.16)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 42%, rgba(2, 6, 23, 0.34) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 100px 24px 86px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 360px;
  align-items: end;
  gap: 56px;
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 0 0 18px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  color: #a5f3fc;
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  color: #fff;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.movie-meta,
.breadcrumb,
.category-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.hero-meta span,
.detail-meta span,
.category-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
}

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

.primary-btn,
.ghost-btn,
.play-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.55);
}

.ghost-btn:hover {
  background: rgba(15, 23, 42, 0.9);
}

.hero-panel {
  align-self: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(15, 23, 42, 0.8));
}

.hero-panel h3 {
  margin: 18px 0 6px;
  font-size: 22px;
}

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

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

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

.section,
.page-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 68px 24px 0;
}

.page-section {
  padding-top: 44px;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--cyan);
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.48);
  background: rgba(15, 23, 42, 0.94);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.24), transparent 40%),
    linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

.rating-badge,
.play-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rating-badge {
  top: 12px;
  left: 12px;
  min-width: 44px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.94);
  color: #111827;
  font-weight: 900;
}

.play-badge {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.94);
  color: #082f49;
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.28);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-card-body p {
  min-height: 44px;
  margin: 8px 0 12px;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 28px;
  margin-bottom: 12px;
}

.movie-tags span,
.detail-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.1);
  font-size: 12px;
}

.movie-meta {
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(15, 23, 42, 0.92)),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

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

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

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 28px;
}

.rank-list,
.side-panel,
.info-panel,
.search-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

.rank-list {
  padding: 12px;
}

.list-item {
  display: grid;
  grid-template-columns: 42px 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  color: #fff;
  transition: background 0.2s ease;
}

.list-item:hover {
  background: rgba(34, 211, 238, 0.1);
}

.list-item img {
  width: 64px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.list-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-num {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #082f49;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  font-weight: 900;
}

.side-panel {
  padding: 24px;
}

.side-panel h3,
.info-panel h2,
.search-panel h2 {
  margin: 0 0 14px;
  color: #fff;
}

.side-panel p,
.info-panel p,
.search-panel p {
  color: var(--muted);
}

.page-title {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px 10px;
}

.breadcrumb {
  margin-bottom: 18px;
  font-size: 14px;
}

.breadcrumb a {
  color: #a5f3fc;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-position: center;
  background-size: cover;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.65), rgba(2, 6, 23, 0.95)),
    linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.42));
}

.detail-hero-inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 54px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  box-shadow: var(--shadow);
}

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

.detail-title h1 {
  margin-bottom: 16px;
}

.detail-title p {
  max-width: 850px;
  color: #cbd5e1;
  font-size: 18px;
}

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

.player-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.play-overlay.hidden {
  display: none;
}

.play-overlay span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #082f49;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  font-size: 34px;
  box-shadow: 0 24px 62px rgba(34, 211, 238, 0.36);
}

.content-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 38px 24px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.info-panel {
  padding: 28px;
}

.info-panel + .info-panel {
  margin-top: 22px;
}

.info-panel p {
  margin: 0;
  color: #cbd5e1;
  font-size: 16px;
}

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

.search-panel {
  max-width: 1280px;
  margin: 0 auto 28px;
  padding: 22px;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
}

.search-controls input,
.filter-select {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  padding: 13px 14px;
  border-radius: 16px;
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 36px 0 0;
}

.page-link {
  min-width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
}

.page-link.active,
.page-link:hover {
  color: #082f49;
  background: var(--cyan);
}

.empty-state {
  display: none;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}

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

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
}

.footer-grid p {
  max-width: 430px;
  color: var(--muted);
}

.footer-grid h3 {
  margin: 0 0 12px;
}

.footer-links {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
}

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

.footer-bottom {
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  color: #64748b;
  text-align: center;
}

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

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

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

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

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

  .hero-panel {
    display: none;
  }

  .hero-content {
    padding-top: 84px;
  }

  .detail-hero-inner {
    align-items: start;
  }

  .detail-poster {
    width: min(260px, 74vw);
  }

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

@media (max-width: 720px) {
  .header-inner {
    padding: 0 16px;
  }

  .brand {
    font-size: 21px;
  }

  .section,
  .page-section,
  .page-title,
  .player-section,
  .content-grid {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-head {
    display: block;
  }

  .section-more {
    display: inline-block;
    margin-top: 12px;
  }

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

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

  .movie-card-body {
    padding: 12px;
  }

  .movie-title {
    font-size: 15px;
  }

  .movie-card-body p {
    font-size: 13px;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 42px;
  }

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

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

  .list-item img {
    width: 54px;
    height: 74px;
  }
}
