:root {
  --bg: #f8fafc;
  --ink: #172033;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.24);
  --cyan: #06b6d4;
  --blue: #2563eb;
  --teal: #14b8a6;
  --purple: #7c3aed;
  --rose: #e11d48;
  --orange: #f97316;
  --card: #ffffff;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.16);
  --soft-shadow: 0 14px 34px rgba(15, 23, 42, 0.11);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #ecfeff 0%, #f8fafc 24%, #eef2ff 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(
    90deg,
    rgba(6, 182, 212, 0.96),
    rgba(37, 99, 235, 0.96),
    rgba(20, 184, 166, 0.96)
  );
  color: #fff;
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.28);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 208px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 22px;
  letter-spacing: 0.02em;
}

.brand-text small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

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

.nav-links a {
  font-weight: 700;
  opacity: 0.94;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-links a:hover {
  color: #fde047;
  transform: translateY(-1px);
}

.nav-search,
.mobile-search,
.search-hero-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.search-hero-form input,
.filter-bar select {
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.nav-search input::placeholder,
.mobile-search input::placeholder,
.search-hero-form input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.nav-search button,
.mobile-search button,
.search-hero-form button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  background: #fff;
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.search-hero-form button:hover {
  background: #fde047;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mobile-panel nav a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
}

.hero {
  position: relative;
  min-height: 620px;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 18% 20%,
      rgba(34, 211, 238, 0.5),
      transparent 26%
    ),
    radial-gradient(
      circle at 78% 30%,
      rgba(124, 58, 237, 0.45),
      transparent 30%
    ),
    linear-gradient(135deg, #06b6d4 0%, #2563eb 48%, #7c3aed 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.35) 12.5%,
    transparent 12.5%,
    transparent 50%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0.35) 62.5%,
    transparent 62.5%,
    transparent 100%
  );
  background-size: 42px 42px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 220px;
  background: linear-gradient(
    0deg,
    rgba(248, 250, 252, 1),
    rgba(248, 250, 252, 0)
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.62fr);
  align-items: center;
  gap: 48px;
  opacity: 0;
  transform: translateX(24px);
  pointer-events: none;
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-desc,
.page-hero p,
.detail-line {
  margin: 24px 0;
  max-width: 720px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 900;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.primary-btn {
  color: var(--blue);
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.primary-btn:hover {
  background: #fde047;
  transform: translateY(-2px) scale(1.02);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.ghost-btn:hover,
.text-btn:hover {
  transform: translateY(-2px);
  color: #fde047;
}

.text-btn {
  color: #fff;
  padding-inline: 8px;
}

.hero-art {
  position: relative;
  width: min(100%, 360px);
  justify-self: center;
  border-radius: 30px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 35px 75px rgba(15, 23, 42, 0.34);
  transform: rotate(2deg);
}

.hero-art img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.16);
}

.hero-card-title {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #fff;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(10px);
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 3;
}

.hero-controls button {
  border: 0;
  color: #fff;
  cursor: pointer;
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 28px;
}

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

.hero-dots button {
  width: 34px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dots button.is-active {
  background: #fff;
}

.section {
  padding: 72px 0;
}

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

.section-head h2,
.feature-panel h2,
.rank-panel h2,
.content-card h2,
.side-card h2,
.player-info h2,
.site-footer h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 40px);
  color: var(--ink);
}

.section-head p,
.feature-panel p,
.content-card p,
.player-info p,
.side-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-more {
  color: var(--blue);
  font-weight: 900;
  white-space: nowrap;
}

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

.ranking-grid {
  counter-reset: ranking;
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--soft-shadow);
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
}

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

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

.score-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 7px 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.score-badge {
  right: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.rank-badge {
  left: 12px;
  min-width: 34px;
  text-align: center;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.score-badge.large {
  top: 18px;
  right: 18px;
  font-size: 18px;
  padding: 10px 14px;
}

.card-body {
  padding: 18px;
}

.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 46px;
  font-size: 18px;
  line-height: 1.28;
  color: #111827;
  font-weight: 900;
}

.card-title:hover {
  color: var(--blue);
}

.card-body p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 10px 0 14px;
  min-height: 64px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.card-meta {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.card-meta span {
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1f5f9;
}

.tag-row span {
  color: #0369a1;
  background: #ecfeff;
  box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.12);
}

.compact-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: stretch;
}

.compact-card .card-cover img {
  height: 100%;
  aspect-ratio: auto;
}

.compact-card .card-body {
  padding: 14px;
}

.compact-card .card-title {
  min-height: auto;
  font-size: 16px;
}

.compact-card .card-body p {
  -webkit-line-clamp: 2;
  min-height: auto;
  margin: 8px 0;
}

.category-section {
  margin-top: -44px;
  position: relative;
  z-index: 4;
}

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

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

.category-tile {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius);
  padding: 22px;
  color: #fff;
  box-shadow: var(--soft-shadow);
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease;
}

.category-tile:hover {
  transform: translateY(-7px) scale(1.01);
  box-shadow: var(--shadow);
}

.category-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
}

.category-tile strong {
  font-size: 22px;
}

.category-tile p {
  margin: 10px 0;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
}

.category-tile small {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

.tone-pink,
.tone-rose {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
}

.tone-cyan,
.tone-teal {
  background: linear-gradient(135deg, #06b6d4, #14b8a6);
}

.tone-red,
.tone-orange {
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.tone-green {
  background: linear-gradient(135deg, #22c55e, #10b981);
}

.tone-blue {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.tone-purple,
.tone-indigo {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.split-section {
  padding: 84px 0;
  background: #0f172a;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1fr);
  gap: 32px;
  align-items: start;
}

.feature-panel,
.rank-panel,
.player-card,
.content-card,
.side-card {
  border-radius: 30px;
  padding: 30px;
  background: #fff;
  box-shadow: var(--shadow);
}

.feature-panel {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  background:
    radial-gradient(
      circle at 25% 20%,
      rgba(34, 211, 238, 0.4),
      transparent 26%
    ),
    linear-gradient(135deg, #06b6d4, #2563eb 55%, #7c3aed);
}

.feature-panel h2,
.feature-panel p {
  color: #fff;
}

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

.page-hero,
.detail-hero {
  color: #fff;
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}

.page-hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 24px 24px;
}

.page-hero .container,
.detail-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  margin-bottom: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #fde047;
}

.search-hero-form {
  max-width: 620px;
  margin-top: 24px;
}

.search-hero-form.compact {
  max-width: 520px;
}

.search-hero-form input {
  flex: 1;
  min-width: 180px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  margin-bottom: 22px;
}

.filter-bar select {
  color: var(--ink);
  background: #f8fafc;
  min-width: 170px;
}

.search-status,
.empty-state {
  margin: 16px 0 24px;
  color: var(--muted);
  font-weight: 800;
}

.empty-state {
  display: none;
  text-align: center;
  padding: 40px;
}

.empty-state.is-visible {
  display: block;
}

.detail-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  position: relative;
  border-radius: 30px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 32px 70px rgba(15, 23, 42, 0.32);
}

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

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

.detail-meta span {
  background: rgba(255, 255, 255, 0.18);
}

.detail-tags {
  margin-top: 16px;
}

.player-section {
  padding-bottom: 28px;
}

.player-card {
  overflow: hidden;
  padding: 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.1),
    rgba(15, 23, 42, 0.46)
  );
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.player-start span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.36);
  font-size: 34px;
  padding-left: 5px;
}

.player-shell.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
}

.player-info {
  padding: 24px 28px 30px;
}

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

.content-stack {
  display: grid;
  gap: 22px;
}

.content-card h2,
.side-card h2,
.player-info h2 {
  font-size: 24px;
}

.content-card p {
  font-size: 17px;
  color: #334155;
}

.text-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.text-tags a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #0369a1;
  background: #ecfeff;
  font-weight: 800;
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.prev-next a {
  flex: 1;
  padding: 16px 18px;
  border-radius: 18px;
  color: var(--blue);
  background: #fff;
  box-shadow: var(--soft-shadow);
  font-weight: 900;
}

.prev-next a:last-child {
  text-align: right;
}

.side-card {
  position: sticky;
  top: 96px;
}

.site-footer {
  padding: 58px 0 26px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 0.9fr;
  gap: 32px;
}

.footer-brand {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 14px;
}

.site-footer p {
  margin: 0;
  line-height: 1.7;
}

.site-footer h2 {
  color: #67e8f9;
  font-size: 18px;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #fde047;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #94a3b8;
}

@media (max-width: 1080px) {
  .nav-links,
  .nav-search {
    display: none;
  }

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

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

  .hero-inner,
  .hero {
    min-height: 780px;
  }

  .hero-slide {
    align-content: center;
    gap: 28px;
    padding: 56px 0 110px;
  }

  .hero-art {
    width: min(270px, 72vw);
  }

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

  .side-card {
    position: static;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    min-width: 0;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text small {
    display: none;
  }

  .section {
    padding: 48px 0;
  }

  .section-head,
  .footer-bottom,
  .prev-next {
    flex-direction: column;
    align-items: stretch;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

  .hero-inner,
  .hero {
    min-height: 760px;
  }

  .hero-slide {
    gap: 18px;
  }

  .hero-actions,
  .detail-actions {
    align-items: stretch;
  }

  .primary-btn,
  .ghost-btn,
  .text-btn {
    width: 100%;
  }

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

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

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

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

  .filter-bar {
    display: grid;
  }

  .filter-bar select,
  .search-hero-form input,
  .search-hero-form button {
    width: 100%;
  }

  .search-hero-form {
    display: grid;
  }

  .player-start span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
