:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(34, 211, 238, 0.18);
  --line-strong: rgba(34, 211, 238, 0.42);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --cyan-soft: rgba(34, 211, 238, 0.16);
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  --max: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 2%, rgba(34, 211, 238, 0.18), transparent 28rem),
    radial-gradient(circle at 78% 8%, rgba(59, 130, 246, 0.16), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 78%);
}

body::after {
  position: fixed;
  inset: auto -10% -30% -10%;
  z-index: -1;
  height: 48vh;
  content: "";
  background: radial-gradient(circle, rgba(34, 211, 238, 0.14), transparent 65%);
  filter: blur(20px);
}

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

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

button,
input {
  font: inherit;
}

.media-bg {
  background-image:
    linear-gradient(135deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.72)),
    var(--cover),
    linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.16));
  background-position: center;
  background-size: cover;
  background-color: #111827;
}

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

.nav-shell {
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(100% - 32px, var(--max));
  min-height: 72px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(34, 211, 238, 0.5);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(59, 130, 246, 0.95));
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.28);
  color: white;
  font-size: 14px;
}

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

.nav-link,
.mobile-link {
  border-radius: 12px;
  color: #cbd5e1;
  transition: 0.25s ease;
}

.nav-link {
  padding: 10px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--cyan);
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.top-search input,
.mobile-search input {
  width: 200px;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
}

.top-search button,
.mobile-search button {
  border: 0;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  font-weight: 800;
  padding: 10px 16px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
}

.mobile-panel {
  display: none;
  width: min(100% - 32px, var(--max));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.95);
}

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

.mobile-link {
  padding: 12px 14px;
}

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

.page-main {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.hero {
  position: relative;
  padding: 72px 0 44px;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.76)),
    radial-gradient(circle at 90% 20%, rgba(34, 211, 238, 0.18), transparent 18rem);
  box-shadow: var(--shadow);
}

.hero-shell::before {
  position: absolute;
  inset: -1px;
  pointer-events: none;
  content: "";
  background: linear-gradient(115deg, rgba(34, 211, 238, 0.28), transparent 32%, rgba(59, 130, 246, 0.18));
  opacity: 0.75;
}

.hero-slide {
  position: relative;
  z-index: 1;
  display: none;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.72fr);
  gap: 34px;
  min-height: 560px;
  padding: clamp(28px, 5vw, 64px);
  align-items: center;
}

.hero-slide.is-active {
  display: grid;
}

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

.kicker,
.section-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker::before,
.section-kicker::before,
.page-kicker::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
  content: "";
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.gradient-text {
  background: linear-gradient(90deg, #67e8f9, #60a5fa 54%, #e0f2fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 640px;
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags {
  margin: 26px 0 0;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  color: #a5f3fc;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}

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

.btn-primary,
.btn-ghost,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 14px;
  font-weight: 900;
  transition: 0.25s ease;
}

.btn-primary {
  padding: 0 24px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 16px 42px rgba(34, 211, 238, 0.24);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 54px rgba(34, 211, 238, 0.34);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.04);
  color: #dbeafe;
}

.btn-ghost:hover,
.btn-soft:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}

.hero-poster {
  position: relative;
  min-height: 460px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.48);
  transform: rotate(1.5deg);
  overflow: hidden;
}

.hero-poster::after {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  content: "";
  background: linear-gradient(to top, rgba(2, 6, 23, 0.92), transparent);
}

.poster-caption {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(14px);
  padding: 18px;
}

.poster-caption strong {
  display: block;
  margin-bottom: 4px;
  font-size: 20px;
}

.poster-caption span {
  color: #cbd5e1;
  font-size: 13px;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: clamp(28px, 5vw, 64px);
  bottom: 28px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan);
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--line);
}

.stat-card {
  padding: 18px;
  background: rgba(15, 23, 42, 0.86);
  text-align: center;
}

.stat-card strong {
  display: block;
  color: var(--cyan);
  font-size: 28px;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.content-section,
.page-section {
  padding: 42px 0;
}

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

.section-heading h2,
.page-heading h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-heading p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-more {
  flex: 0 0 auto;
  color: var(--cyan);
  font-weight: 900;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.movie-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.movie-cover::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to bottom, transparent 44%, rgba(2, 6, 23, 0.92));
}

.cover-badge,
.cover-type {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  color: #e0f2fe;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  backdrop-filter: blur(12px);
}

.cover-badge {
  left: 12px;
}

.cover-type {
  right: 12px;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.85);
  color: white;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: 0.25s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.movie-body h2 {
  margin: 0;
  color: white;
  font-size: 17px;
  line-height: 1.28;
}

.movie-body p {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted-2);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 80% 12%, rgba(34, 211, 238, 0.22), transparent 9rem),
    rgba(255, 255, 255, 0.045);
  padding: 24px;
  transition: 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  background:
    radial-gradient(circle at 80% 12%, rgba(34, 211, 238, 0.32), transparent 9rem),
    rgba(255, 255, 255, 0.07);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  color: white;
  font-size: 24px;
}

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

.category-card span {
  position: absolute;
  right: 22px;
  bottom: 18px;
  color: var(--cyan);
  font-weight: 900;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
  padding: 12px;
  transition: 0.25s ease;
}

.rank-item:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.075);
  transform: translateX(4px);
}

.rank-number {
  color: var(--cyan);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.rank-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
}

.rank-copy strong,
.rank-copy em {
  display: block;
}

.rank-copy strong {
  font-size: 18px;
}

.rank-copy em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rank-tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #a5f3fc;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.filter-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  padding: 12px;
}

.filter-panel input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
}

.filter-panel span {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 28px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #a5f3fc;
}

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

.player-panel,
.detail-panel,
.text-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
}

.player-panel {
  overflow: hidden;
}

.video-frame {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.92), rgba(59, 130, 246, 0.92));
  color: white;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 18px 60px rgba(34, 211, 238, 0.3);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: 0.25s ease;
}

.player-start:hover {
  transform: translate(-50%, -50%) scale(1.04);
}

.player-start.hidden {
  display: none;
}

.player-info {
  padding: 22px;
}

.player-info h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.player-info p {
  margin: 14px 0 0;
  color: #cbd5e1;
}

.detail-panel {
  overflow: hidden;
}

.detail-cover {
  aspect-ratio: 3 / 4;
}

.detail-meta {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.detail-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.detail-meta div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

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

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

.text-panel {
  padding: 24px;
  margin-bottom: 24px;
}

.text-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: #cbd5e1;
}

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

.search-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  padding: 14px;
  transition: 0.25s ease;
}

.search-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.search-cover {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
}

.search-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.search-card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.site-footer {
  margin-top: 50px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(2, 6, 23, 0.98));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 44px 0 24px;
}

.footer-grid h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.footer-grid p,
.footer-bottom {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0 28px;
  font-size: 14px;
}

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

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

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

  .hero-poster {
    min-height: 380px;
    transform: none;
  }

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

@media (max-width: 760px) {
  .page-main {
    width: min(100% - 24px, var(--max));
  }

  .hero {
    padding-top: 30px;
  }

  .hero-slide {
    min-height: auto;
    padding: 26px;
  }

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

  .hero-poster {
    min-height: 310px;
  }

  .hero-dots {
    position: static;
    padding: 0 26px 26px;
  }

  .stats-bar {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .page-heading {
    display: block;
  }

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

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

  .rank-item {
    grid-template-columns: 44px 72px minmax(0, 1fr);
  }

  .rank-tag {
    display: none;
  }

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

  .footer-bottom {
    flex-direction: column;
  }

  .search-card {
    grid-template-columns: 1fr;
  }
}

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

  .brand {
    font-size: 19px;
  }

  .player-start {
    width: 82px;
    height: 82px;
    font-size: 15px;
  }
}
