:root {
  --deep-space-950: #020617;
  --deep-space-900: #07111f;
  --deep-space-850: #0b1728;
  --deep-space-800: #102137;
  --cloud-realm-900: #0d2848;
  --cloud-realm-700: #0e7490;
  --cloud-realm-600: #0891b2;
  --cloud-realm-500: #06b6d4;
  --cloud-realm-400: #22d3ee;
  --cyber-blue-500: #3b82f6;
  --cyber-blue-400: #60a5fa;
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --line: rgba(34, 211, 238, 0.18);
  --glass: rgba(7, 17, 31, 0.72);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 32rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 28rem),
    linear-gradient(180deg, var(--deep-space-950), var(--deep-space-900) 44%, #030712);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--cloud-realm-500), var(--cyber-blue-500));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.26);
  color: white;
  font-size: 16px;
}

.brand-text,
.footer-brand {
  font-size: 24px;
  background: linear-gradient(90deg, var(--cloud-realm-400), var(--cyber-blue-400));
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  border-radius: 12px;
  color: var(--text-soft);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cloud-realm-400);
  background: rgba(15, 23, 42, 0.88);
  transform: translateY(-1px);
}

.nav-link.sub {
  display: none;
}

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

.header-search input,
.filter-bar input,
.search-panel input,
.filter-bar select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.78);
  outline: none;
  padding: 0 14px;
}

.header-search input {
  width: 230px;
}

.header-search input:focus,
.filter-bar input:focus,
.search-panel input:focus,
.filter-bar select:focus {
  border-color: rgba(34, 211, 238, 0.68);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.10);
}

.header-search button,
.hero-actions a,
.hero-search button,
.search-panel button,
.player-button,
.section-more,
.card-actions a:first-child,
.rank-link {
  border: 0;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, var(--cloud-realm-600), var(--cyber-blue-500));
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.20);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.header-search button {
  height: 42px;
  padding: 0 16px;
}

.header-search button:hover,
.hero-actions a:hover,
.hero-search button:hover,
.search-panel button:hover,
.player-button:hover,
.section-more:hover,
.card-actions a:first-child:hover,
.rank-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 18px 44px rgba(6, 182, 212, 0.28);
}

.mobile-toggle {
  display: none;
  color: white;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 44px;
  height: 44px;
}

.mobile-nav {
  padding: 0 20px 18px;
}

.mobile-nav .nav-link {
  display: flex;
  margin-top: 6px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 44%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.10), rgba(2, 6, 23, 0.92));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 680px;
  padding: 116px 24px 86px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.65fr);
  align-items: center;
  gap: 34px;
}

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

.kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cloud-realm-400);
  background: rgba(8, 145, 178, 0.12);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 18px 0 18px;
  color: white;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero h1 span,
.gradient-text {
  background: linear-gradient(90deg, var(--cloud-realm-400), var(--cyber-blue-400));
  -webkit-background-clip: text;
  color: transparent;
}

.hero-copy p,
.page-hero p,
.detail-title p {
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.85;
  max-width: 760px;
}

.hero-actions,
.hero-tabs,
.hero-dots,
.meta-pill-row,
.tag-row,
.card-actions,
.breadcrumb,
.footer-links,
.footer-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-actions {
  margin-top: 28px;
}

.hero-actions a,
.rank-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  font-weight: 800;
}

.hero-actions a.secondary,
.card-actions a:last-child,
.section-more {
  color: var(--cloud-realm-300, #67e8f9);
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  box-shadow: none;
}

.hero-search {
  margin-top: 28px;
  display: flex;
  max-width: 620px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  color: white;
  background: transparent;
  padding: 0 18px;
  height: 58px;
  outline: none;
}

.hero-search button {
  min-width: 108px;
  border-radius: 0;
}

.hero-panel {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(7, 17, 31, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.44);
}

.hero-panel h2 {
  margin: 18px 0 8px;
  font-size: 26px;
}

.hero-panel p {
  color: var(--text-muted);
  line-height: 1.72;
}

.hero-dots {
  margin-top: 20px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.44);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

main,
.page-shell {
  width: 100%;
}

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

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

.section-heading h2,
.page-hero h1,
.detail-section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--text-muted);
  line-height: 1.8;
}

.section-more {
  padding: 11px 16px;
  white-space: nowrap;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.13);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.86));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.20);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.44);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-shine {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 22px rgba(239, 68, 68, 0.24);
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--cloud-realm-400);
  font-size: 12px;
  font-weight: 700;
}

.card-meta span,
.meta-pill-row span,
.tag-row span,
.breadcrumb a,
.breadcrumb span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.13);
}

.movie-card h3 {
  margin: 12px 0 8px;
  color: white;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 72px;
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.72;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: var(--text-soft);
  font-size: 12px;
}

.card-actions {
  margin-top: 15px;
  justify-content: space-between;
}

.card-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
}

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

.category-card,
.rank-panel,
.search-panel,
.filter-bar,
.detail-panel,
.detail-section,
.text-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(7, 17, 31, 0.72);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.category-card {
  min-height: 180px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card b {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.34), rgba(59, 130, 246, 0.22));
}

.category-card h3 {
  margin: 16px 0 8px;
  font-size: 22px;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(6, 182, 212, 0.18), transparent 36%),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.22), transparent 34rem);
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 82px 24px 68px;
}

.filter-bar {
  margin-bottom: 26px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 14px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(34, 211, 238, 0.12);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.60);
}

.rank-row img {
  width: 86px;
  height: 118px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-num {
  color: var(--cloud-realm-400);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.rank-row h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-row p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.rank-score {
  color: #fbbf24;
  font-weight: 900;
  white-space: nowrap;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 54px 0 32px;
  border-bottom: 1px solid var(--line);
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--detail-bg) center / cover no-repeat;
  opacity: 0.22;
  filter: blur(12px) saturate(1.05);
  transform: scale(1.05);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.74));
}

.detail-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.breadcrumb {
  margin-bottom: 26px;
  color: var(--text-muted);
  font-size: 14px;
}

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

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

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

.detail-title h1 {
  font-size: clamp(38px, 5vw, 64px);
}

.detail-meta {
  margin-top: 12px;
}

.detail-meta span {
  color: var(--cloud-realm-400);
}

.detail-panel {
  padding: 22px;
  margin-top: 22px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: black;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.20), rgba(2, 6, 23, 0.78));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  min-width: 124px;
  height: 52px;
  font-weight: 900;
}

.player-state {
  position: absolute;
  left: 18px;
  bottom: 16px;
  color: var(--text-soft);
  background: rgba(2, 6, 23, 0.70);
  border: 1px solid rgba(34, 211, 238, 0.16);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 13px;
}

.detail-section {
  padding: 26px;
  margin-top: 28px;
}

.detail-section p {
  color: var(--text-soft);
  line-height: 1.9;
  font-size: 16px;
}

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

.search-panel {
  padding: 24px;
  margin-top: 26px;
}

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

.search-panel button {
  border-radius: 13px;
}

.search-output {
  margin-top: 28px;
}

.empty-state {
  padding: 36px;
  text-align: center;
  color: var(--text-muted);
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.2fr;
  gap: 28px;
}

.footer-inner p,
.footer-links a,
.footer-tags a {
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-links,
.footer-tags {
  align-content: start;
}

.footer-tags a,
.footer-links a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
}

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

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

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

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

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

  .hero-panel {
    max-width: 440px;
  }

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

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

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

  .hero-content {
    padding: 74px 18px 46px;
  }

  .hero-search,
  .filter-bar,
  .search-panel form,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .hero-search {
    display: grid;
  }

  .hero-search button {
    min-height: 48px;
  }

  .section,
  .page-section,
  .page-hero-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    margin-top: 14px;
    display: inline-flex;
  }

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

  .movie-card p {
    min-height: auto;
  }

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

  .rank-row img {
    width: 100%;
    height: auto;
    max-height: 240px;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .category-grid,
  .detail-section .movie-grid {
    grid-template-columns: 1fr;
  }

  .brand-text {
    font-size: 20px;
  }
}
