:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #162033;
  --color-muted: #64748b;
  --color-line: #e2e8f0;
  --color-cyan: #06b6d4;
  --color-blue: #2563eb;
  --color-deep: #0f172a;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 16px 38px rgba(15, 23, 42, 0.10);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--color-text);
  background: linear-gradient(180deg, #f0fdff 0%, var(--color-bg) 360px);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(240, 253, 255, 0.86);
  border-bottom: 1px solid rgba(125, 211, 252, 0.34);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-blue));
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.32);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(135deg, #0891b2, #1d4ed8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #075985;
  background: rgba(6, 182, 212, 0.12);
  transform: translateY(-1px);
}

.nav-search {
  width: min(310px, 28vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(6, 182, 212, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.nav-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 8px 8px 8px 12px;
  background: transparent;
  color: var(--color-text);
}

.nav-search button,
.btn {
  border: 0;
  white-space: nowrap;
  cursor: pointer;
}

.nav-search button {
  padding: 8px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-blue));
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(6, 182, 212, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #0f172a;
  border-radius: 999px;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #ffffff;
  background: #07111f;
}

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

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.hero-slide::before,
.page-hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(6, 12, 24, 0.92), rgba(8, 47, 73, 0.58), rgba(6, 12, 24, 0.72)), var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-slide::after,
.page-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 28%, rgba(34, 211, 238, 0.28), transparent 28%),
    linear-gradient(180deg, rgba(6, 12, 24, 0.02), rgba(6, 12, 24, 0.86));
}

.hero-inner,
.page-hero-inner,
.detail-inner {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(260px, 0.84fr);
  gap: 56px;
  align-items: center;
  padding: 98px 0 118px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #a5f3fc;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.hero-copy h1 {
  max-width: 880px;
  font-size: clamp(44px, 6.4vw, 78px);
}

.hero-copy h2 {
  margin-top: 12px;
  font-size: clamp(32px, 4.4vw, 58px);
}

.hero-desc,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 22px 0 0;
  color: #e0f2fe;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

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

.btn {
  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;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-blue));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.32);
}

.btn-ghost {
  color: #cffafe;
  border: 1px solid rgba(207, 250, 254, 0.34);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px);
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.hero-tags span {
  color: #e0f2fe;
  border: 1px solid rgba(125, 211, 252, 0.30);
  background: rgba(14, 116, 144, 0.38);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.46);
  transform: rotate(2deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: inherit;
  pointer-events: none;
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 36px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-control,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-control {
  width: 42px;
  height: 42px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 30px;
  background: #67e8f9;
}

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

.tinted-section {
  width: 100%;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(135deg, rgba(236, 254, 255, 0.84), rgba(239, 246, 255, 0.92));
}

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

.section-head h2,
.detail-text h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--color-muted);
  line-height: 1.7;
}

.section-more {
  color: #0891b2;
  font-weight: 800;
}

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

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(6, 182, 212, 0.50);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.16);
}

.poster-wrap {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-type,
.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.poster-type {
  left: 12px;
  top: 12px;
  background: rgba(8, 145, 178, 0.84);
}

.poster-year {
  right: 12px;
  top: 12px;
  background: rgba(15, 23, 42, 0.70);
}

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

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

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

.card-meta,
.card-desc {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.7;
}

.card-meta {
  font-size: 13px;
  font-weight: 700;
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
}

.tag-row {
  margin-top: auto;
}

.tag-row span {
  color: #0e7490;
  background: #ecfeff;
}

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

.category-tile,
.category-overview-card {
  display: block;
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile {
  min-height: 164px;
  padding: 22px;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 56px rgba(6, 182, 212, 0.15);
}

.category-tile span,
.category-overview-card h2 {
  display: block;
  color: #0f172a;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.category-tile p,
.category-overview-card p {
  margin: 10px 0 0;
  color: var(--color-muted);
  line-height: 1.7;
}

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

.category-overview-card {
  overflow: hidden;
}

.category-overview-card > div:last-child {
  padding: 24px;
}

.category-overview-card span {
  display: inline-flex;
  margin-top: 18px;
  color: #0891b2;
  font-weight: 850;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 8px;
  background: linear-gradient(135deg, #ecfeff, #dbeafe);
}

.category-covers img {
  width: 100%;
  aspect-ratio: 1 / 1.18;
  object-fit: cover;
  border-radius: 14px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.compact-hero {
  min-height: 360px;
}

.page-hero-inner {
  padding: 92px 0;
}

.page-hero h1 {
  max-width: 780px;
  font-size: clamp(38px, 5vw, 64px);
}

.filter-panel {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
  padding: 14px;
  border: 1px solid rgba(125, 211, 252, 0.30);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-card);
}

.filter-panel input,
.filter-panel select,
.hero-search input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.40);
  border-radius: 999px;
  outline: 0;
  padding: 13px 16px;
  color: var(--color-text);
  background: #ffffff;
}

.filter-panel select {
  max-width: 180px;
}

.hero-search {
  display: flex;
  width: min(680px, 100%);
  gap: 12px;
  margin-top: 30px;
}

.hero-search input {
  min-height: 50px;
}

.ranking-preview {
  padding-top: 46px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 54px 72px minmax(0, 1fr) auto 72px;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-row:hover {
  transform: translateX(6px);
  border-color: rgba(6, 182, 212, 0.45);
}

.ranking-row img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
}

.ranking-number {
  color: #0891b2;
  font-size: 24px;
  font-weight: 900;
}

.ranking-title {
  min-width: 0;
  color: #0f172a;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-meta {
  color: var(--color-muted);
  font-size: 14px;
}

.ranking-score {
  color: #f59e0b;
  font-weight: 900;
  text-align: right;
}

.detail-hero {
  min-height: 660px;
}

.detail-inner {
  padding: 92px 0 76px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: #bae6fd;
  font-weight: 750;
}

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

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

.detail-poster {
  margin: 0;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 34px 76px rgba(0, 0, 0, 0.44);
}

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

.detail-copy h1 {
  font-size: clamp(40px, 5.3vw, 72px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.player-panel {
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

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

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

.player-shade {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.74));
  cursor: pointer;
}

.player-shade.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(--color-cyan), var(--color-blue));
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.36);
  font-size: 32px;
  text-indent: 4px;
}

.player-shade span:last-child {
  font-size: 20px;
  font-weight: 850;
}

.detail-text {
  max-width: 900px;
}

.detail-text h2 + p {
  margin-top: 14px;
}

.detail-text p {
  color: #334155;
  font-size: 18px;
  line-height: 2;
}

.detail-text h2:not(:first-child) {
  margin-top: 38px;
}

.search-title {
  margin-bottom: 24px;
  color: #0f172a;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 680px;
  margin: 12px 0 0;
  line-height: 1.8;
}

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

.footer-links a {
  color: #e0f2fe;
  font-weight: 750;
}

.movie-card.is-hidden,
.ranking-row.is-hidden {
  display: none;
}

@media (max-width: 1060px) {
  .nav-toggle {
    display: inline-block;
    margin-left: auto;
  }

  .nav-links,
  .nav-search {
    display: none;
  }

  .nav-shell.is-open {
    flex-wrap: wrap;
    padding: 12px 0 16px;
  }

  .nav-shell.is-open .nav-links,
  .nav-shell.is-open .nav-search {
    display: flex;
    width: 100%;
  }

  .nav-shell.is-open .nav-links {
    flex-wrap: wrap;
    order: 3;
  }

  .nav-shell.is-open .nav-search {
    order: 4;
  }

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

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

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

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

@media (max-width: 760px) {
  .nav-shell,
  .content-section,
  .hero-inner,
  .page-hero-inner,
  .detail-inner,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-slider {
    min-height: 720px;
  }

  .hero-inner {
    gap: 28px;
    padding: 72px 0 116px;
  }

  .hero-poster {
    width: min(260px, 76vw);
  }

  .hero-controls {
    bottom: 24px;
  }

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

  .card-body {
    padding: 14px;
  }

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

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

  .filter-panel,
  .hero-search,
  .footer-inner {
    flex-direction: column;
  }

  .filter-panel select {
    max-width: none;
  }

  .ranking-row {
    grid-template-columns: 40px 58px minmax(0, 1fr) 52px;
    gap: 10px;
  }

  .ranking-row img {
    width: 58px;
    height: 58px;
  }

  .ranking-meta {
    display: none;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-inner {
    padding: 62px 0 54px;
  }

  .detail-layout {
    gap: 28px;
  }

  .detail-poster {
    width: min(260px, 74vw);
  }

  .content-section {
    padding: 52px 0;
  }
}

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

  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
