:root {
  color-scheme: dark;
  --bg: #061633;
  --bg-deep: #030a18;
  --panel: rgba(13, 38, 89, 0.78);
  --panel-strong: rgba(15, 47, 134, 0.9);
  --line: rgba(107, 163, 255, 0.22);
  --text: #f8fbff;
  --muted: #b8c7e6;
  --soft: #7fa0d6;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --cyan: #22d3ee;
  --red: #ef4444;
  --gold: #facc15;
  --shadow: 0 24px 70px rgba(1, 10, 30, 0.45);
  --radius: 18px;
}

* {
  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", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.38), transparent 32rem),
    radial-gradient(circle at 88% 10%, rgba(34, 211, 238, 0.2), transparent 28rem),
    linear-gradient(180deg, #061633 0%, #08142b 42%, #030a18 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 70%);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

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

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

.brand-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: white;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.28);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-3deg);
}

.brand-copy strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #bfdbfe, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy small {
  color: #bfdbfe;
  font-size: 12px;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #d7e7ff;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(37, 99, 235, 0.72);
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.2);
  transform: translateY(-1px);
}

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

.header-search input,
.mobile-panel input,
.filter-input,
.search-hero input,
.filter-select {
  width: 100%;
  color: white;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 13px;
  outline: none;
  background: rgba(14, 46, 104, 0.64);
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input,
.mobile-panel input,
.filter-input,
.search-hero input {
  padding: 11px 14px;
}

.filter-select {
  padding: 11px 38px 11px 14px;
}

.header-search input:focus,
.mobile-panel input:focus,
.filter-input:focus,
.search-hero input:focus,
.filter-select:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
  background: rgba(18, 55, 124, 0.86);
}

.header-search button,
.mobile-panel button,
.search-hero button,
.btn-primary,
.btn-secondary {
  border: 0;
  color: white;
  border-radius: 13px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-panel button,
.search-hero button,
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #0891b2);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.28);
}

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

.header-search button:hover,
.mobile-panel button:hover,
.search-hero button:hover,
.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  color: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.18);
}

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

.mobile-panel.open {
  display: grid;
  gap: 10px;
}

.mobile-panel a,
.mobile-panel button {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.12);
}

.mobile-panel form {
  display: grid;
  gap: 10px;
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(3, 10, 24, 0.96) 0%, rgba(8, 27, 66, 0.88) 42%, rgba(3, 10, 24, 0.28) 100%),
    linear-gradient(180deg, rgba(3, 10, 24, 0.1), rgba(3, 10, 24, 0.9));
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 46px;
  align-items: center;
  padding: 110px 0 86px;
}

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

.hero-badge,
.section-kicker,
.breadcrumb a,
.player-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: white;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-badge {
  padding: 7px 14px;
  margin-bottom: 20px;
  background: #dc2626;
  box-shadow: 0 16px 32px rgba(220, 38, 38, 0.28);
}

.hero h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero h1 span {
  display: block;
  color: #67e8f9;
}

.hero-description {
  max-width: 620px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 32px;
  color: #d8e9ff;
}

.hero-meta span,
.detail-meta span,
.movie-meta span,
.tag-row span,
.category-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(147, 197, 253, 0.2);
  border-radius: 999px;
  background: rgba(15, 47, 134, 0.42);
}

.hero-meta span {
  padding: 8px 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
}

.btn-secondary {
  border: 1px solid rgba(147, 197, 253, 0.28);
  background: rgba(15, 47, 134, 0.58);
  box-shadow: 0 14px 36px rgba(2, 8, 23, 0.22);
}

.hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(147, 197, 253, 0.2);
  border-radius: 26px;
  background: rgba(4, 18, 44, 0.7);
  box-shadow: var(--shadow);
}

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

.hero-card-info {
  position: absolute;
  inset: auto 16px 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(3, 10, 24, 0.72);
  backdrop-filter: blur(14px);
}

.hero-card-info strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.hero-card-info small {
  color: var(--muted);
}

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

.hero-dots button {
  width: 34px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(191, 219, 254, 0.35);
}

.hero-dots button.active {
  background: #67e8f9;
}

main {
  min-height: 70vh;
}

.section {
  padding: 54px 0;
}

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

.section-kicker {
  padding: 5px 10px;
  margin-bottom: 10px;
  color: #93c5fd;
  border: 1px solid rgba(147, 197, 253, 0.25);
  background: rgba(37, 99, 235, 0.16);
}

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

.section-heading p,
.page-title p,
.detail-title p,
.search-hero p,
.category-card p,
.movie-card p,
.footer-inner p,
.article-text p {
  color: var(--muted);
  line-height: 1.78;
}

.section-heading p,
.page-title p {
  margin: 10px 0 0;
  max-width: 700px;
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  color: #bfdbfe;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 47, 134, 0.34);
  transition: transform 0.2s ease, color 0.2s ease;
}

.section-more:hover {
  color: white;
  transform: translateX(4px);
}

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

.movie-grid.compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(147, 197, 253, 0.16);
  border-radius: var(--radius);
  background: rgba(7, 24, 58, 0.74);
  box-shadow: 0 18px 44px rgba(0, 8, 24, 0.24);
  transition: transform 0.24s ease, border 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(34, 211, 238, 0.52);
  box-shadow: 0 26px 72px rgba(8, 47, 112, 0.38);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.5), rgba(34, 211, 238, 0.14));
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(3, 10, 24, 0.86));
}

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

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

.poster-type,
.poster-year,
.rank-mark {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-type {
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  color: white;
  background: rgba(37, 99, 235, 0.9);
}

.poster-year {
  right: 12px;
  top: 12px;
  padding: 5px 9px;
  color: #031225;
  background: rgba(103, 232, 249, 0.92);
}

.rank-mark {
  left: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #061633;
  background: var(--gold);
  box-shadow: 0 10px 30px rgba(250, 204, 21, 0.25);
}

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

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

.movie-card h3 a:hover {
  color: #67e8f9;
}

.movie-card p {
  min-height: 52px;
  margin: 0 0 12px;
  font-size: 14px;
}

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

.movie-meta span,
.detail-meta span,
.tag-row span,
.category-chip {
  padding: 5px 9px;
  color: #c7dcff;
  font-size: 12px;
}

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

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

.category-card {
  min-height: 190px;
  padding: 22px;
  border: 1px solid rgba(147, 197, 253, 0.17);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.2), rgba(34, 211, 238, 0.06)),
    rgba(7, 24, 58, 0.72);
  box-shadow: 0 18px 54px rgba(0, 8, 24, 0.22);
  transition: transform 0.22s ease, border 0.22s ease;
}

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

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

.category-card p {
  margin: 0 0 18px;
  font-size: 14px;
}

.category-card span {
  color: #67e8f9;
  font-weight: 800;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 54px 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(147, 197, 253, 0.16);
  border-radius: 18px;
  background: rgba(7, 24, 58, 0.72);
  transition: transform 0.2s ease, border 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(5px);
  border-color: rgba(34, 211, 238, 0.44);
}

.ranking-number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: #061633;
  font-weight: 900;
  background: linear-gradient(135deg, #facc15, #f97316);
}

.ranking-item img {
  width: 84px;
  height: 112px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

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

.page-hero,
.detail-hero,
.search-hero {
  position: relative;
  overflow: hidden;
  padding: 54px 0;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(34, 211, 238, 0.08)),
    rgba(3, 10, 24, 0.34);
}

.page-title,
.search-hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid rgba(147, 197, 253, 0.18);
  border-radius: 20px;
  background: rgba(7, 24, 58, 0.72);
}

.empty-state {
  display: none;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(147, 197, 253, 0.3);
  border-radius: 18px;
}

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

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

.breadcrumb a {
  padding: 5px 9px;
  border: 1px solid rgba(147, 197, 253, 0.18);
  background: rgba(37, 99, 235, 0.14);
}

.detail-title h1 {
  margin-bottom: 16px;
}

.detail-title p {
  margin: 0 0 18px;
  font-size: 18px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(147, 197, 253, 0.18);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

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

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.5fr);
  gap: 24px;
  align-items: start;
}

.player-panel,
.detail-panel {
  overflow: hidden;
  border: 1px solid rgba(147, 197, 253, 0.18);
  border-radius: 24px;
  background: rgba(5, 20, 48, 0.78);
  box-shadow: var(--shadow);
}

.player-panel {
  padding: 16px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #020617;
}

.video-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.62));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-overlay span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  font-size: 30px;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 20px 55px rgba(37, 99, 235, 0.42);
}

.player-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px 2px;
  color: var(--muted);
}

.player-badge {
  padding: 6px 10px;
  background: rgba(220, 38, 38, 0.9);
}

.detail-panel {
  padding: 22px;
}

.detail-panel h2,
.article-text h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-panel p,
.article-text p {
  margin: 0;
}

.article-text {
  display: grid;
  gap: 22px;
}

.search-hero form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
  max-width: 720px;
  margin-top: 24px;
}

.search-hero button,
.mobile-panel button {
  padding: 0 18px;
}

.search-results-info {
  color: var(--muted);
  margin-bottom: 18px;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(3, 10, 24, 0.8);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0;
}

.footer-inner strong {
  font-size: 20px;
}

.footer-inner p {
  max-width: 640px;
  margin: 8px 0 0;
}

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

.footer-links a {
  color: #bfdbfe;
}

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

@media (max-width: 1100px) {
  .movie-grid,
  .movie-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

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

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

  .header-inner {
    min-height: 68px;
  }

  .hero {
    min-height: 680px;
  }

  .hero-inner {
    padding-top: 84px;
  }

  .section-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

@media (max-width: 640px) {
  .brand-copy small {
    display: none;
  }

  .hero-card,
  .detail-poster {
    max-width: 100%;
  }

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

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

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-card p {
    min-height: auto;
    font-size: 13px;
  }

  .ranking-item {
    grid-template-columns: 42px 70px minmax(0, 1fr);
  }

  .ranking-item img {
    width: 70px;
    height: 96px;
  }

  .page-hero,
  .detail-hero,
  .search-hero {
    padding: 38px 0;
  }

  .section {
    padding: 38px 0;
  }
}
