:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #38bdf8;
  --green: #059669;
  --orange: #f97316;
  --red: #ef4444;
  --purple: #7c3aed;
  --radius: 20px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.98), rgba(37, 99, 235, 0.98));
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #60a5fa, #1e3a8a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 20px rgba(0, 0, 0, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #bfdbfe;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-link {
  padding: 10px 0;
}

.hero-slider {
  position: relative;
  height: min(720px, 70vh);
  min-height: 520px;
  overflow: hidden;
  background: linear-gradient(135deg, #172554, #1d4ed8 55%, #2563eb);
}

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

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.9s ease, transform 1.2s ease;
  pointer-events: none;
}

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

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

.hero-shade {
  background:
    radial-gradient(circle at 78% 26%, rgba(59, 130, 246, 0.24), transparent 38%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.48) 48%, rgba(15, 23, 42, 0.25)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.8), transparent 62%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0 0 92px;
  color: #ffffff;
}

.hero-kicker,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-kicker span {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  font-size: 14px;
}

.hero-content h1,
.hero-content h2 {
  max-width: 860px;
  margin: 20px 0 16px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 1.05;
  font-weight: 900;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
}

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

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

.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button {
  min-height: 48px;
  padding: 0 22px;
}

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

.button-primary {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.32);
}

.button-primary:hover {
  background: var(--blue-dark);
}

.button-glass {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(16px);
}

.button-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.68);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}

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

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

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

.page-space {
  padding-top: 42px;
}

.home-search-panel,
.page-hero-soft,
.filter-panel,
.search-board,
.watch-card,
.related-panel,
.category-overview-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.home-search-panel {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 28px;
  align-items: center;
  margin-top: -46px;
  padding: 26px;
}

.home-search-panel h2,
.section-title h2,
.page-hero-soft h1,
.related-panel h2,
.story-block h2,
.review-block h2,
.category-overview-body h2 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.home-search-panel h2 {
  font-size: 26px;
}

.home-search-panel p,
.page-hero-soft p,
.category-overview-body p {
  margin: 8px 0 0;
  color: var(--muted);
}

.inline-search,
.search-controls {
  display: grid;
  gap: 12px;
}

.inline-search {
  grid-template-columns: minmax(0, 1fr) auto;
}

.inline-search input,
.inline-search button,
.search-controls input,
.search-controls select,
.filter-panel input {
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 0 16px;
  outline: none;
}

.inline-search input:focus,
.search-controls input:focus,
.search-controls select:focus,
.filter-panel input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.28);
}

.inline-search button {
  border: 0;
  color: #ffffff;
  background: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.section-title h2 {
  font-size: clamp(26px, 4vw, 34px);
}

.section-title a {
  margin-left: auto;
  color: var(--blue);
  font-weight: 800;
}

.section-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: #eff6ff;
  box-shadow: inset 0 1px 0 #ffffff;
}

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.18);
}

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

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

.movie-card:hover .poster-link img,
.category-tile:hover img,
.category-collage:hover img {
  transform: scale(1.06);
}

.movie-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px;
}

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

.card-meta span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 10px;
  border-radius: 999px;
  background: #cbd5e1;
  vertical-align: middle;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.3;
}

.movie-card h3 a:hover {
  color: var(--blue);
}

.movie-card p {
  flex: 1;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

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

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

.latest-band {
  margin: 58px -18px 0;
  padding: 42px 18px;
  border-radius: 30px;
  background: linear-gradient(135deg, #ecfdf5, #eef2ff);
}

.scroll-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scroll-snap-type: x proximity;
}

.movie-card-mini {
  width: 275px;
  flex: 0 0 275px;
  scroll-snap-align: start;
}

.movie-card-mini .poster-link {
  aspect-ratio: 16 / 9;
}

.category-band {
  margin-top: 58px;
  padding: 42px 0 0;
}

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

.category-tile {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: 24px;
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.1));
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-tile span,
.category-tile small {
  position: absolute;
  left: 20px;
  right: 20px;
  z-index: 2;
}

.category-tile span {
  bottom: 56px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile small {
  bottom: 20px;
  color: rgba(255, 255, 255, 0.82);
}

.ranking-band {
  margin: 58px -18px 0;
  padding: 42px 18px;
  border-radius: 30px;
  background: linear-gradient(135deg, #fff7ed, #fef2f2, #fefce8);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.32);
}

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

.explore-layout > div {
  display: grid;
  gap: 16px;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: stretch;
}

.movie-card-horizontal .poster-link {
  height: 100%;
  aspect-ratio: auto;
}

.page-hero-soft {
  padding: 38px;
  margin-bottom: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(96, 165, 250, 0.24), transparent 32%),
    linear-gradient(135deg, #ffffff, #eff6ff);
}

.page-hero-soft h1 {
  font-size: clamp(34px, 5vw, 52px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.category-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.category-jump a {
  padding: 8px 13px;
  border-radius: 999px;
  color: #1e40af;
  background: #dbeafe;
  font-weight: 800;
  font-size: 13px;
}

.filter-panel {
  display: grid;
  grid-template-columns: auto minmax(220px, 420px);
  align-items: center;
  gap: 14px;
  padding: 18px;
  margin-bottom: 24px;
}

.filter-panel label {
  color: var(--muted);
  font-weight: 800;
}

.category-list,
.search-results {
  padding-bottom: 32px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
}

.category-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  min-height: 220px;
  overflow: hidden;
}

.category-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-overview-body {
  padding: 24px;
}

.category-overview-body h2 {
  margin-top: 12px;
  font-size: 25px;
}

.text-link {
  margin-top: 18px;
  color: var(--blue);
  font-weight: 900;
}

.search-board {
  padding: 24px;
}

.search-controls {
  grid-template-columns: 2fr repeat(3, minmax(140px, 1fr));
  margin-bottom: 28px;
}

.empty-state {
  margin: 36px 0;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.watch-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.player-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000000;
  cursor: pointer;
}

.player-veil {
  position: absolute;
  inset: 0;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(37, 99, 235, 0.34), transparent 22%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.24));
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-shell.is-playing .player-veil {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-core {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 22px 45px rgba(37, 99, 235, 0.38);
  font-size: 34px;
}

.play-text {
  font-size: 18px;
  font-weight: 900;
}

.player-loading,
.player-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.64);
}

.player-loading[hidden],
.player-message[hidden] {
  display: none;
}

.player-loading span {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 4px solid rgba(255, 255, 255, 0.28);
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.detail-body {
  padding: 28px;
}

.detail-body h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
}

.detail-meta {
  margin-bottom: 18px;
  color: var(--muted);
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 28px;
}

.story-block,
.review-block {
  margin-top: 28px;
}

.story-block h2,
.review-block h2 {
  font-size: 24px;
  margin-bottom: 12px;
}

.story-block p,
.review-block p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
}

.story-block:first-of-type p {
  padding: 18px;
  border-radius: 16px;
  background: #f8fafc;
}

.review-block {
  padding: 22px;
  border-left: 5px solid var(--blue);
  border-radius: 18px;
  background: #eff6ff;
}

.related-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.related-panel h2 {
  margin-bottom: 18px;
  font-size: 26px;
}

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

.related-list .movie-card-mini {
  width: 100%;
  flex-basis: auto;
}

.related-list .movie-card-mini {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
}

.related-list .movie-card-mini .poster-link {
  height: 100%;
  aspect-ratio: auto;
}

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

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(190px, 0.6fr));
  gap: 34px;
}

.footer-brand {
  color: #ffffff;
}

.footer-about p {
  max-width: 520px;
  margin: 14px 0 0;
}

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

.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding: 18px;
  text-align: center;
  color: #94a3b8;
}

.is-hidden {
  display: none !important;
}

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

  .three-grid,
  .detail-layout,
  .footer-shell,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .related-panel {
    position: static;
  }
}

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

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

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

  .hero-slider {
    height: 76vh;
    min-height: 560px;
  }

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

  .hero-arrow {
    display: none;
  }

  .home-search-panel,
  .filter-panel,
  .search-controls,
  .inline-search,
  .category-overview-card,
  .movie-card-horizontal,
  .related-list .movie-card-mini {
    grid-template-columns: 1fr;
  }

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

  .category-overview-card {
    display: block;
  }

  .explore-layout {
    grid-template-columns: 1fr;
  }

  .page-hero-soft {
    padding: 26px;
  }
}

@media (max-width: 520px) {
  .page-shell,
  .nav-shell,
  .mobile-nav,
  .footer-shell,
  .hero-content {
    width: min(100% - 22px, 1180px);
  }

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

  .home-search-panel,
  .search-board,
  .watch-card,
  .related-panel {
    border-radius: 18px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 42px;
  }

  .button {
    width: 100%;
  }
}
