:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-blue: #eff6ff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #4f46e5;
  --accent: #f43f5e;
  --amber: #f59e0b;
  --emerald: #10b981;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #dbeafe, #e0e7ff);
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(100% - 32px, var(--max));
  height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
}

.brand-mark span {
  position: absolute;
  left: 14px;
  top: 10px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #fff;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong,
.footer-brand {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link,
.mobile-nav-link {
  padding: 10px 15px;
  border-radius: 12px;
  color: #4b5563;
  font-weight: 600;
  transition: 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active {
  color: var(--primary);
  background: #eff6ff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  transition: 0.2s ease;
}

.icon-button:hover {
  background: #f3f4f6;
  color: var(--primary);
}

.mobile-menu-button {
  display: none;
}

.header-search {
  display: none;
  border-top: 1px solid #f1f5f9;
}

.header-search.is-open {
  display: block;
}

.header-search-form {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 16px 0;
  display: flex;
  gap: 12px;
}

.header-search-form input,
.hero-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 13px 15px;
  outline: none;
  transition: 0.2s ease;
}

.header-search-form input:focus,
.hero-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.header-search-form button,
.hero-search button {
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  cursor: pointer;
  font-weight: 700;
}

.mobile-nav {
  display: none;
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 6px 0 14px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(15, 23, 42, 0.52) 45%, rgba(37, 99, 235, 0.12));
}

.hero-blur {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(2px);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--max));
  height: 100%;
  margin: 0 auto;
  padding: 0 0 70px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.section-kicker {
  color: var(--primary);
  background: #eff6ff;
  border: 0;
}

.hero h1 {
  max-width: 820px;
  margin: 22px 0 16px;
  color: #fff;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 20px;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.detail-tags span {
  color: var(--primary);
  background: #eff6ff;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.22s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.36);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100vw - var(--max)) / 2));
  bottom: 54px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  width: 36px;
  background: #fff;
}

.content-section {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 70px 0;
}

.soft-section {
  width: 100%;
  max-width: none;
  padding: 70px max(16px, calc((100vw - var(--max)) / 2));
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
}

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

.section-title h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.section-title a {
  color: var(--primary);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

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

.movie-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #dbeafe;
}

.movie-card-wide .movie-thumb {
  aspect-ratio: 16 / 9;
}

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

.movie-card:hover .movie-thumb img,
.poster-card:hover img,
.rank-card:hover img {
  transform: scale(1.08);
}

.movie-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 55%);
  opacity: 0;
  transition: 0.25s ease;
}

.movie-card:hover .movie-thumb::after {
  opacity: 1;
}

.movie-duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.thumb-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(37, 99, 235, 0.85);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: 0.25s ease;
}

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

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

.movie-meta-line,
.movie-mini-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.pill {
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 999px;
  padding: 4px 9px;
  font-weight: 700;
}

.movie-card h3,
.rank-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card h3 a:hover,
.rank-card h3 a:hover,
.category-samples a:hover {
  color: var(--primary);
}

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

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

.poster-card a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  background: #dbeafe;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

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

.poster-card a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 58%);
}

.poster-card span,
.poster-card small {
  position: absolute;
  z-index: 2;
  left: 13px;
  right: 13px;
  color: #fff;
}

.poster-card span {
  bottom: 34px;
  font-weight: 800;
}

.poster-card small {
  bottom: 13px;
  color: #d1d5db;
}

.category-strip {
  width: 100%;
  max-width: none;
  padding: 70px max(16px, calc((100vw - var(--max)) / 2));
}

.category-strip-blue,
.category-strip-emerald {
  background: #fff;
}

.category-strip-rose,
.category-strip-amber {
  background: #f8fafc;
}

.page-hero {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.small-page-hero {
  min-height: 340px;
  display: flex;
  align-items: center;
  padding: 80px max(16px, calc((100vw - var(--max)) / 2));
}

.page-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.46));
}

.page-hero > div:last-child,
.small-page-hero > div {
  position: relative;
  z-index: 2;
  width: min(100%, var(--max));
  margin: 0 auto;
}

.page-hero h1 {
  max-width: 850px;
  margin: 14px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #e5e7eb;
  font-size: 18px;
}

.category-page-hero,
.ranking-hero {
  display: flex;
  align-items: flex-end;
  padding: 90px max(16px, calc((100vw - var(--max)) / 2)) 56px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #dbeafe;
  font-size: 14px;
}

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

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

.category-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: 0.22s ease;
}

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

.category-card-main {
  display: block;
  padding: 26px;
}

.category-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 18px;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.25);
}

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

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 26px 26px;
}

.category-samples a {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  background: #f8fafc;
  border-radius: 999px;
  padding: 6px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.rank-section {
  padding-top: 50px;
}

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

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 70px 160px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: 0.22s ease;
}

.rank-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.rank-number {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--amber));
  border-radius: 16px;
  font-weight: 900;
}

.rank-image {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 10;
}

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

.rank-content h3 {
  font-size: 20px;
}

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

.detail-layout {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 34px 0 30px;
}

.detail-breadcrumb {
  color: #64748b;
}

.detail-breadcrumb a:hover {
  color: var(--primary);
}

.player-card {
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

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

.stream-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #020617;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.8), rgba(15, 23, 42, 0.2));
}

.player-glow {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.45);
  filter: blur(34px);
}

.player-play {
  position: relative;
  z-index: 4;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  font-size: 32px;
  box-shadow: 0 26px 45px rgba(37, 99, 235, 0.4);
  transition: 0.2s ease;
}

.player-cover:hover .player-play {
  transform: scale(1.08);
}

.stream-player.is-playing .player-cover {
  display: none;
}

.detail-info {
  padding: 34px 0 0;
}

.detail-info h1 {
  margin: 14px 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.detail-one-line {
  max-width: 880px;
  margin: 0 0 20px;
  color: #4b5563;
  font-size: 20px;
}

.detail-info h2 {
  margin: 34px 0 12px;
  font-size: 26px;
}

.detail-info p {
  max-width: 980px;
  color: #374151;
  font-size: 17px;
}

.related-section {
  padding-top: 35px;
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: #0f172a;
}

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

.footer-inner p {
  max-width: 560px;
  margin: 12px 0 0;
  color: #94a3b8;
}

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

.footer-links a {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 8px 12px;
}

.footer-links a:hover {
  background: rgba(37, 99, 235, 0.5);
}

@media (max-width: 1024px) {
  .movie-grid,
  .movie-grid-three,
  .movie-grid-four {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .mobile-nav.is-open {
    display: grid;
    gap: 6px;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    padding-bottom: 82px;
  }

  .hero p {
    font-size: 17px;
  }

  .hero-dots {
    left: 16px;
    right: auto;
    bottom: 34px;
  }

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

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

  .rank-card {
    grid-template-columns: 50px 96px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-number {
    width: 40px;
    height: 40px;
  }

  .hero-search,
  .header-search-form {
    flex-direction: column;
  }

  .hero-search button,
  .header-search-form button {
    min-height: 48px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    font-size: 19px;
  }

  .hero {
    height: 520px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 36px;
  }

  .hero-actions {
    width: 100%;
  }

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

  .content-section,
  .soft-section,
  .category-strip {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid-three,
  .movie-grid-four,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-card p,
  .rank-card .movie-mini-meta {
    display: none;
  }

  .player-play {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
