:root {
  color-scheme: light;
  --bg: #f9fafb;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --soft: #e5e7eb;
  --line: #edf2f7;
  --brand: #10b981;
  --brand-dark: #059669;
  --brand-deep: #0f766e;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 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-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
}

.brand-name {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: transparent;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand-deep));
  -webkit-background-clip: text;
  background-clip: text;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #374151;
  font-weight: 650;
}

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

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: var(--brand-dark);
}

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

.search-entry {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 12px;
  color: #374151;
  background: #f3f4f6;
  font-weight: 700;
}

.search-entry:hover {
  color: var(--brand-dark);
  background: #ecfdf5;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: #374151;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #eef2f7;
}

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

.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 22px;
  display: grid;
  gap: 14px;
  font-weight: 700;
}

.mobile-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef2f7;
}

.mobile-cats a {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f9fafb;
}

.hero-section {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 92vw);
  color: #ffffff;
}

.hero-kicker,
.section-heading span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #34d399;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 16px 0;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.04;
  font-weight: 950;
  text-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}

.hero-copy p {
  margin: 0;
  max-width: 620px;
  color: #e5e7eb;
  font-size: 19px;
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
  color: #d1d5db;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 13px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.35);
}

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

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

.ghost-btn.dark {
  color: #111827;
  border-color: #d1d5db;
  background: #ffffff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-search {
  margin-top: -42px;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.quick-search h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.content-card h2 {
  margin: 0;
  font-weight: 950;
  color: #111827;
}

.quick-search p,
.page-hero p,
.category-card p,
.overview-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.quick-search-form {
  display: flex;
  gap: 10px;
}

.quick-search-form input,
.filter-row input,
.filter-row select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 0 14px;
  color: #111827;
  background: #ffffff;
  outline: none;
}

.quick-search-form input:focus,
.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.quick-search-form button {
  min-width: 96px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: var(--brand-dark);
  font-weight: 850;
}

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

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

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

.section-heading a {
  color: var(--brand-dark);
  font-weight: 850;
}

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

.wide-grid,
.rank-grid,
.catalogue-grid,
.related-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16);
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

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

.movie-poster-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.72));
  opacity: 0;
  transition: opacity 0.24s ease;
}

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

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.9);
  font-size: 12px;
  font-weight: 850;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 950;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.25);
}

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

.movie-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card h3 a:hover {
  color: var(--brand-dark);
}

.movie-meta {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  margin: 10px 0 0;
  min-height: 44px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.65;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 750;
}

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

.category-card,
.overview-card,
.content-card,
.filter-panel {
  border: 1px solid #eef2f7;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.category-card,
.overview-card {
  padding: 20px;
}

.category-card-link,
.overview-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.category-card-link span,
.overview-card h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 950;
}

.category-card-link strong,
.overview-card-head > a {
  color: var(--brand-dark);
  font-size: 14px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

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

.mini-movie {
  display: grid;
  gap: 6px;
  color: #374151;
  font-size: 12px;
  font-weight: 750;
}

.mini-movie img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #111827;
}

.mini-movie span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  margin-top: 34px;
  padding: 52px;
  border-radius: 26px;
  color: #111827;
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 35%), linear-gradient(135deg, #ffffff, #f0fdf4);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin-top: 10px;
  font-size: clamp(30px, 5vw, 48px);
}

.category-hero {
  display: flex;
  align-items: center;
  min-height: 260px;
}

.filter-panel {
  margin-bottom: 24px;
  padding: 18px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.7fr;
  gap: 14px;
}

.filter-row label {
  display: grid;
  gap: 8px;
  color: #374151;
  font-size: 13px;
  font-weight: 850;
}

.empty-state {
  display: none;
  margin: 16px 0 0;
  padding: 18px;
  border-radius: 14px;
  color: #6b7280;
  background: #f9fafb;
  text-align: center;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 28px;
  color: #6b7280;
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 24px;
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.detail-info h1 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.15;
}

.detail-one-line {
  margin: 16px 0 0;
  color: #374151;
  font-size: 18px;
  line-height: 1.75;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
}

.detail-meta span {
  color: #065f46;
  background: #ecfdf5;
}

.detail-tags {
  margin: 20px 0 24px;
}

.player-section {
  padding-top: 42px;
}

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

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

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.76));
}

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

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  font-size: 30px;
  box-shadow: 0 18px 35px rgba(16, 185, 129, 0.35);
}

.player-overlay strong {
  font-size: 20px;
  letter-spacing: 0.04em;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding-top: 28px;
}

.content-card {
  padding: 26px;
}

.content-card h2 {
  font-size: 24px;
}

.content-card p {
  margin: 14px 0 0;
  color: #374151;
  line-height: 1.9;
}

.site-footer {
  margin-top: 70px;
  color: #e5e7eb;
  background: linear-gradient(135deg, #111827, #1f2937, #111827);
}

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

.site-footer h2 {
  margin: 0 0 14px;
  color: #6ee7b7;
  font-size: 18px;
  font-weight: 900;
}

.site-footer p,
.site-footer li {
  color: #d1d5db;
  line-height: 1.8;
  font-size: 14px;
}

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

.site-footer a:hover {
  color: #6ee7b7;
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

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

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

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

@media (max-width: 820px) {
  .desktop-nav,
  .search-entry {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .hero-section {
    height: 520px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .quick-search-form {
    flex-direction: column;
  }

  .movie-grid,
  .wide-grid,
  .rank-grid,
  .catalogue-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

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

  .filter-row {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 34px 24px;
  }

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

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

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

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

  .brand-name {
    font-size: 19px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

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

  .hero-meta span {
    min-height: 30px;
    font-size: 13px;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

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

  .movie-card h3 {
    font-size: 15px;
  }

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