:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --sky: #0ea5e9;
  --sky-dark: #0369a1;
  --rose: #f43f5e;
  --amber: #f59e0b;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f1f5f9 100%);
  font-family: Inter, 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: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(16px);
}

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

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9 48%, #0369a1);
  border-radius: 11px;
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.32);
}

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

.nav-links a {
  padding: 10px 14px;
  color: #475569;
  border-radius: 999px;
  font-weight: 650;
  transition: 180ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--sky-dark);
  background: #e0f2fe;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #334155;
  background: #f1f5f9;
  cursor: pointer;
}

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

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(115deg, #0f172a, #334155);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
}

.hero-slide.active {
  opacity: 1;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.58) 45%, rgba(15, 23, 42, 0.20) 100%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100% - 1180px) / 2));
  right: max(32px, calc((100% - 1180px) / 2));
  bottom: 72px;
  max-width: 760px;
  color: #ffffff;
}

.hero-pill,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-bottom: 16px;
  padding: 8px 13px;
  color: #ffffff;
  background: rgba(14, 165, 233, 0.92);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.25);
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
}

.hero-content p {
  max-width: 650px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.75;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
}

.hero-meta span,
.detail-meta span {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.btn,
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  color: var(--sky-dark);
  background: #e0f2fe;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: 180ms ease;
}

.btn.primary,
.search-form button {
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.30);
}

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

.btn.small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

.btn:hover,
.search-form button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.50);
  cursor: pointer;
  transition: 180ms ease;
}

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

.page-space {
  padding: 38px 0 80px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 34px;
  padding: 48px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.90), transparent 30%), linear-gradient(135deg, #0f172a, #1e3a8a 52%, #0369a1);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.page-hero.compact h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
  letter-spacing: -0.04em;
}

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

.home-search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: -42px;
  margin-bottom: 62px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

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

.search-form,
.filter-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-form input,
.filter-box input,
.filter-box select {
  width: min(420px, 55vw);
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
}

.filter-box {
  flex-wrap: wrap;
  margin-top: 24px;
}

.filter-box.wide input {
  width: min(520px, 70vw);
}

.section-block {
  margin-bottom: 78px;
}

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

.section-title h2,
.section-title h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-title.small {
  margin: 30px 0 16px;
}

.section-title.small h3 {
  font-size: 22px;
}

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

.title-icon {
  font-size: 24px;
}

.title-bar {
  width: 5px;
  height: 28px;
  border-radius: 999px;
  background: var(--sky);
}

.title-bar.pink { background: #ec4899; }
.title-bar.blue { background: #3b82f6; }
.title-bar.red { background: #ef4444; }
.title-bar.green { background: #22c55e; }
.title-bar.amber { background: #f59e0b; }
.title-bar.purple { background: #8b5cf6; }
.title-bar.cyan { background: #06b6d4; }
.title-bar.rose { background: #f43f5e; }
.title-bar.emerald { background: #10b981; }
.title-bar.orange { background: #f97316; }

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.80);
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transition: 220ms ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 48px rgba(15, 23, 42, 0.16);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e2e8f0;
}

.movie-card.large .poster-wrap {
  aspect-ratio: 16 / 10;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 420ms ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), transparent 62%);
  transition: 220ms ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: 220ms ease;
  backdrop-filter: blur(10px);
}

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

.poster-badge,
.rank-number {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.rank-number {
  left: 10px;
  right: auto;
  background: rgba(244, 63, 94, 0.88);
}

.card-body {
  display: block;
  padding: 14px;
}

.card-body strong,
.horizontal-info strong,
.rank-info strong {
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: 16px;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: 180ms ease;
}

.movie-card:hover .card-body strong,
.horizontal-card:hover strong,
.rank-card:hover .rank-info strong {
  color: var(--sky-dark);
}

.card-body small,
.horizontal-info small,
.rank-info small {
  display: block;
  margin: 6px 0;
  color: #64748b;
  font-size: 12px;
}

.card-line,
.horizontal-info span,
.rank-info span {
  display: -webkit-box;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-card-block {
  padding: 38px;
  background: linear-gradient(135deg, #f0f9ff, #dbeafe);
  border-radius: 34px;
}

.category-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.category-button {
  display: block;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 20px;
  transition: 180ms ease;
}

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

.category-button strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.category-button span {
  display: block;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

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

.rail-item {
  width: 210px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.84);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: 180ms ease;
}

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

.horizontal-card img {
  width: 128px;
  height: 170px;
  object-fit: cover;
  border-radius: 14px;
}

.horizontal-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-overview-list {
  display: grid;
  gap: 26px;
}

.category-overview-card {
  padding: 28px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 26px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.category-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.category-overview-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.category-overview-head p {
  margin: 0;
  color: #64748b;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px 14px 14px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: 180ms ease;
}

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

.rank-left {
  display: grid;
  grid-template-columns: 42px 70px;
  align-items: center;
  gap: 8px;
}

.rank-left strong {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  border-radius: 14px;
  font-size: 17px;
}

.rank-left img {
  width: 70px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-hot {
  padding: 8px 12px;
  color: #92400e;
  background: #fef3c7;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

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

.breadcrumb a {
  color: var(--sky-dark);
  font-weight: 700;
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
  border-radius: 24px;
  box-shadow: 0 28px 60px rgba(2, 6, 23, 0.32);
}

.player-shell video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: #ffffff;
  background: #020617;
  cursor: pointer;
}

.player-cover.is-hidden {
  display: none;
}

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

.player-mask {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.12), rgba(2, 6, 23, 0.55));
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(14, 165, 233, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  font-size: 38px;
  transform: translate(-50%, -50%);
  box-shadow: 0 20px 42px rgba(14, 165, 233, 0.38);
}

.detail-card,
.review-card,
.side-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.detail-card,
.review-card {
  padding: 30px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-card .detail-meta span {
  color: var(--sky-dark);
  background: #e0f2fe;
  font-weight: 800;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}

.tag-list span {
  padding: 7px 10px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.detail-card section,
.review-card {
  border-top: 1px solid #e5e7eb;
  padding-top: 22px;
  margin-top: 22px;
}

.detail-card section:first-of-type {
  margin-top: 0;
}

.detail-card h2,
.review-card h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-card p,
.review-card p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
  white-space: pre-line;
}

.detail-side {
  position: sticky;
  top: 92px;
}

.side-card {
  padding: 22px;
}

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

.side-list .horizontal-card {
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.side-list .horizontal-card img {
  width: 88px;
  height: 118px;
}

.site-footer {
  margin-top: 70px;
  padding: 46px 0;
  background: linear-gradient(180deg, #f8fafc, #e2e8f0);
  border-top: 1px solid #e2e8f0;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  gap: 16px;
  color: #64748b;
}

.footer-inner p {
  max-width: 620px;
  margin: 0;
  line-height: 1.7;
}

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

.footer-links a {
  color: var(--sky-dark);
  font-weight: 700;
}

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

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

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-nav {
    height: auto;
    min-height: 64px;
    padding: 12px 0;
    align-items: flex-start;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

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

  .hero-slider {
    min-height: 620px;
  }

  .hero-content {
    left: 24px;
    right: 24px;
    bottom: 78px;
  }

  .hero-arrow {
    display: none;
  }

  .home-search-panel,
  .category-overview-head,
  .rank-card {
    grid-template-columns: 1fr;
    display: grid;
  }

  .home-search-panel {
    margin-top: -24px;
  }

  .search-form,
  .filter-box {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .search-form input,
  .filter-box input,
  .filter-box select,
  .filter-box.wide input {
    width: 100%;
  }

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

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

  .category-card-block,
  .page-hero,
  .detail-card,
  .review-card {
    padding: 24px;
    border-radius: 24px;
  }

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

  .horizontal-card img {
    width: 96px;
    height: 128px;
  }

  .rank-hot {
    width: max-content;
  }
}
