:root {
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --blue-dark: #0f1e46;
  --orange: #f97316;
  --green: #059669;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

body {
  min-height: 100vh;
  background: #f3f4f6;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, #2563eb, #1d4ed8, #1e40af);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link,
.mobile-nav-link {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #dbeafe;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: rgba(255, 255, 255, 0.15);
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.home-hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: var(--blue-dark);
}

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

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

.hero-inner {
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  padding: 120px 0 86px;
}

.hero-copy {
  width: min(720px, 100%);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #dbeafe;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.hero-copy h1,
.hero-copy h2 {
  margin-top: 20px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.03;
  font-weight: 900;
  text-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.hero-copy p {
  margin-top: 18px;
  max-width: 650px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.movie-meta,
.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.movie-tags span,
.detail-tags span {
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.front-search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
}

.primary-btn,
.front-search-form button {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 15px 30px rgba(37, 99, 235, 0.32);
}

.primary-btn:hover,
.front-search-form button:hover {
  background: var(--blue-deep);
  transform: translateY(-1px);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.17);
  backdrop-filter: blur(16px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  font-size: 36px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.search-panel,
.content-section,
.page-block {
  margin-top: 44px;
}

.front-search {
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  box-shadow: var(--shadow);
}

.front-search h2 {
  font-size: 28px;
  font-weight: 900;
  color: #0f172a;
}

.front-search-form,
.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-top: 18px;
}

.front-search-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.front-search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.filter-bar {
  grid-template-columns: 1fr 180px 160px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.section-heading h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  color: #0f172a;
}

.section-heading p,
.page-hero p,
.catalog-card p,
.movie-info p,
.movie-article p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: var(--blue);
  background: #dbeafe;
}

.section-more:hover {
  background: #bfdbfe;
}

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

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

.compact-grid .movie-card.is-small .movie-info p {
  min-height: 0;
}

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

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

.movie-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
}

.movie-thumb img,
.category-card,
.catalog-card img,
.detail-poster img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-thumb img {
  transition: transform 0.4s ease;
}

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

.movie-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.62));
  opacity: 0.85;
}

.movie-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.86);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-year {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.72);
}

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

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  color: #111827;
}

.movie-info p {
  min-height: 48px;
  margin-top: 8px;
  font-size: 14px;
}

.movie-meta {
  margin-top: 12px;
  color: #64748b;
  font-size: 13px;
}

.movie-tags {
  margin-top: 10px;
}

.category-section {
  padding: 34px;
  border-radius: 34px;
  background: linear-gradient(135deg, #eff6ff, #eef2ff, #faf5ff);
}

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

.category-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px;
  border-radius: 22px;
  background-size: cover;
  background-position: center;
  color: #ffffff;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.16);
}

.category-card span {
  color: #bfdbfe;
  font-weight: 800;
}

.category-card strong {
  line-height: 1.5;
}

.page-hero {
  background: radial-gradient(circle at top left, rgba(96, 165, 250, 0.55), transparent 34%), linear-gradient(135deg, #0f172a, #1d4ed8 58%, #2563eb);
  color: #ffffff;
}

.slim-hero {
  padding: 66px 0;
}

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

.page-hero p {
  max-width: 720px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

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

.catalog-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  align-items: stretch;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.catalog-card img {
  min-height: 170px;
}

.catalog-card div {
  padding: 22px 22px 22px 0;
}

.catalog-card h2 {
  font-size: 24px;
  font-weight: 900;
}

.catalog-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.catalog-samples span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

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

.rank-panel {
  padding: 22px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.rank-panel h2 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 16px;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 36px 78px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
}

.rank-row:hover {
  background: #eff6ff;
}

.rank-index {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #ffffff;
  font-weight: 900;
}

.rank-row img {
  height: 50px;
  border-radius: 12px;
}

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.detail-hero {
  padding: 34px 0 44px;
  background: linear-gradient(135deg, #0f172a, #1d4ed8 62%, #1e40af);
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: stretch;
}

.player-panel {
  display: grid;
  gap: 16px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.35);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.78));
  text-align: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--blue);
  font-size: 34px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
}

.player-cover strong {
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 900;
}

.player-cover em {
  font-style: normal;
  color: #dbeafe;
  font-weight: 800;
}

.player-error {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 6;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(127, 29, 29, 0.88);
  color: #ffffff;
}

.player-start {
  width: fit-content;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.25);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
  margin-top: 34px;
}

.movie-article,
.related-box {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.movie-article h1 {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
  font-weight: 900;
}

.detail-meta {
  margin-top: 14px;
  color: #64748b;
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
}

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

.movie-article h2,
.related-box h2 {
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 900;
}

.related-box h2 {
  margin-top: 0;
}

.lead-text {
  padding: 18px;
  border-radius: 16px;
  background: #eff6ff;
  color: #1e3a8a !important;
  font-weight: 700;
}

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

.related-list .movie-card {
  display: grid;
  grid-template-columns: 140px 1fr;
}

.related-list .movie-thumb {
  height: 100%;
  aspect-ratio: auto;
}

.related-list .movie-tags {
  display: none;
}

.empty-state {
  display: none;
  margin-top: 24px;
  padding: 24px;
  border-radius: 18px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow);
}

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

.site-footer {
  margin-top: 72px;
  background: #111827;
  color: #d1d5db;
}

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

.site-footer h2 {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

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

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

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

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

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

  .detail-poster {
    display: none;
  }
}

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

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

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

  .home-hero,
  .hero-inner {
    min-height: 68vh;
  }

  .hero-inner {
    padding: 92px 0 72px;
  }

  .hero-arrow {
    display: none;
  }

  .front-search-form,
  .filter-bar,
  .search-wide {
    grid-template-columns: 1fr;
  }

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

  .movie-grid,
  .expanded-grid,
  .category-grid,
  .catalog-grid,
  .ranking-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-section {
    padding: 22px;
  }

  .catalog-card {
    grid-template-columns: 1fr;
  }

  .catalog-card div {
    padding: 0 20px 20px;
  }

  .rank-row {
    grid-template-columns: 32px 64px 1fr;
  }

  .rank-meta {
    grid-column: 3;
  }

  .related-list .movie-card {
    grid-template-columns: 116px 1fr;
  }
}

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

  .movie-grid,
  .expanded-grid {
    gap: 16px;
  }

  .movie-info {
    padding: 14px;
  }

  .player-cover strong {
    font-size: 24px;
  }

  .big-play {
    width: 64px;
    height: 64px;
  }
}
