:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-400: #38bdf8;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --accent-500: #d97706;
  --secondary-50: #f8fafc;
  --secondary-100: #f1f5f9;
  --secondary-200: #e2e8f0;
  --secondary-300: #cbd5e1;
  --secondary-400: #94a3b8;
  --secondary-500: #64748b;
  --secondary-600: #475569;
  --secondary-700: #334155;
  --secondary-900: #0f172a;
  --white: #ffffff;
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, .07), 0 10px 20px -2px rgba(0, 0, 0, .04);
  --shadow-soft-lg: 0 10px 40px -10px rgba(0, 0, 0, .1);
  --radius-lg: 18px;
  --radius-xl: 26px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--secondary-50);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--secondary-900);
  background: var(--secondary-50);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.5;
}

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

button,
input {
  font: inherit;
}

img {
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 1px 8px rgba(15, 23, 42, .06);
  backdrop-filter: blur(12px);
}

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

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
  border-radius: 11px;
  box-shadow: 0 12px 24px rgba(2, 132, 199, .25);
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-more {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  color: var(--secondary-700);
  font-size: 15px;
  font-weight: 650;
  transition: color .2s ease;
}

.nav-link.small {
  color: var(--secondary-500);
  font-size: 14px;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary-600);
}

.nav-toggle {
  display: none;
  border: 0;
  color: var(--secondary-700);
  background: transparent;
  cursor: pointer;
  font-size: 26px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-input,
.local-filter-input {
  width: 220px;
  border: 1px solid var(--secondary-300);
  border-radius: 12px;
  background: var(--white);
  color: var(--secondary-900);
  outline: none;
  padding: 10px 12px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.search-input:focus,
.local-filter-input:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, .12);
}

.search-button,
.btn,
.section-link,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.search-button {
  padding: 10px 14px;
  color: var(--white);
  background: var(--primary-600);
}

.search-button:hover,
.btn.primary:hover {
  background: var(--primary-700);
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: var(--secondary-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 70% 30%, rgba(56, 189, 248, .35), transparent 30%), linear-gradient(135deg, #020617, #0f172a 50%, #082f49);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, .92), rgba(0, 0, 0, .54) 48%, rgba(0, 0, 0, .08));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding-bottom: 72px;
}

.hero-copy {
  max-width: 760px;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 7px 12px;
  color: var(--primary-100);
  background: rgba(2, 132, 199, .5);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero h1,
.hero h2 {
  margin: 0;
  font-size: clamp(36px, 7vw, 68px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.05em;
}

.hero p {
  max-width: 680px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: 18px;
}

.hero-tags,
.tag-row,
.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.meta-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .16);
}

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

.btn {
  min-height: 46px;
  padding: 0 20px;
}

.btn.primary {
  color: var(--white);
  background: var(--primary-600);
  box-shadow: 0 14px 30px rgba(2, 132, 199, .3);
}

.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .22);
}

.btn:hover,
.search-button:hover,
.filter-button:hover,
.section-link:hover {
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  color: var(--white);
  background: rgba(0, 0, 0, .5);
  border-radius: 999px;
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.page-stack {
  padding: 56px 0 16px;
}

.content-section,
.article-panel,
.filter-panel,
.search-panel {
  margin-bottom: 56px;
  padding: 26px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

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

.section-head h2,
.page-title h1,
.article-panel h2 {
  margin: 0;
  color: var(--secondary-900);
  font-weight: 850;
  letter-spacing: -.03em;
}

.section-head h2 {
  font-size: 28px;
}

.section-head p,
.page-title p,
.article-panel p,
.category-large p,
.category-card p,
.site-footer p,
.movie-card-body p,
.detail-lead {
  color: var(--secondary-600);
}

.section-head p {
  margin: 6px 0 0;
}

.section-link {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  color: var(--primary-700);
  background: var(--primary-50);
}

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--secondary-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.movie-card:hover {
  border-color: rgba(2, 132, 199, .3);
  box-shadow: var(--shadow-soft-lg);
  transform: translateY(-4px);
}

.poster-wrap,
.category-large-media,
.detail-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: radial-gradient(circle at 70% 25%, rgba(56, 189, 248, .28), transparent 32%), linear-gradient(135deg, #020617, #0f172a 60%, #082f49);
}

.poster-wrap {
  aspect-ratio: 2 / 3;
}

.poster-img,
.category-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.movie-card:hover .poster-img,
.category-card:hover .category-bg,
.category-large:hover .category-bg {
  transform: scale(1.05);
}

.movie-badge,
.play-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
}

.movie-badge {
  top: 10px;
  left: 10px;
  min-height: 26px;
  padding: 0 9px;
  background: rgba(2, 132, 199, .9);
  border-radius: 999px;
  font-size: 12px;
}

.play-badge {
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  background: rgba(0, 0, 0, .55);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.rank-badge {
  top: 10px;
  right: 10px;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  background: var(--accent-500);
  border-radius: 12px;
  font-size: 13px;
}

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

.movie-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: var(--secondary-900);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover {
  color: var(--primary-600);
}

.movie-meta {
  margin-top: 8px;
  color: var(--secondary-500);
  font-size: 13px;
  font-weight: 650;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 40px;
  margin: 9px 0 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span,
.meta-chips span {
  color: var(--primary-700);
  background: var(--primary-50);
}

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

.category-card {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  padding: 22px;
  color: var(--white);
  background: var(--secondary-900);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.category-card .category-bg {
  position: absolute;
  inset: 0;
  opacity: .38;
}

.category-card:after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(15, 23, 42, .2), rgba(15, 23, 42, .92));
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  display: block;
  margin-top: 44px;
  font-size: 22px;
  font-weight: 850;
}

.category-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
}

.inner-page {
  padding: 30px 0 16px;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--secondary-500);
  font-size: 14px;
}

.crumb a {
  color: var(--primary-700);
  font-weight: 700;
}

.crumb span:before,
.crumb a + a:before,
.crumb a + span:before {
  color: var(--secondary-400);
  content: "/";
  margin-right: 8px;
}

.page-title {
  margin-bottom: 28px;
  padding: 32px;
  background: linear-gradient(135deg, var(--white), var(--primary-50));
  border: 1px solid rgba(2, 132, 199, .08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.page-title.compact {
  padding: 28px;
}

.page-title h1 {
  font-size: clamp(32px, 5vw, 48px);
}

.page-title p {
  max-width: 780px;
  margin: 12px 0 0;
  font-size: 17px;
}

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

.category-large {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--secondary-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}

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

.category-large-media {
  aspect-ratio: 16 / 11;
  border-radius: 18px;
}

.category-large h2 {
  margin: 0;
  font-size: 22px;
}

.category-large p {
  margin: 8px 0 0;
  font-size: 14px;
}

.filter-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding: 18px;
}

.local-filter-input {
  width: 260px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  min-height: 36px;
  padding: 0 13px;
  color: var(--secondary-700);
  background: var(--secondary-100);
}

.filter-button.is-active {
  color: var(--white);
  background: var(--primary-600);
}

.detail-page {
  padding: 30px 0 16px;
}

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

.player-card,
.detail-side,
.article-panel {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.player-card {
  padding: 14px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 20px;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(2, 132, 199, .44), rgba(0, 0, 0, .68));
  cursor: pointer;
  font-size: 18px;
  font-weight: 850;
}

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

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  padding-left: 4px;
  color: var(--primary-700);
  background: rgba(255, 255, 255, .96);
  border-radius: 999px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
  font-size: 34px;
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  min-height: 0;
  color: var(--white);
  text-align: center;
  font-size: 14px;
}

.detail-side {
  padding: 18px;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 20px;
}

.detail-side h1 {
  margin: 18px 0 12px;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -.04em;
}

.meta-chips {
  margin-bottom: 14px;
}

.detail-lead {
  margin: 0;
  font-size: 15px;
}

.detail-tags {
  margin-top: 16px;
}

.article-panel {
  padding: 28px;
}

.article-panel h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 24px;
}

.article-panel h2 + p {
  margin-top: 0;
}

.article-panel p {
  margin-bottom: 24px;
  font-size: 17px;
  line-height: 1.9;
}

.related-section {
  margin-top: 28px;
}

.search-form.large {
  align-items: stretch;
  width: min(680px, 100%);
}

.search-form.large .search-input {
  width: 100%;
}

.search-status {
  min-height: 26px;
  margin-bottom: 18px;
  color: var(--secondary-600);
  font-weight: 650;
}

.site-footer {
  margin-top: 56px;
  color: var(--white);
  background: var(--secondary-900);
}

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

.footer-brand {
  margin-bottom: 12px;
  font-size: 22px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: var(--secondary-400);
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

.footer-links a {
  color: var(--secondary-400);
  font-size: 14px;
  transition: color .2s ease;
}

.footer-links a:hover {
  color: var(--primary-400);
}

.footer-bottom {
  padding: 18px 0 24px;
  color: var(--secondary-400);
  border-top: 1px solid rgba(148, 163, 184, .16);
  font-size: 14px;
}

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

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px 16px 22px;
    background: rgba(255, 255, 255, .98);
    border-top: 1px solid var(--secondary-200);
    box-shadow: var(--shadow-soft);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-more {
    flex-wrap: wrap;
  }

  .search-form {
    width: 100%;
  }

  .search-input {
    width: 100%;
  }

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    column-gap: 20px;
  }

  .detail-poster {
    grid-row: span 4;
  }
}

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

  .hero {
    height: 560px;
  }

  .hero-content {
    padding-bottom: 78px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .section-head,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

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

  .content-section,
  .article-panel,
  .filter-panel,
  .search-panel,
  .page-title {
    padding: 18px;
    border-radius: 20px;
  }

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

  .category-large-media {
    aspect-ratio: 16 / 9;
  }

  .detail-side {
    display: block;
  }

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

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

@media (max-width: 460px) {
  .movie-grid,
  .category-grid,
  .category-large-grid {
    grid-template-columns: 1fr;
  }

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

  .hero h1,
  .hero h2 {
    font-size: 36px;
  }
}
