* {
  box-sizing: border-box;
}

:root {
  --mist-950: #020617;
  --mist-900: #0f172a;
  --mist-850: #172033;
  --mist-800: #1e293b;
  --mist-700: #334155;
  --mist-600: #475569;
  --mist-500: #64748b;
  --mist-300: #cbd5e1;
  --mist-200: #e2e8f0;
  --mist-100: #f1f5f9;
  --mist-50: #f8fafc;
  --lake-700: #0369a1;
  --lake-600: #0284c7;
  --lake-500: #0ea5e9;
  --lake-400: #38bdf8;
  --lake-100: #e0f2fe;
  --lake-50: #f0f9ff;
  --sepia-100: #f5f1ea;
  --sepia-50: #faf8f5;
  --white: #ffffff;
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
  --shadow-elevated: 0 18px 50px -18px rgba(15, 23, 42, 0.35);
  --radius-lg: 18px;
  --radius-md: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--mist-900);
  background: linear-gradient(180deg, var(--sepia-50) 0%, var(--white) 46%, var(--mist-50) 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(16px);
}

.nav-wrap,
.sub-nav-inner,
.footer-grid,
.page-shell,
.hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 24px;
}

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

.brand-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: var(--mist-900);
  background: linear-gradient(135deg, var(--lake-400), var(--lake-100));
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.25);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-text small {
  color: var(--mist-300);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
}

.desktop-nav a,
.mobile-nav a,
.sub-nav a {
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.sub-nav a:hover {
  color: var(--lake-400);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: var(--mist-800);
  font-size: 22px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 16px;
  border-top: 1px solid var(--mist-800);
  background: var(--mist-900);
}

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

.mobile-nav a {
  padding: 10px 2px;
  font-size: 15px;
}

.sub-nav {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(30, 41, 59, 0.68);
}

.sub-nav-inner {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0;
}

.sub-nav a {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 999px;
  color: var(--mist-200);
  font-size: 13px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 20% 10%, rgba(14, 165, 233, 0.35), transparent 32%), linear-gradient(120deg, var(--mist-950), var(--mist-800) 55%, #0c4a6e);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% -10%;
  height: 240px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18), transparent 64%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-height: 560px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  align-items: center;
  gap: 56px;
  min-height: 560px;
  padding: 64px 0;
}

.hero-slide.is-active {
  display: grid;
  animation: fade-in 0.45s ease both;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  border: 1px solid rgba(125, 211, 252, 0.32);
  border-radius: 999px;
  color: var(--lake-100);
  background: rgba(14, 165, 233, 0.14);
  font-size: 13px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-lead {
  margin: 0 0 24px;
  color: var(--mist-200);
  font-size: clamp(17px, 2.2vw, 22px);
}

.hero-movie {
  margin: 26px 0;
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.55);
  box-shadow: var(--shadow-soft);
}

.hero-movie h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.hero-movie p {
  margin: 0;
  color: var(--mist-200);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button.primary {
  color: var(--mist-950);
  background: linear-gradient(135deg, var(--lake-400), var(--lake-100));
  box-shadow: 0 12px 26px rgba(56, 189, 248, 0.28);
}

.button.secondary {
  color: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-elevated);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-poster span {
  position: absolute;
  left: 22px;
  bottom: 22px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: var(--white);
  font-size: 13px;
}

.hero-controls {
  position: absolute;
  left: 0;
  bottom: 28px;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.page-shell {
  padding: 48px 0 72px;
}

.page-title {
  margin-bottom: 32px;
  padding: 30px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--white), var(--lake-50));
  box-shadow: var(--shadow-soft);
}

.page-title h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}

.page-title p {
  max-width: 780px;
  margin: 0;
  color: var(--mist-600);
}

.content-section {
  margin: 0 auto 56px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--mist-600);
}

.section-link {
  flex: 0 0 auto;
  color: var(--lake-700);
  font-weight: 700;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--mist-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: var(--shadow-elevated);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--mist-100);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.62));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--lake-700);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--mist-500);
  font-size: 13px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 3.05em;
  margin: 0;
  overflow: hidden;
  color: var(--mist-900);
  font-size: 18px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body h3 a:hover {
  color: var(--lake-700);
}

.card-body p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 10px 0 14px;
  overflow: hidden;
  color: var(--mist-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--lake-700);
  background: var(--lake-100);
  font-size: 12px;
  font-weight: 650;
}

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

.category-card {
  padding: 24px;
  border: 1px solid var(--mist-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2 {
  margin: 0 0 8px;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--mist-600);
}

.category-card strong {
  color: var(--lake-700);
}

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid var(--mist-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.search-input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--mist-200);
  border-radius: 14px;
  outline: none;
  color: var(--mist-900);
  background: var(--mist-50);
  font-size: 16px;
}

.search-input:focus {
  border-color: var(--lake-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.result-count {
  color: var(--mist-500);
  font-size: 14px;
}

.ranking-list {
  display: grid;
  gap: 14px;
  padding: 0;
  list-style: none;
}

.ranking-item {
  display: grid;
  grid-template-columns: 70px 120px 1fr 80px;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--mist-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: var(--mist-950);
  background: linear-gradient(135deg, var(--lake-400), var(--lake-100));
  font-weight: 900;
}

.ranking-item img {
  width: 120px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: var(--mist-100);
}

.ranking-item h2 {
  margin: 0 0 6px;
  font-size: 19px;
}

.ranking-item p {
  margin: 0;
  color: var(--mist-600);
}

.score {
  color: var(--lake-700);
  font-size: 22px;
  font-weight: 900;
  text-align: right;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(270px, 0.36fr) minmax(0, 0.64fr);
  gap: 34px;
  align-items: start;
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  background: var(--mist-100);
  box-shadow: var(--shadow-elevated);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.breadcrumb {
  margin-bottom: 16px;
  color: var(--mist-500);
  font-size: 14px;
}

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

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
}

.detail-lead {
  margin: 18px 0 24px;
  color: var(--mist-700);
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.player-section {
  margin-top: 46px;
}

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

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  color: var(--lake-700);
  background: rgba(255, 255, 255, 0.92);
  font-size: 30px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
}

.player-overlay span:last-child {
  font-size: 18px;
  font-weight: 800;
}

.article-block {
  margin-top: 28px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.article-block h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.article-block p {
  margin: 0;
  color: var(--mist-700);
  font-size: 16px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--mist-200);
  border-radius: var(--radius-md);
  background: var(--white);
}

.compact-poster {
  overflow: hidden;
  border-radius: 12px;
  background: var(--mist-100);
}

.compact-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.compact-card h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.compact-card p {
  margin: 0;
  color: var(--mist-500);
  font-size: 13px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin-top: 32px;
}

.pagination a,
.pagination strong,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.pagination strong {
  color: var(--white);
  background: var(--lake-600);
}

.site-footer {
  color: var(--mist-300);
  background: var(--mist-900);
}

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

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.site-footer p {
  margin: 0;
}

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

.site-footer a:hover {
  color: var(--lake-400);
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
}

.hidden-by-search {
  display: none !important;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .hero-slide,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero-controls {
    right: 0;
    left: auto;
  }

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

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

  .ranking-item {
    grid-template-columns: 48px 96px 1fr;
  }

  .score {
    grid-column: 3;
    text-align: left;
  }
}

@media (max-width: 680px) {
  .nav-wrap,
  .sub-nav-inner,
  .footer-grid,
  .page-shell,
  .hero-inner {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-inner,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide {
    gap: 30px;
    padding: 42px 0 86px;
  }

  .hero-poster img {
    aspect-ratio: 16 / 10;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

  .ranking-item {
    grid-template-columns: 42px 86px 1fr;
    gap: 10px;
  }

  .ranking-item img {
    width: 86px;
  }

  .rank-no {
    width: 42px;
    height: 42px;
  }

  .detail-copy,
  .article-block,
  .page-title {
    padding: 22px;
  }
}
