* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: rgba(226, 232, 240, 0.72);
  --soft: rgba(148, 163, 184, 0.22);
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --orange: #fb923c;
  --pink: #f472b6;
  --radius: 22px;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.13), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(244, 114, 182, 0.1), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
}

body::-webkit-scrollbar {
  width: 10px;
}

body::-webkit-scrollbar-track {
  background: #0f172a;
}

body::-webkit-scrollbar-thumb {
  background: var(--cyan-dark);
  border-radius: 999px;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(21, 94, 117, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
  color: white;
  box-shadow: 0 12px 30px rgba(8, 145, 178, 0.42);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

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

.brand-copy small {
  margin-top: 4px;
  color: #a5f3fc;
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #a5f3fc;
}

.header-search,
.mobile-search,
.big-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.big-search input,
.search-page-form input {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, width 0.25s ease;
}

.header-search input {
  width: 210px;
  padding: 10px 13px;
}

.header-search input:focus {
  width: 270px;
  border-color: var(--cyan);
  background: rgba(255, 255, 255, 0.14);
}

.header-search button,
.mobile-search button,
.big-search button,
.search-page-form button {
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
  box-shadow: 0 12px 26px rgba(8, 145, 178, 0.28);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

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

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.mobile-search input {
  flex: 1;
  padding: 11px 13px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  filter: saturate(1.1) brightness(0.56);
}

.hero-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.76) 48%, rgba(2, 6, 23, 0.38) 100%),
    linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 56px;
  padding: 74px 0 96px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-line {
  max-width: 720px;
  margin: 20px 0 0;
  color: rgba(226, 232, 240, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.eyebrow {
  margin: 0 0 12px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.hero-tags,
.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.14);
  color: #cffafe;
  font-size: 12px;
  font-weight: 800;
}

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

.btn,
.side-links a,
.detail-nav a,
.pager a,
.pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 12px 18px;
  font-weight: 900;
}

.btn.primary {
  color: #04111f;
  background: linear-gradient(135deg, #67e8f9, #22d3ee);
  box-shadow: 0 20px 44px rgba(34, 211, 238, 0.28);
}

.btn.ghost,
.side-links a,
.detail-nav a,
.pager a,
.pager span {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(12px);
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-dots {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: background 0.2s ease, width 0.2s ease;
}

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

.hero-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 30px;
  pointer-events: auto;
}

.feature-strip {
  margin-top: -42px;
  position: relative;
  z-index: 4;
}

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

.feature-card {
  min-height: 132px;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.feature-card strong {
  font-size: 24px;
}

.feature-card span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.76);
}

.feature-card.cyan {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.24), rgba(15, 23, 42, 0.92));
}

.feature-card.orange {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.25), rgba(15, 23, 42, 0.92));
}

.feature-card.pink {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.22), rgba(15, 23, 42, 0.92));
}

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

.soft-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(8, 47, 73, 0.16));
}

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

.section-head h2,
.search-panel h2,
.prose-card h2,
.side-card h2,
.ranking-card h2,
.category-overview-card h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-link {
  color: #67e8f9;
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(103, 232, 249, 0.46);
  background: rgba(15, 23, 42, 0.94);
}

.poster-shell {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.22), transparent 42%),
    linear-gradient(135deg, #0f172a, #082f49);
}

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

.poster-shell img.image-fallback {
  opacity: 0;
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(8, 145, 178, 0.92);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  min-height: 48px;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 900;
}

.card-meta {
  margin: 8px 0 0;
  color: #67e8f9;
  font-size: 12px;
  line-height: 1.5;
}

.card-desc {
  display: -webkit-box;
  min-height: 66px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.category-tile,
.category-overview-card,
.prose-card,
.side-card,
.ranking-card,
.search-panel,
.player-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.category-tile {
  overflow: hidden;
  padding: 16px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 16px;
}

.category-thumbs img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #082f49;
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-tile p,
.category-overview-card p,
.prose-card p,
.side-card dd,
.search-panel p {
  color: var(--muted);
  line-height: 1.8;
}

.rank-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(103, 232, 249, 0.42);
}

.rank-no {
  color: #67e8f9;
  font-size: 18px;
  font-weight: 1000;
}

.rank-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.search-panel {
  padding: 32px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.2), transparent 18rem),
    rgba(15, 23, 42, 0.78);
}

.big-search,
.search-page-form {
  margin-top: 24px;
}

.big-search input,
.search-page-form input {
  flex: 1;
  min-height: 52px;
  padding: 14px 16px;
}

.big-search button,
.search-page-form button {
  min-height: 52px;
  padding: 14px 20px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 72px;
  background:
    radial-gradient(circle at 25% 15%, rgba(34, 211, 238, 0.2), transparent 26rem),
    linear-gradient(135deg, rgba(8, 47, 73, 0.54), rgba(15, 23, 42, 0.82));
}

.page-hero.compact h1 {
  max-width: 780px;
}

.stacked-list {
  display: grid;
  gap: 34px;
}

.category-overview-card {
  padding: 26px;
}

.category-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 38px;
}

.pager a.is-current {
  color: #04111f;
  background: #67e8f9;
}

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

.ranking-card {
  padding: 24px;
}

.ranking-card .rank-row {
  grid-template-columns: 42px minmax(0, 1fr);
}

.ranking-card .rank-meta {
  display: none;
}

.search-status {
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 580px;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
  padding: 78px 0;
}

.detail-poster {
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  max-width: 860px;
}

.player-section {
  padding-top: 42px;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.32), rgba(2, 6, 23, 0.78));
  transition: opacity 0.24s ease, visibility 0.24s ease;
  cursor: pointer;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 50%;
  color: #04111f;
  background: linear-gradient(135deg, #67e8f9, #22d3ee);
  box-shadow: 0 20px 54px rgba(34, 211, 238, 0.35);
  font-size: 30px;
}

.player-overlay strong {
  font-size: clamp(24px, 4vw, 42px);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.prose-card,
.side-card {
  padding: 28px;
}

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

.prose-card p + h2 {
  margin-top: 28px;
}

.side-card dl {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
}

.side-card dt {
  color: #67e8f9;
  font-weight: 900;
}

.side-card dd {
  margin: -8px 0 0;
}

.detail-nav {
  justify-content: space-between;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  font-size: 24px;
  font-weight: 1000;
}

.site-footer p,
.footer-bottom {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #67e8f9;
}

.footer-links {
  display: grid;
  gap: 9px;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

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

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

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

  .hero-poster,
  .detail-poster {
    max-width: 330px;
  }

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

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero-slider,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    padding-top: 48px;
    gap: 28px;
  }

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

  .feature-grid,
  .movie-grid,
  .category-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }

  .big-search,
  .search-page-form {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-hero-inner {
    padding: 48px 0;
  }
}
