:root {
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --pink: #ec4899;
  --yellow: #facc15;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --soft: #f8fafc;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, #ecfeff 0%, #ffffff 48%, #fdf2f8 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  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(236, 254, 255, 0.95), rgba(239, 246, 255, 0.95), rgba(253, 242, 248, 0.95));
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

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

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

.brand-mark,
.footer-brand span {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  box-shadow: 0 10px 24px rgba(6, 182, 212, 0.28);
}

.brand-text {
  font-size: clamp(20px, 3vw, 26px);
  background: linear-gradient(90deg, var(--cyan-dark), var(--pink));
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link {
  position: relative;
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--cyan-dark);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

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

.header-search input,
.mobile-panel input,
.search-box input,
.filter-input {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  outline: none;
  color: var(--text);
}

.header-search input {
  width: min(250px, 22vw);
  height: 42px;
  padding: 0 16px;
  border-radius: 999px 0 0 999px;
}

.header-search button,
.mobile-panel button,
.search-box button {
  height: 42px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  padding: 0 18px;
  background: var(--cyan);
  border-radius: 0 999px 999px 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-panel button:hover,
.search-box button:hover {
  background: var(--cyan-dark);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}

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

.mobile-panel nav {
  display: grid;
  gap: 12px;
  padding: 14px 0;
}

.mobile-panel form {
  display: flex;
}

.mobile-panel input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px 0 0 999px;
}

.hero {
  position: relative;
  min-height: clamp(430px, 62vw, 650px);
  overflow: hidden;
  color: #ffffff;
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transition: opacity 0.8s ease, transform 5s ease;
  transform: scale(1.03);
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.1));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: clamp(430px, 62vw, 650px);
  display: flex;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--yellow);
  font-weight: 800;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2.4vw, 22px);
  margin: 0 0 28px;
}

.hero-actions,
.section-head,
.detail-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: var(--cyan);
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.34);
}

.primary-btn:hover,
.secondary-btn:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.primary-btn:hover {
  background: var(--cyan-dark);
}

.secondary-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: #ffffff;
}

.category-strip {
  padding: 34px 0 18px;
}

.category-strip .container {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.category-strip a,
.category-card,
.info-chip {
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.category-strip a {
  padding: 10px 20px;
  color: #374151;
  font-weight: 750;
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.category-strip a:hover {
  color: #ffffff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transform: translateY(-2px) scale(1.02);
}

.section {
  padding: 58px 0;
}

.section.alt {
  background: linear-gradient(90deg, rgba(207, 250, 254, 0.8), rgba(219, 234, 254, 0.82), rgba(252, 231, 243, 0.8));
}

.section.white {
  background: #ffffff;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-title {
  margin: 0;
  font-size: clamp(26px, 3.8vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.section-title small {
  display: block;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  margin-top: 8px;
}

.text-link {
  color: var(--cyan-dark);
  background: rgba(6, 182, 212, 0.1);
  min-height: 42px;
}

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

.movie-grid.featured {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

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

.movie-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card figure {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.movie-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.quality,
.rank-badge {
  position: absolute;
  color: #ffffff;
  font-weight: 900;
  border-radius: 999px;
}

.quality {
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.74);
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.28);
}

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

.movie-card h3 {
  margin: 0 0 9px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.movie-card.large p {
  -webkit-line-clamp: 3;
}

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

.tag-row span,
.movie-meta span,
.info-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--cyan-dark);
  background: #ecfeff;
  font-size: 12px;
  font-weight: 750;
}

.movie-card.horizontal {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
}

.movie-card.horizontal figure {
  aspect-ratio: auto;
  min-height: 145px;
}

.movie-card.horizontal .movie-card-body {
  padding: 18px 20px;
}

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

.stack-list {
  display: grid;
  gap: 16px;
}

.cta {
  color: #ffffff;
  text-align: center;
  background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
}

.cta h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 44px);
}

.cta p {
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.cta .primary-btn {
  color: var(--cyan-dark);
  background: #ffffff;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #155e75, #312e81);
}

.page-hero {
  padding: 86px 0 74px;
}

.page-hero h1,
.detail-title h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.page-hero p,
.detail-title p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

.category-card {
  padding: 24px;
  border-radius: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 24px;
}

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

.category-card span {
  color: var(--cyan-dark);
  font-weight: 800;
}

.filter-bar,
.search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.filter-input,
.search-box input {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 18px;
}

.search-box button {
  min-width: 108px;
  height: 48px;
}

.detail-hero {
  padding: 44px 0 58px;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-position: center;
  background-size: cover;
  filter: blur(10px);
  transform: scale(1.08);
}

.detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 34px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  background: #111827;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.breadcrumb {
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

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

.detail-meta {
  margin: 18px 0 24px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.watch-section {
  padding: 46px 0 0;
  background: #ffffff;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.68));
  cursor: pointer;
  text-align: center;
  padding: 24px;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  box-shadow: 0 20px 40px rgba(6, 182, 212, 0.32);
  font-size: 34px;
}

.play-cover strong {
  display: block;
  max-width: 680px;
  font-size: clamp(22px, 4vw, 36px);
  line-height: 1.2;
}

.story-panel {
  padding: 44px 0;
  background: #ffffff;
}

.story-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 30px;
}

.story-card,
.side-card {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.story-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 25px;
}

.story-card p,
.side-card p {
  margin: 0 0 18px;
  color: #4b5563;
}

.side-card .tag-row span {
  font-size: 13px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 110px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.rank-row figure {
  margin: 0;
  overflow: hidden;
  border-radius: 15px;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-row h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-heat {
  color: var(--cyan-dark);
  font-weight: 900;
  padding-right: 8px;
}

.search-results {
  min-height: 220px;
}

.empty-state {
  padding: 36px;
  text-align: center;
  color: var(--muted);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.site-footer {
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #1e3a8a, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-brand {
  margin-bottom: 14px;
  font-size: 22px;
}

.site-footer p {
  max-width: 410px;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  width: fit-content;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.72);
}

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

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

  .menu-toggle {
    display: block;
  }

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

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

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

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

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

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .hero,
  .hero-content {
    min-height: 520px;
  }

  .hero-slide::before {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.78));
  }

  .movie-grid,
  .movie-grid.featured,
  .movie-grid.compact,
  .category-grid,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .movie-card.horizontal figure {
    aspect-ratio: 16 / 10;
  }

  .section-head,
  .detail-actions,
  .filter-bar,
  .search-box {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box button {
    border-radius: 999px;
  }

  .rank-row {
    grid-template-columns: 42px 82px 1fr;
  }

  .rank-heat {
    grid-column: 2 / 4;
    padding-left: 0;
  }
}
