:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --deep: #0f172a;
  --deep-2: #1e293b;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --orange: #f97316;
  --card: #ffffff;
  --line: #e2e8f0;
  --shadow: 0 18px 45px rgba(15, 23, 42, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a, #1e293b);
  color: #fff;
  box-shadow: 0 10px 30px rgba(2, 6, 23, .22);
}

.nav-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
  box-shadow: 0 10px 24px rgba(6, 182, 212, .35);
}

.brand-text {
  background: linear-gradient(90deg, #22d3ee, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  font-size: 15px;
  white-space: nowrap;
}

.nav-links a {
  color: rgba(255, 255, 255, .86);
  transition: color .2s ease, transform .2s ease;
}

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

.nav-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 22px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, .28), transparent 34%), linear-gradient(135deg, #0f172a, #111827 55%, #0e7490);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% -10%;
  height: 60%;
  background: radial-gradient(circle, rgba(59, 130, 246, .28), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 650px;
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 42px;
  align-items: center;
  padding: 70px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .11);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #cffafe;
  backdrop-filter: blur(14px);
  font-size: 14px;
}

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

.hero h1 span {
  background: linear-gradient(90deg, #22d3ee, #60a5fa, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 640px;
  color: rgba(255, 255, 255, .78);
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 28px rgba(37, 99, 235, .32);
}

.btn-light {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
}

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

.hero-search {
  margin-top: 28px;
  width: min(540px, 100%);
  display: flex;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(14px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  color: #fff;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 14px;
  font-size: 15px;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, .62);
}

.hero-search button {
  border: 0;
}

.hero-panel {
  position: relative;
  min-height: 490px;
}

.hero-card {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(18px) scale(.98);
  transition: opacity .55s ease, transform .55s ease;
  border-radius: 30px;
  overflow: hidden;
  background: #111827;
  box-shadow: 0 28px 80px rgba(2, 6, 23, .48);
}

.hero-card.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero-card img {
  width: 100%;
  height: 490px;
  object-fit: cover;
}

.hero-card-body {
  position: absolute;
  inset: auto 22px 22px 22px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .58), rgba(15, 23, 42, .92));
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .12);
}

.hero-card-body h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.hero-card-body p {
  margin: 0;
  color: rgba(255, 255, 255, .78);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.hero-meta span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 211, 238, .16);
  color: #cffafe;
  font-size: 13px;
}

main,
.section {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 58px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
}

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

.section-more {
  color: var(--cyan);
  font-weight: 800;
}

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

.movie-card {
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .09);
  transition: transform .22s ease, box-shadow .22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

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

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

.type-badge,
.play-badge {
  position: absolute;
  color: #fff;
  z-index: 2;
}

.type-badge {
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--orange);
  font-size: 12px;
  font-weight: 700;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(6, 182, 212, .9);
  transform: translate(-50%, -50%) scale(.78);
  opacity: 0;
  transition: opacity .22s ease, transform .22s ease;
}

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

.card-body {
  padding: 18px;
}

.card-body h2,
.card-body h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.card-body h2 a:hover,
.card-body h3 a:hover {
  color: var(--cyan);
}

.meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.line {
  margin: 0 0 12px;
  color: #475569;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #0e7490);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 23px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, .76);
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 86px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

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

.rank-item img {
  width: 86px;
  height: 112px;
  object-fit: cover;
  border-radius: 14px;
  background: #e2e8f0;
}

.rank-item h2,
.rank-item h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-score {
  color: var(--orange);
  font-weight: 900;
  white-space: nowrap;
}

.page-hero {
  background: linear-gradient(135deg, #0f172a, #1e293b 60%, #0e7490);
  color: #fff;
  padding: 64px 0;
}

.page-hero-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
}

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

.filters {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin: 0 0 26px;
}

.filters input,
.filters select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.detail-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.breadcrumb {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--cyan);
}

.detail-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  align-items: start;
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  background: #e2e8f0;
  box-shadow: var(--shadow);
}

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

.detail-main h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 20px;
}

.detail-meta span {
  padding: 6px 11px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 14px;
  font-weight: 700;
}

.summary-box,
.review-box,
.player-box {
  margin-top: 26px;
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.summary-box h2,
.review-box h2,
.player-box h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.summary-box p,
.review-box p {
  margin: 0;
  color: #334155;
}

.player-frame {
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  border: 1px solid #0f172a;
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  background: #0f172a;
  color: #fff;
}

.play-button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
}

.source-name {
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
}

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

.site-footer {
  background: linear-gradient(180deg, #0f172a, #020617);
  color: #cbd5e1;
  padding: 54px 0 34px;
}

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

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

.site-footer h2 {
  color: #fff;
  margin: 0 0 12px;
  font-size: 18px;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

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

.footer-links a:hover {
  color: #22d3ee;
}

@media (max-width: 1024px) {
  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 18px;
    background: #0f172a;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 11px 12px;
    border-radius: 12px;
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, .08);
    transform: none;
  }

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

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

  .hero-panel,
  .hero-card img {
    min-height: 430px;
    height: 430px;
  }

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

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

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

@media (max-width: 720px) {
  .hero-inner {
    min-height: auto;
    padding: 44px 0;
  }

  .hero-panel,
  .hero-card img {
    min-height: 360px;
    height: 360px;
  }

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

  .section {
    padding: 38px 0;
  }

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

  .rank-item {
    grid-template-columns: 46px 72px 1fr;
  }

  .rank-score {
    grid-column: 3;
  }

  .rank-item img {
    width: 72px;
    height: 96px;
  }

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

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

  .play-button {
    width: 100%;
  }
}

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

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

  .brand {
    font-size: 20px;
  }
}
