:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --cyan: #0891b2;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(135deg, #f8fafc 0%, #eef6ff 52%, #f8fafc 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.brand-text {
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  color: #334155;
  border-radius: 12px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--blue);
  background: #eff6ff;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: #f1f5f9;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

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

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at top left, #1d4ed8, #0f172a 52%, #020617);
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(14, 165, 233, 0.25), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.2)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  padding: 88px 0 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: #0e7490;
  background: #ecfeff;
  border: 1px solid #cffafe;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.86rem;
  font-weight: 900;
}

.hero .eyebrow {
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.24);
  border-color: rgba(147, 197, 253, 0.36);
  backdrop-filter: blur(12px);
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero-content p {
  max-width: 720px;
  margin: 0;
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags span,
.detail-tags a {
  padding: 7px 10px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.primary-btn,
.ghost-btn,
.text-link,
.section-heading a,
.category-title-link,
.category-overview-card > a:last-child {
  font-weight: 900;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover,
.section-heading a:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 4;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-controls button {
  border: 0;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
  backdrop-filter: blur(10px);
}

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

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

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

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

.home-intro,
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.home-intro h2,
.section-heading h2,
.rank-panel h2,
.prose-section h2,
.info-panel h2 {
  margin: 12px 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.home-intro p,
.page-hero p,
.category-tile p,
.category-overview-card p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.9;
}

.text-link,
.section-heading a {
  color: var(--blue);
}

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

.category-tile,
.category-overview-card {
  min-height: 210px;
  padding: 24px;
  background: linear-gradient(145deg, #ffffff, #f8fbff);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.category-tile:nth-child(3n + 1) {
  background: linear-gradient(145deg, #eff6ff, #ecfeff);
}

.category-tile:nth-child(3n + 2) {
  background: linear-gradient(145deg, #fff7ed, #fdf2f8);
}

.category-tile:hover,
.category-overview-card:hover,
.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(37, 99, 235, 0.25);
}

.category-tile strong,
.category-overview-card h2 {
  display: block;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.category-tile div,
.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-tile span,
.mini-links a {
  padding: 6px 9px;
  color: #334155;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  font-size: 0.8rem;
}

.feature-strip {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1280px) / 2));
  padding-right: max(16px, calc((100% - 1280px) / 2));
  color: #ffffff;
  background:
    radial-gradient(circle at 15% 20%, rgba(59, 130, 246, 0.35), transparent 26%),
    linear-gradient(135deg, #0f172a, #111827 55%, #0e7490);
}

.light-heading .section-kicker,
.feature-strip .section-kicker {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.light-heading h2,
.feature-strip h2 {
  color: #ffffff;
}

.light-heading a,
.feature-strip .section-heading a {
  color: #a5f3fc;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.feature-strip .movie-card {
  background: rgba(255, 255, 255, 0.95);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.75));
  opacity: 0.9;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.type-pill,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 5px 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.card-body {
  padding: 14px;
}

.card-body h2 {
  margin: 0 0 7px;
  font-size: 1rem;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: var(--blue);
}

.card-meta,
.card-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.card-line {
  display: -webkit-box;
  min-height: 2.7em;
  margin-top: 8px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 12px;
}

.compact-card .card-body h2 {
  font-size: 0.95rem;
}

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

.rank-panel,
.info-panel,
.filter-panel,
.prose-section,
.category-overview-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: auto 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

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

.ranking-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: #dbeafe;
}

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

.ranking-item h2 {
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.ranking-item p,
.ranking-item span {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.page-main,
.detail-main {
  min-height: 70vh;
}

.page-hero {
  padding: 86px max(16px, calc((100% - 1280px) / 2));
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.25), transparent 32%),
    linear-gradient(135deg, #1e3a8a, #0f172a 58%, #155e75);
}

.compact-hero h1,
.page-hero h1 {
  max-width: 860px;
  margin: 18px 0 12px;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero p {
  color: #dbeafe;
}

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

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.search-box span {
  color: var(--muted);
  font-size: 1.3rem;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.select-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.select-group select {
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
}

.watch-layout {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 700;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  background: #020617;
  border-radius: 22px;
  box-shadow: 0 25px 65px rgba(2, 6, 23, 0.22);
}

.main-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  object-fit: cover;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.16), rgba(2, 6, 23, 0.55));
  cursor: pointer;
}

.play-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: #ffffff;
  border-radius: 50%;
  font-size: 2.1rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s ease;
}

.play-overlay:hover span {
  transform: scale(1.08);
}

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

.detail-copy {
  padding: 24px 0 0;
}

.detail-copy h1 {
  margin: 18px 0 10px;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-subtitle {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.85;
}

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

.info-panel {
  position: sticky;
  top: 96px;
  padding: 18px;
}

.info-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
  border-radius: 16px;
}

.info-panel h2 {
  margin-top: 18px;
  font-size: 1.35rem;
}

.info-panel dl {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.info-panel dl div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.info-panel dt {
  color: var(--muted);
  font-weight: 800;
}

.info-panel dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.detail-tag-row {
  margin-top: 18px;
}

.prose-section {
  padding: 30px;
}

.prose-section h2 {
  margin: 0 0 14px;
  font-size: 1.8rem;
}

.prose-section p {
  margin: 0;
  color: #334155;
  font-size: 1.03rem;
  line-height: 2;
}

.review-section {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #111827);
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 34px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-grid p {
  max-width: 460px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1rem;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 10px 0;
  color: #94a3b8;
}

.footer-grid a:hover {
  color: #ffffff;
}

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

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1180px) {
  .movie-grid,
  .all-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .split-area,
  .watch-layout {
    grid-template-columns: 1fr;
  }

  .rank-panel,
  .info-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .home-intro,
  .section-heading,
  .filter-panel,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-grid,
  .category-overview-grid,
  .big-ranking,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 640px) {
  .header-inner {
    height: 64px;
  }

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

  .hero-content {
    padding-top: 72px;
  }

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

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

  .section-wrap {
    padding: 42px 0;
  }

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

  .ranking-item {
    grid-template-columns: auto 58px 1fr;
  }

  .card-body {
    padding: 12px;
  }

  .card-line,
  .tag-row {
    display: none;
  }

  .watch-layout {
    width: min(100% - 20px, 1280px);
    padding-top: 18px;
  }

  .player-shell,
  .prose-section,
  .info-panel,
  .filter-panel,
  .category-tile,
  .category-overview-card {
    border-radius: 16px;
  }

  .play-overlay span {
    width: 68px;
    height: 68px;
  }
}
