:root {
  --deep-space-950: #020617;
  --deep-space-900: #0f172a;
  --deep-space-850: #172033;
  --deep-space-800: #1e293b;
  --deep-space-700: #334155;
  --cloud-realm-500: #0ea5e9;
  --cloud-realm-400: #38bdf8;
  --cloud-realm-300: #7dd3fc;
  --cyber-blue-600: #2563eb;
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --line: rgba(14, 165, 233, 0.25);
  --card: rgba(15, 23, 42, 0.82);
  --card-strong: rgba(30, 41, 59, 0.92);
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--deep-space-950);
  color: var(--text-main);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.18), transparent 28rem),
    linear-gradient(180deg, var(--deep-space-950), #07111f 42%, var(--deep-space-950));
  color: var(--text-main);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
}

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

.logo-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cloud-realm-500), var(--cyber-blue-600));
  color: white;
  box-shadow: 0 14px 32px rgba(14, 165, 233, 0.34);
}

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

.desktop-nav a,
.mobile-links a,
.footer-links a {
  color: var(--text-soft);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a {
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}

.desktop-nav a:hover,
.mobile-links a:hover,
.footer-links a:hover {
  color: var(--cloud-realm-300);
  background: rgba(14, 165, 233, 0.1);
}

.header-search {
  display: flex;
  align-items: center;
  margin-left: auto;
  width: min(360px, 32vw);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.55);
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select,
.search-hero input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text-main);
  background: transparent;
}

.header-search input {
  padding: 11px 14px;
}

.header-search button,
.mobile-search button,
.search-hero button,
.primary-button,
.secondary-button,
.player-button {
  border: 0;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--cloud-realm-500), var(--cyber-blue-600));
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  margin-right: 5px;
  padding: 8px 13px;
  font-weight: 700;
}

.primary-button,
.secondary-button,
.player-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 800;
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
}

.header-search button:hover,
.mobile-search button:hover,
.search-hero button:hover,
.primary-button:hover,
.secondary-button:hover,
.player-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.24);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.8);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text-main);
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-search {
  display: flex;
  gap: 8px;
  width: min(1280px, calc(100% - 32px));
  margin: 16px auto 10px;
}

.mobile-search input,
.search-hero input {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  background: rgba(2, 6, 23, 0.58);
}

.mobile-search button,
.search-hero button {
  padding: 0 18px;
  font-weight: 800;
}

.mobile-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-links a {
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(2, 6, 23, 0.38);
}

main {
  width: 100%;
}

.section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
}

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

.section-eyebrow,
.detail-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--cloud-realm-300);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section h2,
.page-hero h1,
.detail-title,
.search-hero h1 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.section h2 {
  font-size: clamp(26px, 3vw, 40px);
}

.section-header p,
.page-hero p,
.search-hero p,
.detail-lead,
.footer-inner p {
  color: var(--text-soft);
  line-height: 1.75;
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
}

.hero-slider {
  position: relative;
  min-height: calc(100vh - 72px);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.78) 45%, rgba(2, 6, 23, 0.42)),
    linear-gradient(0deg, var(--deep-space-950), transparent 35%),
    var(--hero-bg);
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
  width: min(1280px, calc(100% - 32px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 70px 0 96px;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cloud-realm-300);
  background: rgba(14, 165, 233, 0.1);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 6.5vw, 86px);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero h1 span,
.gradient-text {
  color: transparent;
  background: linear-gradient(135deg, #ffffff, var(--cloud-realm-300), var(--cyber-blue-600));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-description {
  max-width: 650px;
  margin: 0 0 26px;
  color: var(--text-soft);
  font-size: clamp(16px, 1.6vw, 21px);
  line-height: 1.75;
}

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

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

.hero-tags span,
.movie-tags span,
.detail-tags span,
.category-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(14, 165, 233, 0.24);
  border-radius: 999px;
  color: var(--cloud-realm-300);
  background: rgba(14, 165, 233, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span,
.category-pill {
  padding: 7px 11px;
}

.movie-tags span {
  padding: 5px 8px;
}

.hero-poster-wrap {
  position: relative;
  justify-self: end;
  width: min(360px, 100%);
}

.hero-poster-wrap::before {
  content: "";
  position: absolute;
  inset: 32px -24px -28px 24px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.35), rgba(37, 99, 235, 0.14));
  filter: blur(18px);
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card-strong);
  box-shadow: var(--shadow);
}

.hero-side-card {
  position: absolute;
  right: -18px;
  bottom: 26px;
  width: 210px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 48px rgba(2, 6, 23, 0.35);
}

.hero-side-card strong {
  display: block;
  margin-bottom: 6px;
}

.hero-side-card span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.hero-controls {
  position: absolute;
  right: max(16px, calc((100vw - 1280px) / 2));
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-control,
.hero-dot {
  border: 1px solid var(--line);
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.76);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-control {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 22px;
}

.hero-dots {
  display: flex;
  gap: 7px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
}

.hero-dot.is-active {
  width: 28px;
  background: var(--cloud-realm-400);
}

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

.category-card,
.movie-card,
.rank-card,
.info-panel,
.player-panel,
.text-panel,
.filter-panel,
.search-result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.24);
  backdrop-filter: blur(14px);
}

.category-card {
  display: flex;
  flex-direction: column;
  min-height: 270px;
  padding: 20px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-card:hover,
.movie-card:hover,
.rank-card:hover,
.search-result-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.7);
  background: rgba(30, 41, 59, 0.9);
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  height: 86px;
  margin: -4px -4px 18px;
}

.category-preview img {
  border-radius: 12px;
}

.category-card h3,
.movie-card h3,
.rank-card h3,
.text-panel h2,
.info-panel h2 {
  margin: 0;
}

.category-card h3 {
  font-size: 20px;
}

.category-card p,
.movie-card p,
.rank-card p,
.text-panel p,
.info-panel p {
  color: var(--text-soft);
  line-height: 1.68;
}

.category-card p {
  flex: 1;
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(15, 23, 42, 0.9));
}

.movie-card-cover img {
  transition: transform 0.35s ease;
}

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

.movie-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

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

.movie-card h3 {
  margin-top: 11px;
  font-size: 17px;
  line-height: 1.3;
}

.movie-card h3 a:hover {
  color: var(--cloud-realm-300);
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 10px 0 14px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.movie-card-compact {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
}

.movie-card-compact .movie-card-cover {
  aspect-ratio: auto;
  min-height: 132px;
}

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

.movie-card-compact p {
  min-height: 42px;
  margin-bottom: 9px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 58px 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: white;
  background: linear-gradient(135deg, var(--cloud-realm-500), var(--cyber-blue-600));
  font-weight: 950;
}

.rank-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: var(--deep-space-800);
}

.rank-card p {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
}

.page-hero,
.search-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78)),
    radial-gradient(circle at 85% 20%, rgba(14, 165, 233, 0.22), transparent 28rem);
}

.page-hero-inner,
.search-hero-inner,
.detail-hero-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0 54px;
}

.page-hero h1,
.search-hero h1 {
  max-width: 860px;
  font-size: clamp(38px, 5vw, 66px);
}

.page-hero p,
.search-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  font-size: 17px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 22px;
  padding: 14px;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 13px;
  padding: 0 13px;
  background: rgba(2, 6, 23, 0.38);
}

.no-results {
  display: none;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--text-soft);
  text-align: center;
}

.no-results.is-visible {
  display: block;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card-strong);
  box-shadow: var(--shadow);
}

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

.breadcrumb a:hover {
  color: var(--cloud-realm-300);
}

.detail-title {
  font-size: clamp(36px, 5vw, 72px);
}

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

.detail-meta span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.62);
  font-size: 13px;
  font-weight: 800;
}

.detail-lead {
  max-width: 850px;
  margin: 0;
  font-size: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 24px;
}

.player-panel,
.text-panel,
.info-panel {
  padding: 22px;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
}

.video-shell video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
  cursor: pointer;
}

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

.play-overlay-inner {
  display: grid;
  place-items: center;
  gap: 13px;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cloud-realm-500), var(--cyber-blue-600));
  box-shadow: 0 18px 42px rgba(14, 165, 233, 0.34);
  font-size: 26px;
}

.play-status {
  min-height: 24px;
  margin-top: 12px;
  color: var(--text-muted);
}

.text-panel {
  margin-top: 24px;
}

.text-panel h2,
.info-panel h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.text-panel p {
  margin: 0 0 18px;
  font-size: 16px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(14, 165, 233, 0.14);
}

.info-list dt {
  color: var(--text-muted);
}

.info-list dd {
  margin: 0;
  color: var(--text-main);
}

.search-hero form {
  display: flex;
  gap: 12px;
  max-width: 720px;
  margin-top: 24px;
}

.search-results {
  display: grid;
  gap: 14px;
}

.search-result-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.search-result-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: var(--deep-space-800);
}

.search-result-card h3 {
  margin: 3px 0 8px;
  font-size: 20px;
}

.search-result-card p {
  margin: 0 0 12px;
  color: var(--text-soft);
  line-height: 1.65;
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.footer-inner p {
  max-width: 560px;
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
}

.footer-links a {
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

  .hero-poster-wrap {
    justify-self: start;
    width: min(320px, 74vw);
  }

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

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

@media (max-width: 820px) {
  .section-header,
  .footer-inner {
    flex-direction: column;
    align-items: start;
  }

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

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

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

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

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

@media (max-width: 560px) {
  .header-inner,
  .section,
  .page-hero-inner,
  .search-hero-inner,
  .detail-hero-inner,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }

  .hero-content {
    width: min(100% - 24px, 1280px);
    min-height: auto;
    padding: 44px 0 130px;
  }

  .hero-slider,
  .hero {
    min-height: auto;
  }

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

  .hero-controls {
    left: 12px;
    right: auto;
    bottom: 24px;
  }

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

  .rank-card {
    grid-template-columns: 48px 84px minmax(0, 1fr);
  }

  .search-result-card,
  .movie-card-compact {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .hero-side-card {
    right: auto;
    left: 14px;
    bottom: -20px;
  }
}
