
:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(30, 41, 59, 0.92);
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --orange: #fb923c;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.2);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 35vw),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.14), transparent 28vw),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(14, 116, 144, 0.92), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid rgba(103, 232, 249, 0.18);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand__icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan-strong), var(--cyan));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.38);
}

.brand__text {
  display: grid;
  line-height: 1.05;
}

.brand__text strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand__text em {
  margin-top: 4px;
  color: #67e8f9;
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  color: #dbeafe;
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #67e8f9;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
}

.header-search input,
.search-panel input,
.filter-bar input {
  width: 220px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.header-search input::placeholder,
.search-panel input::placeholder,
.filter-bar input::placeholder {
  color: #94a3b8;
}

.header-search button,
.search-panel button,
.quick-filters button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #0891b2;
  padding: 8px 14px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.search-panel button:hover,
.quick-filters button:hover {
  transform: translateY(-1px);
  background: #06b6d4;
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 1px solid rgba(103, 232, 249, 0.25);
  border-radius: 12px;
  color: #fff;
  background: rgba(15, 23, 42, 0.7);
  padding: 8px 12px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav,
.mobile-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.mobile-categories {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: #67e8f9;
  font-size: 14px;
}

.home-hero {
  position: relative;
  min-height: clamp(640px, 82vh, 860px);
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-slide__bg,
.detail-hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.82) 35%, rgba(2, 6, 23, 0.42) 100%),
    linear-gradient(0deg, #020617 0%, transparent 35%),
    var(--hero-image, var(--detail-image)) center / cover no-repeat;
  filter: saturate(1.05);
}

.hero-slide__content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.65fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: 72px 0 96px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-slide h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-slide p,
.page-hero p,
.detail-copy p {
  margin: 22px 0 0;
  color: #d1d5db;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.movie-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags,
.detail-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-tags a,
.movie-card__tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.16);
  font-size: 12px;
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
  box-shadow: 0 16px 35px rgba(6, 182, 212, 0.28);
}

.btn-soft {
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn-ghost {
  color: #67e8f9;
  border: 1px solid rgba(103, 232, 249, 0.28);
  background: rgba(2, 6, 23, 0.26);
}

.hero-poster {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.2);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.65);
  box-shadow: var(--shadow);
  transform: perspective(1200px) rotateY(-8deg) rotateX(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

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

.hero-dots button {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #22d3ee;
}

.feature-strip {
  padding: 20px 0;
  border-top: 1px solid rgba(103, 232, 249, 0.12);
  border-bottom: 1px solid rgba(103, 232, 249, 0.12);
  background: rgba(15, 23, 42, 0.58);
}

.feature-strip__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-strip a {
  display: grid;
  gap: 8px;
  padding: 24px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.18), rgba(15, 23, 42, 0.5));
}

.feature-strip strong {
  font-size: 20px;
}

.feature-strip span {
  color: var(--muted);
}

.section-block {
  padding-top: 56px;
  padding-bottom: 56px;
}

.section-block--glow {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.42), rgba(30, 41, 59, 0.46));
  border-top: 1px solid rgba(103, 232, 249, 0.1);
  border-bottom: 1px solid rgba(103, 232, 249, 0.1);
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.03em;
}

.section-head a {
  color: #67e8f9;
  font-weight: 700;
}

.movie-grid {
  display: grid;
  gap: 20px;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(103, 232, 249, 0.34);
  background: var(--panel-strong);
}

.movie-card__cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.movie-card--compact .movie-card__cover {
  aspect-ratio: 3 / 4;
}

.movie-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.movie-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent 60%);
  opacity: 0.8;
}

.movie-card__year,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.movie-card__year {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.64);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  padding: 6px 9px;
  text-align: center;
  background: linear-gradient(135deg, #f97316, #facc15);
}

.movie-card__body {
  padding: 16px;
}

.movie-card__body h2 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card__body h2 a:hover {
  color: #67e8f9;
}

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

.movie-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
  color: #cbd5e1;
  font-size: 12px;
}

.movie-card__meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
}

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

.category-tile,
.category-card {
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(103, 232, 249, 0.36);
}

.category-tile {
  padding: 18px;
}

.category-tile__thumbs,
.category-card__media {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-tile__thumbs img,
.category-card__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.category-tile h2,
.category-card h2 {
  margin: 16px 0 8px;
  font-size: 20px;
}

.category-tile p,
.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-card__body {
  padding: 18px;
}

.category-card__body span {
  display: inline-flex;
  margin-top: 14px;
  color: #67e8f9;
  font-weight: 700;
}

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

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

.compact-item {
  display: grid;
  grid-template-columns: 44px 58px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 10px;
  border: 1px solid rgba(103, 232, 249, 0.13);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.74);
}

.compact-item:hover {
  border-color: rgba(103, 232, 249, 0.34);
  background: rgba(30, 41, 59, 0.85);
}

.compact-item > span {
  grid-row: 1 / 3;
  color: #67e8f9;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.compact-item img {
  grid-row: 1 / 3;
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.compact-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 72px;
  border-bottom: 1px solid rgba(103, 232, 249, 0.12);
}

.page-hero {
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(8, 47, 73, 0.72));
}

.page-hero--category {
  padding-top: 68px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #67e8f9;
}

.filter-bar,
.search-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid rgba(103, 232, 249, 0.17);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-bar input,
.search-panel input {
  flex: 1;
  width: auto;
  min-height: 42px;
  padding: 0 10px;
}

.filter-bar a {
  color: #67e8f9;
  font-weight: 700;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 26px;
}

.detail-hero {
  min-height: 520px;
  display: grid;
  align-items: end;
}

.detail-hero__bg {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.3)),
    linear-gradient(0deg, #020617 0%, transparent 42%),
    var(--detail-image) center / cover no-repeat;
}

.detail-hero__inner {
  position: relative;
  z-index: 2;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

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

.detail-copy {
  max-width: 820px;
  padding-bottom: 12px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.detail-meta span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.46);
  font-size: 13px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.2);
  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-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.18), rgba(2, 6, 23, 0.42));
  cursor: pointer;
}

.player-card.is-ready .player-start {
  display: none;
}

.player-start span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
  box-shadow: 0 20px 55px rgba(6, 182, 212, 0.42);
  font-size: 32px;
}

.player-start strong {
  font-size: 18px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.detail-content article,
.detail-content aside {
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  padding: 28px;
}

.detail-content h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-content p {
  margin: 0 0 24px;
  color: #cbd5e1;
  line-height: 1.9;
}

.detail-content dl,
.detail-content dd {
  margin: 0;
}

.detail-content dl {
  display: grid;
  gap: 14px;
}

.detail-content dl div {
  display: grid;
  gap: 5px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.detail-content dt {
  color: #67e8f9;
  font-size: 13px;
}

.detail-content dd {
  color: #e2e8f0;
  line-height: 1.6;
}

.site-footer {
  margin-top: 20px;
  padding: 46px 0;
  border-top: 1px solid rgba(103, 232, 249, 0.14);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 30px;
}

.site-footer p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #67e8f9;
  font-size: 18px;
}

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

.footer-links a:hover {
  color: #67e8f9;
}

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

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

  .movie-grid--six,
  .movie-grid--four,
  .category-grid,
  .category-list-grid,
  .rank-grid--wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

  .hero-slide__content,
  .detail-layout,
  .detail-content,
  .footer-grid,
  .feature-strip__grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    min-height: 320px;
    transform: none;
  }

  .hero-poster img {
    min-height: 320px;
  }

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

@media (max-width: 640px) {
  .site-header__inner {
    min-height: 64px;
  }

  .brand__text strong {
    font-size: 16px;
  }

  .movie-grid--six,
  .movie-grid--four,
  .category-grid,
  .category-list-grid,
  .rank-grid,
  .rank-grid--wide {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: 720px;
  }

  .hero-slide__content {
    padding-top: 42px;
  }

  .hero-actions,
  .section-head,
  .filter-bar,
  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-item {
    grid-template-columns: 36px 54px 1fr;
  }
}
