:root {
  --cyan: #0891b2;
  --cyan-dark: #0e7490;
  --blue: #2563eb;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.14);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--slate-800);
  background: linear-gradient(180deg, var(--slate-50), #ffffff 42%, var(--slate-50));
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 15px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 20px rgba(8, 145, 178, 0.26);
}

.brand-text {
  font-size: 26px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link,
.mobile-link {
  color: var(--slate-700);
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--cyan);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--slate-100);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--slate-700);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  background: white;
}

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

.main-shell {
  min-height: 70vh;
  padding: 32px 0 72px;
}

.page-stack {
  display: grid;
  gap: 64px;
}

.hero-slider {
  position: relative;
  height: min(600px, 78vh);
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: clamp(28px, 6vw, 56px);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.10), rgba(15, 23, 42, 0.64) 46%, rgba(2, 6, 23, 0.88));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  color: white;
}

.hero-kicker,
.detail-category,
.page-hero span,
.category-card > span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: white;
  font-size: 13px;
  font-weight: 800;
  background: var(--cyan);
}

.hero-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-actions,
.detail-meta,
.detail-tags,
.category-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.primary-button,
.search-panel button {
  color: white;
  background: var(--cyan);
  box-shadow: 0 12px 22px rgba(8, 145, 178, 0.24);
}

.primary-button:hover,
.search-panel button:hover {
  background: var(--cyan-dark);
  transform: translateY(-1px);
}

.ghost-button {
  color: white;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: white;
  font-size: 36px;
  line-height: 1;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transform: translateY(-50%);
}

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

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: white;
}

.search-hero,
.page-hero,
.content-block,
.detail-card,
.article-card,
.ranking-box,
.category-card {
  border-radius: var(--radius-xl);
  background: white;
  box-shadow: var(--shadow-md);
}

.search-hero {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 460px);
  gap: 24px;
  align-items: center;
  padding: clamp(24px, 4vw, 36px);
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

.search-hero h2,
.section-heading h2,
.ranking-box h2,
.article-card h2,
.category-card h2,
.page-hero h1 {
  margin: 0;
  color: var(--slate-800);
  font-weight: 850;
  letter-spacing: -0.03em;
}

.search-hero h2,
.section-heading h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.search-hero p,
.section-heading p,
.page-hero p,
.category-card p {
  margin: 8px 0 0;
  color: var(--slate-600);
  line-height: 1.8;
}

.search-panel {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 16px;
  background: white;
  box-shadow: inset 0 0 0 1px var(--slate-200);
}

.search-panel input,
.catalog-search {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  color: var(--slate-800);
  background: var(--slate-50);
  outline: none;
}

.search-panel input:focus,
.catalog-search:focus {
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.18);
}

.content-block {
  padding: clamp(22px, 4vw, 36px);
}

.cyan-block {
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

.soft-block {
  background: rgba(255, 255, 255, 0.92);
}

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

.section-heading > div {
  display: grid;
  gap: 8px;
}

.heading-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--cyan);
  background: #ecfeff;
}

.section-more {
  color: var(--cyan);
  font-weight: 800;
}

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

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

.four-col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  color: var(--slate-800);
  background: white;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.movie-cover {
  position: relative;
  height: 270px;
  overflow: hidden;
  background: var(--slate-200);
}

.movie-card-large .movie-cover {
  height: 320px;
}

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

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

.card-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  background: var(--cyan);
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.play-icon {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 48px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.45));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-icon {
  opacity: 1;
}

.movie-card-body {
  padding: 16px;
}

.movie-card-body h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 9px;
  overflow: hidden;
  color: var(--slate-800);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.movie-card-foot,
.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--slate-500);
  font-size: 12px;
}

.tag-pills,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pills span,
.detail-tags span,
.movie-meta span,
.detail-meta span,
.category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 8px;
  color: var(--slate-600);
  background: var(--slate-100);
}

.movie-card-horizontal {
  display: flex;
  gap: 16px;
  min-height: 150px;
}

.movie-card-horizontal .movie-cover {
  width: 180px;
  height: auto;
  min-height: 150px;
  flex: 0 0 180px;
}

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

.movie-rail {
  display: grid;
  grid-auto-columns: 280px;
  grid-auto-flow: column;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
}

.rail-item {
  scroll-snap-align: start;
}

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

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

.ranking-box {
  padding: 24px;
}

.ranking-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.ranking-list .movie-card-horizontal {
  min-height: 116px;
}

.ranking-list .movie-card-horizontal .movie-cover {
  width: 112px;
  min-height: 116px;
  flex-basis: 112px;
}

.ranking-list .movie-card-body h3 {
  min-height: auto;
  font-size: 15px;
}

.ranking-list .movie-card-body p {
  display: none;
}

.page-hero {
  padding: clamp(30px, 5vw, 54px);
  background: linear-gradient(135deg, #ecfeff, #eff6ff 48%, #ffffff);
}

.page-hero h1 {
  margin-top: 16px;
  font-size: clamp(34px, 5vw, 54px);
}

.compact-hero p {
  max-width: 760px;
  font-size: 17px;
}

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

.category-card {
  padding: 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-mini-links a {
  max-width: 100%;
  padding: 7px 10px;
  overflow: hidden;
  border-radius: 999px;
  color: var(--cyan-dark);
  background: #ecfeff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-chip-row {
  align-items: center;
}

.category-chip {
  color: var(--slate-700);
  font-weight: 800;
}

.category-chip:hover,
.category-chip.active {
  color: white;
  background: var(--cyan);
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-md);
}

.no-result {
  display: none;
  color: var(--slate-500);
  font-size: 14px;
  white-space: nowrap;
}

.no-result.is-visible {
  display: inline-flex;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-500);
  font-size: 14px;
}

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

.detail-card {
  overflow: hidden;
}

.player-box {
  position: relative;
  overflow: hidden;
  background: black;
}

.player-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.74));
  cursor: pointer;
}

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

.big-play {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  font-size: 34px;
  background: var(--cyan);
  box-shadow: 0 16px 32px rgba(8, 145, 178, 0.35);
}

.player-overlay strong {
  font-size: clamp(20px, 4vw, 32px);
}

.detail-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  padding: clamp(22px, 4vw, 34px);
}

.detail-cover {
  overflow: hidden;
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}

.detail-cover img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.detail-info h1 {
  margin: 16px 0 14px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.detail-one-line {
  margin: 0 0 20px;
  color: var(--slate-700);
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags span {
  color: var(--cyan-dark);
  background: #ecfeff;
}

.article-card {
  padding: clamp(24px, 4vw, 40px);
}

.article-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.article-card h2:not(:first-child) {
  margin-top: 34px;
}

.article-card p {
  margin: 0;
  color: var(--slate-700);
  font-size: 17px;
  line-height: 2;
  white-space: pre-line;
}

.top-rank-list .movie-card-horizontal:first-child {
  border: 2px solid rgba(8, 145, 178, 0.24);
}

.sticky-rank {
  position: sticky;
  top: 96px;
}

.site-footer {
  margin-top: 40px;
  padding: 48px 0 0;
  color: #cbd5e1;
  background: var(--slate-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: white;
  font-size: 22px;
}

.footer-about p {
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: white;
}

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

.site-footer a:hover {
  color: #22d3ee;
}

.footer-bottom {
  margin-top: 36px;
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #64748b;
  text-align: center;
}

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1080px) {
  .four-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .sticky-rank {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .header-inner {
    min-height: 66px;
  }

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

  .main-shell {
    padding-top: 20px;
  }

  .page-stack {
    gap: 36px;
  }

  .hero-slider {
    height: 540px;
    border-radius: 18px;
  }

  .hero-control {
    display: none;
  }

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

  .search-panel {
    flex-direction: column;
  }

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

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

  .detail-cover img {
    height: auto;
    max-height: 460px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

  .hero-slide {
    padding: 24px;
  }

  .hero-content h1 {
    font-size: 34px;
  }

  .three-col,
  .four-col,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-cover,
  .movie-card-large .movie-cover {
    height: 285px;
  }

  .movie-card-horizontal {
    gap: 12px;
  }

  .movie-card-horizontal .movie-cover {
    width: 124px;
    min-height: 132px;
    flex-basis: 124px;
  }

  .movie-card-horizontal .movie-card-body h3 {
    font-size: 16px;
  }

  .movie-card-horizontal .movie-card-body p {
    display: none;
  }

  .content-block,
  .ranking-box,
  .article-card,
  .page-hero {
    padding: 20px;
    border-radius: 18px;
  }

  .catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}
