* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(30, 41, 59, 0.56);
  --panel-strong: rgba(15, 23, 42, 0.88);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --teal: #14b8a6;
  --teal-soft: rgba(20, 184, 166, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  backdrop-filter: blur(14px);
}

.nav-bar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand {
  font-size: 21px;
}

.brand-icon {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #cbd5e1;
  font-weight: 600;
}

.nav-links a,
.mobile-menu a,
.footer-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover,
.footer-links a:hover {
  color: #2dd4bf;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #cbd5e1;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(51, 65, 85, 0.9);
  padding: 12px 24px 18px;
  background: #0f172a;
}

.mobile-menu a {
  display: block;
  padding: 11px 0;
  color: #cbd5e1;
  font-weight: 650;
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(0deg, #020617 2%, rgba(2, 6, 23, 0));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  padding-top: 64px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #2dd4bf;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-info p {
  margin: 0 0 26px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

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

.hero-tags span,
.detail-meta span,
.tag-list span {
  color: #ccfbf1;
  background: var(--teal-soft);
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 14px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  background: var(--teal);
  color: #ffffff;
  box-shadow: 0 14px 36px rgba(20, 184, 166, 0.28);
}

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

.primary-btn:hover {
  background: #0d9488;
}

.ghost-btn {
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 28px;
  background: var(--teal);
}

.quick-search,
.catalog-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 24px;
  align-items: end;
  padding: 52px 0 22px;
}

.quick-search h2,
.section-heading h2,
.text-panel h2,
.site-footer h2 {
  margin: 0;
  color: var(--text);
}

.quick-search h2,
.section-heading h2 {
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.03em;
}

.quick-search p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.search-box input,
.catalog-tools input,
.catalog-tools select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.82);
  outline: none;
  padding: 0 16px;
}

.search-box input:focus,
.catalog-tools input:focus,
.catalog-tools select:focus {
  border-color: rgba(45, 212, 191, 0.72);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.13);
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 28px;
}

.category-chips a {
  padding: 12px 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.52);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.category-chips a:hover {
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.16);
  transform: translateY(-2px);
}

.section-block {
  padding: 48px 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-heading span {
  display: block;
  margin-bottom: 6px;
  color: #2dd4bf;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading a {
  color: #2dd4bf;
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
}

.movie-card.is-hidden,
.rank-row.is-hidden {
  display: none;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: #0f172a;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

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

.poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.08) 55%, rgba(2, 6, 23, 0));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.poster-type,
.poster-year,
.poster-region,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 9px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.poster-type {
  top: 12px;
  left: 12px;
  background: rgba(20, 184, 166, 0.82);
  color: #ffffff;
}

.poster-year {
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
}

.poster-region {
  right: 12px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.62);
  color: #ffffff;
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(20, 184, 166, 0.42);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(20, 184, 166, 0.88);
  opacity: 0;
  transform: translate(-50%, -40%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 13px 2px 0;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #2dd4bf;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: 9px;
  color: #94a3b8;
  font-size: 13px;
}

.card-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horizontal-list {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 16px;
  scrollbar-width: thin;
}

.horizontal-list .movie-card {
  width: 320px;
  flex: 0 0 320px;
}

.review-list {
  display: grid;
  gap: 18px;
}

.review-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(12px);
  transition: transform 0.22s ease, background 0.22s ease;
}

.review-card:hover {
  transform: translateY(-3px);
  background: rgba(30, 41, 59, 0.82);
}

.review-cover {
  min-height: 178px;
  border-radius: 14px;
  background-position: center;
  background-size: cover;
}

.review-text strong,
.review-text em,
.review-text span {
  display: block;
}

.review-text strong {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 23px;
}

.review-text em {
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.75;
}

.review-text span {
  margin-top: 16px;
  color: #94a3b8;
}

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

.curated-grid .movie-card-wide:first-child {
  grid-column: span 2;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.52);
}

.rank-number {
  color: #2dd4bf;
  font-weight: 900;
  font-size: 20px;
}

.rank-title {
  overflow: hidden;
  color: #ffffff;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: #94a3b8;
  font-size: 13px;
}

.page-main {
  padding-top: 64px;
}

.page-hero {
  min-height: 330px;
  display: flex;
  align-items: center;
  padding: 64px 0 42px;
}

.compact-hero {
  min-height: 270px;
}

.page-hero > div {
  max-width: 760px;
}

.catalog-tools {
  grid-template-columns: 1fr 220px 220px;
  padding-top: 20px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
  min-height: 290px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.68), rgba(15, 23, 42, 0.8));
}

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

.category-overview-head p {
  margin: 0 0 24px;
  color: #cbd5e1;
  line-height: 1.7;
}

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

.category-mini-posters a {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  border-radius: 14px;
  background-position: center;
  background-size: cover;
}

.category-mini-posters span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
}

.empty-state {
  display: none;
  margin: 36px 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #94a3b8;
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  padding-top: 32px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #2dd4bf;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  padding: 42px 0 34px;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  background-color: #0f172a;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: clamp(34px, 6vw, 58px);
}

.detail-meta {
  margin-bottom: 18px;
}

.player-section {
  padding: 20px 0 50px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(20, 184, 166, 0.9);
  box-shadow: 0 16px 44px rgba(20, 184, 166, 0.35);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-start span {
  margin-left: 5px;
  font-size: 34px;
}

.player-shell.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.88);
}

.player-caption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  padding: 8px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.58);
  font-size: 14px;
}

.player-shell.is-playing .player-caption {
  opacity: 0;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-bottom: 36px;
}

.text-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.text-panel h2 {
  margin-bottom: 16px;
  font-size: 25px;
}

.text-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.85;
}

.neighbor-links {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 28px;
}

.neighbor-links a {
  max-width: 48%;
  overflow: hidden;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.52);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.neighbor-links a:hover {
  color: #2dd4bf;
  border-color: rgba(45, 212, 191, 0.35);
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(51, 65, 85, 0.9);
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 42px 0;
}

.footer-brand {
  margin-bottom: 14px;
  font-size: 19px;
}

.site-footer p,
.footer-links a {
  color: #94a3b8;
  line-height: 1.7;
}

.site-footer h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

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

.footer-bottom {
  padding: 18px 0 26px;
  border-top: 1px solid rgba(51, 65, 85, 0.64);
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

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

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

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

  .menu-toggle {
    display: block;
  }

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

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

  .quick-search,
  .catalog-tools,
  .detail-layout,
  .detail-content,
  .footer-grid,
  .review-card,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .curated-grid,
  .rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-poster {
    max-width: 340px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1280px);
  }

  .brand {
    font-size: 18px;
  }

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

  .hero p,
  .page-hero p,
  .detail-info p {
    font-size: 16px;
  }

  .hero-controls {
    bottom: 18px;
  }

  .movie-grid,
  .curated-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .horizontal-list .movie-card {
    width: 82vw;
    flex-basis: 82vw;
  }

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

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

  .rank-meta {
    display: none;
  }

  .player-start {
    width: 66px;
    height: 66px;
  }

  .neighbor-links {
    flex-direction: column;
  }

  .neighbor-links a {
    max-width: none;
  }
}
