:root {
  color-scheme: dark;
  --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;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --orange: #f97316;
  --pink: #e879f9;
  --green: #10b981;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.52);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, 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.18), transparent 32rem),
    radial-gradient(circle at 85% 15%, rgba(37, 99, 235, 0.22), transparent 28rem),
    var(--bg);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0));
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-solid,
.site-header.menu-open {
  border-color: var(--line);
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.25);
}

.brand-text {
  font-size: 1.08rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.44);
}

.nav-link {
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--soft);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: rgba(34, 211, 238, 0.14);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.menu-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.66);
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.icon-button:hover,
.menu-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.12);
}

.menu-toggle {
  display: none;
  gap: 4px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.icon-search {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.icon-search::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
}

.mobile-nav,
.mobile-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mobile-nav a,
.mobile-category {
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--soft);
  text-align: center;
}

.mobile-categories {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 10px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, visibility 0.7s ease, transform 1.1s ease;
  transform: scale(1.02);
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.62) 48%, rgba(2, 6, 23, 0.34) 100%),
    linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.22) 45%, rgba(2, 6, 23, 0.3) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 760px;
  margin: 0 auto;
  padding: 180px 0 130px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.hero-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h1 {
  width: min(760px, 100%);
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
  text-shadow: 0 22px 70px rgba(0, 0, 0, 0.5);
}

.hero-summary {
  width: min(700px, 100%);
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.inline-actions,
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin: 28px 0 34px;
}

.hero-tags span,
.tag-row span {
  padding: 7px 11px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  color: var(--soft);
  font-size: 0.86rem;
}

.primary-button,
.ghost-button,
.text-link,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 20px 38px rgba(34, 211, 238, 0.2);
}

.ghost-button {
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.54);
  color: var(--text);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.ghost-button:hover {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.12);
}

.full-button {
  width: 100%;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 44px;
  z-index: 5;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.hero-arrow {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
}

.quick-search-section,
.content-section,
.page-hero-inner,
.breadcrumb,
.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search-section {
  margin-top: -58px;
  position: relative;
  z-index: 8;
}

.quick-search-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.84));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.quick-search-card h2,
.section-head h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.quick-search-card p,
.page-hero p,
.detail-copy p,
.category-card p,
.category-tile em,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

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

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

.section-link {
  color: var(--cyan);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.6);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 24px 70px rgba(8, 145, 178, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(37, 99, 235, 0.18)),
    rgba(15, 23, 42, 0.76);
}

.movie-card.large .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.poster-shade,
.category-card-layer,
.category-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.08));
}

.play-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.92);
  color: #00111a;
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.3);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--cyan);
  font-size: 0.82rem;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: rgba(148, 163, 184, 0.6);
}

.movie-card h3,
.rank-info h3 {
  margin: 10px 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover {
  color: var(--cyan);
}

.movie-card p,
.rank-info p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.highlight-section {
  position: relative;
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background-size: cover;
  background-position: center;
  transition: transform 0.35s ease, border-color 0.25s ease;
}

.category-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
}

.category-tile strong,
.category-tile em,
.category-tile small,
.category-card div {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  font-size: 1.35rem;
}

.category-tile em {
  margin-top: 8px;
  font-style: normal;
}

.category-tile small {
  margin-top: 12px;
  color: var(--cyan);
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 60px 78px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.62);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(37, 99, 235, 0.18));
  color: var(--cyan);
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.text-link {
  color: var(--cyan);
}

.page-main {
  padding-top: 72px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 74px;
  background:
    radial-gradient(circle at 12% 20%, rgba(34, 211, 238, 0.18), transparent 28rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
}

.page-hero-inner {
  position: relative;
  z-index: 2;
}

.page-hero p {
  width: min(760px, 100%);
  font-size: 1.08rem;
}

.inline-actions {
  margin-top: 24px;
}

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

.category-card {
  min-height: 290px;
  padding: 28px;
  display: flex;
  align-items: flex-end;
}

.category-card h2 {
  margin: 0 0 12px;
  font-size: 2rem;
}

.category-card small {
  color: var(--cyan);
}

.page-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(520px, 100%);
  margin-bottom: 26px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
  color: var(--muted);
}

.page-filter input,
.search-box input {
  width: 100%;
  height: 54px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 30px 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

.detail-primary,
.detail-aside,
.detail-copy,
.player-card,
.poster-panel {
  min-width: 0;
}

.player-card,
.detail-copy,
.poster-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #000;
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.24), rgba(2, 6, 23, 0.34) 34%, rgba(2, 6, 23, 0.66));
  color: white;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-ring {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  font-size: 2.3rem;
  box-shadow: 0 24px 60px rgba(34, 211, 238, 0.34);
}

.detail-copy {
  margin-top: 24px;
  padding: 30px;
}

.detail-copy .lead-text {
  font-size: 1.13rem;
  color: #dbeafe;
}

.detail-tags {
  margin: 24px 0;
}

.detail-copy h2 {
  margin: 30px 0 12px;
  font-size: 1.45rem;
}

.poster-panel {
  position: sticky;
  top: 94px;
  padding: 18px;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.86);
}

.meta-list {
  margin: 18px 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.meta-list span {
  color: var(--muted);
}

.meta-list strong {
  text-align: right;
}

.search-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.search-layer.is-open {
  display: block;
}

.search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
}

.search-panel {
  position: absolute;
  top: 88px;
  left: 50%;
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 116px);
  overflow: auto;
  transform: translateX(-50%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
}

.search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.search-head h2 {
  margin: 0;
  font-size: 2rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.55);
  color: var(--muted);
}

.search-results {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.search-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.38);
}

.search-item img {
  width: 72px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.86);
}

.search-item h3 {
  margin: 0 0 6px;
}

.search-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
}

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

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

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

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

.footer-brand {
  margin-bottom: 16px;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

[data-card].is-hidden {
  display: none;
}

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

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

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

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

  .poster-panel {
    position: static;
  }

  .detail-aside {
    order: -1;
  }
}

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

  .menu-toggle {
    display: grid;
  }

  .site-header.menu-open .mobile-panel {
    display: block;
  }

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

  .hero-content {
    padding: 140px 0 110px;
  }

  .hero-controls {
    bottom: 28px;
  }

  .quick-search-card,
  .section-head,
  .rank-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .large-grid,
  .category-grid,
  .category-card-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    display: grid;
    grid-template-columns: 48px 68px 1fr;
  }

  .rank-row .text-link {
    grid-column: 3;
  }

  .detail-copy {
    padding: 22px;
  }

  .search-panel {
    top: 74px;
    padding: 18px;
  }
}

@media (max-width: 520px) {
  .nav-shell,
  .quick-search-section,
  .content-section,
  .page-hero-inner,
  .breadcrumb,
  .detail-layout,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .brand-text {
    font-size: 0.98rem;
  }

  .hero-content {
    width: min(100% - 22px, 1180px);
  }

  .hero-tags span,
  .tag-row span {
    font-size: 0.78rem;
  }

  .play-ring {
    width: 74px;
    height: 74px;
    font-size: 1.9rem;
  }
}
