:root {
  color-scheme: light;
  --color-blue-950: #08172f;
  --color-blue-900: #0b2251;
  --color-blue-800: #12316c;
  --color-blue-700: #1d4ed8;
  --color-blue-600: #2563eb;
  --color-cyan-400: #22d3ee;
  --color-cyan-300: #67e8f9;
  --color-slate-950: #020617;
  --color-slate-900: #0f172a;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748b;
  --color-slate-100: #f1f5f9;
  --color-slate-50: #f8fafc;
  --color-white: #ffffff;
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(37, 99, 235, 0.18);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-slate-800);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 34%, #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 {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #e0f2fe;
  background: rgba(8, 23, 47, 0.92);
  border-bottom: 1px solid rgba(125, 211, 252, 0.16);
  backdrop-filter: blur(18px);
}

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

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

.brand-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  font-size: 25px;
  font-weight: 900;
  border-radius: 14px;
  background: linear-gradient(135deg, #60a5fa 0%, #22d3ee 100%);
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.28);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: transparent;
  background: linear-gradient(90deg, #bfdbfe 0%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-text small {
  display: block;
  margin-top: 4px;
  color: #bfdbfe;
  font-size: 12px;
}

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

.nav-links a,
.mobile-panel a {
  border-radius: 12px;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-links a {
  padding: 10px 14px;
  color: #dbeafe;
  font-size: 15px;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.86);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.header-search {
  width: min(280px, 24vw);
  position: relative;
}

.header-search input,
.search-panel input,
.search-panel select {
  width: 100%;
  color: #0f172a;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  outline: 0;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.header-search input {
  padding: 11px 14px 11px 40px;
  color: #e0f2fe;
  background: rgba(30, 58, 138, 0.55);
  border-color: rgba(96, 165, 250, 0.35);
}

.header-search input::placeholder {
  color: rgba(219, 234, 254, 0.76);
}

.header-search::before,
.search-panel .search-box::before {
  content: "⌕";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #93c5fd;
  font-size: 20px;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border: 0;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.65);
}

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

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-panel a {
  display: block;
  padding: 12px 14px;
  color: #dbeafe;
  background: rgba(30, 58, 138, 0.35);
}

.mobile-panel a:hover,
.mobile-panel a.is-active {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.82);
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(110deg, #0b2251 0%, #0f172a 55%, #020617 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease, transform 0.75s ease;
  transform: scale(1.02);
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 36%, rgba(34, 211, 238, 0.22), transparent 32%), linear-gradient(90deg, rgba(11, 34, 81, 0.96) 0%, rgba(15, 23, 42, 0.84) 48%, rgba(2, 6, 23, 0.45) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  padding: 74px 0;
}

.hero-eyebrow,
.section-eyebrow,
.detail-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  background: #dc2626;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

.hero-copy h1 {
  margin: 18px 0 10px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.hero-copy h2 {
  margin: 0 0 18px;
  color: #bfdbfe;
  font-size: clamp(24px, 3.4vw, 42px);
  line-height: 1.15;
  font-weight: 800;
}

.hero-copy p {
  max-width: 650px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.hero-meta {
  margin-bottom: 30px;
  color: #cbd5e1;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 15px 30px rgba(37, 99, 235, 0.34);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.14);
}

.btn-ghost {
  color: #dbeafe;
  border: 1px solid rgba(191, 219, 254, 0.32);
  background: rgba(15, 23, 42, 0.24);
}

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

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

.hero-dot.is-active {
  width: 38px;
  background: #38bdf8;
}

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

.section {
  padding: 56px 0;
}

.section-wide {
  padding: 56px 0;
  background: linear-gradient(90deg, rgba(241, 245, 249, 0.84) 0%, rgba(219, 234, 254, 0.68) 100%);
}

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

.section-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: #64748b;
  line-height: 1.8;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.card-cover {
  position: relative;
  overflow: hidden;
  display: block;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

.movie-grid.compact .card-cover,
.related-card .card-cover {
  aspect-ratio: 3 / 4;
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.72) 100%);
  opacity: 0.88;
}

.badge,
.score-badge,
.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.badge {
  color: #ffffff;
  background: #2563eb;
  padding: 5px 10px;
  font-size: 12px;
}

.card-cover .badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
}

.score-badge {
  color: #ffffff;
  background: #ca8a04;
  padding: 5px 9px;
  font-size: 12px;
}

.card-cover .score-badge {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
}

.card-body {
  padding: 18px;
}

.movie-grid.compact .card-body {
  padding: 14px;
}

.card-title {
  margin: 0 0 8px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
  transition: color 0.22s ease;
}

.movie-grid.compact .card-title {
  font-size: 15px;
}

.movie-card:hover .card-title {
  color: #2563eb;
}

.card-desc {
  min-height: 48px;
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
}

.card-meta {
  color: #64748b;
  font-size: 13px;
  justify-content: space-between;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.card-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #334155;
  background: #f1f5f9;
  font-size: 12px;
}

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

.category-card {
  min-height: 188px;
  padding: 24px;
  border-radius: var(--radius-xl);
  color: #ffffff;
  background: radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.28), transparent 35%), linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(30, 58, 138, 0.25);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.75;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 62px 132px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.rank-number {
  width: 44px;
  height: 44px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
  font-size: 18px;
}

.rank-cover {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: #0f172a;
}

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

.rank-info h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

.rank-info p {
  margin: 0 0 10px;
  color: #64748b;
  line-height: 1.6;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(100deg, #0b2251 0%, #0f766e 100%);
}

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

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.8;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 14px;
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.07);
}

.search-panel .search-box {
  position: relative;
}

.search-panel input,
.search-panel select {
  height: 48px;
  padding: 0 14px;
}

.search-panel input {
  padding-left: 42px;
}

.detail-main {
  padding: 38px 0 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #2563eb;
  font-weight: 700;
}

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

.detail-card,
.related-panel {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  color: #ffffff;
  border: 0;
  background: #020617;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 22px 55px rgba(37, 99, 235, 0.42);
  font-size: 38px;
  transform: translateZ(0);
}

.player-cover:hover .play-circle {
  background: #1d4ed8;
  transform: scale(1.06);
}

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

.detail-body {
  padding: 28px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.detail-body h1 {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  font-weight: 900;
}

.detail-meta {
  margin-bottom: 22px;
  color: #64748b;
}

.detail-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid #e2e8f0;
}

.detail-section h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.detail-section p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
  font-size: 16px;
}

.review-box {
  padding: 22px;
  border-left: 4px solid #f59e0b;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
}

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

.related-panel h2 {
  margin: 0 0 18px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

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

.related-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-card .card-cover {
  border-radius: 14px;
}

.related-card h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 850;
}

.related-card:hover h3 {
  color: #2563eb;
}

.related-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 34px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 28px;
  margin-bottom: 32px;
}

.footer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #ffffff;
  font-weight: 900;
  font-size: 18px;
}

.footer-inner p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.75;
}

.footer-inner h3 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 850;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: #67e8f9;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #64748b;
  font-size: 14px;
}

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

.empty-state {
  display: none;
  padding: 46px 20px;
  text-align: center;
  color: #64748b;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.empty-state.is-visible {
  display: block;
}

@media (max-width: 1180px) {
  .header-search {
    display: none;
  }

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

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

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

  .related-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .header-inner {
    min-height: 68px;
  }

  .nav-links {
    display: none;
  }

  .menu-button {
    display: inline-flex;
    margin-left: auto;
  }

  .brand {
    min-width: 0;
  }

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

  .brand-text small {
    display: none;
  }

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

  .hero-copy {
    padding: 56px 0 84px;
  }

  .section-header,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .rank-list,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rank-item {
    grid-template-columns: 44px 108px minmax(0, 1fr);
    gap: 12px;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .mobile-panel,
  .section,
  .page-main,
  .detail-main,
  .footer-inner,
  .page-hero-inner,
  .hero-content {
    width: min(100% - 24px, 1240px);
  }

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

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

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

  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .rank-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 94px minmax(0, 1fr);
  }

  .related-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .detail-body,
  .related-panel {
    padding: 20px;
  }

  .play-circle {
    width: 72px;
    height: 72px;
    font-size: 31px;
  }
}
