:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --orange: #ea580c;
  --green: #16a34a;
  --red: #dc2626;
  --bg: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --dark: #111827;
  --card: #ffffff;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 24px 70px rgba(15, 23, 42, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 45%, #f8fafc 100%);
  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 {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 18px rgba(15, 23, 42, 0.08);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #1f2937;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue), #60a5fa);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
  font-size: 14px;
}

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

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

.nav-link,
.mobile-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: #1f2937;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-link {
  display: block;
  padding: 10px 2px;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

.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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.45) 45%, rgba(0, 0, 0, 0.1));
}

.hero-content {
  position: absolute;
  left: max(28px, calc((100% - 1180px) / 2));
  right: 28px;
  bottom: 74px;
  max-width: 820px;
  color: #fff;
}

.hero-kicker {
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-weight: 700;
  font-size: 14px;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.hero-content p {
  margin: 0;
  max-width: 700px;
  color: #e5e7eb;
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.7;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 22px 0 28px;
  color: rgba(255, 255, 255, 0.92);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.btn-primary,
.btn-ghost,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

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

.btn-light {
  color: var(--blue);
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.46);
  color: #fff;
  font-size: 28px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

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

.hero-search {
  position: relative;
  z-index: 5;
  width: min(1180px, calc(100% - 32px));
  margin: -38px auto 0;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(16px);
}

.hero-search input,
.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px 18px;
  font-size: 16px;
  outline: none;
  color: #111827;
  background: #fff;
}

.hero-search input:focus,
.search-box input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

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

.section-block {
  margin-bottom: 84px;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading span {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  color: var(--blue);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading h2,
.page-heading h1,
.detail-main h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-heading p {
  margin: 10px 0 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  min-width: 0;
}

.card-link,
.horizontal-link {
  display: block;
  height: 100%;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-link:hover,
.horizontal-link:hover {
  transform: translateY(-6px);
  border-color: rgba(147, 197, 253, 0.8);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.14);
}

.card-poster {
  position: relative;
  height: 230px;
  overflow: hidden;
  background: #e5e7eb;
}

.card-poster img,
.horizontal-poster img,
.detail-cover img,
.rank-poster img,
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-link:hover img,
.horizontal-link:hover img,
.category-card:hover img,
.rank-row:hover img {
  transform: scale(1.08);
}

.type-badge,
.rank-badge,
.detail-type {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 12px;
  right: auto;
  min-width: 32px;
  justify-content: center;
  background: rgba(234, 88, 12, 0.94);
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(37, 99, 235, 0.84);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.34);
}

.card-link:hover .play-mark,
.horizontal-link:hover .play-mark,
.rank-row:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 17px;
}

.card-body h3,
.horizontal-body h3 {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 17px;
  font-weight: 850;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-body p,
.horizontal-body p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

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

.horizontal-link {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 0;
}

.horizontal-poster {
  position: relative;
  height: 122px;
  overflow: hidden;
  background: #e5e7eb;
}

.horizontal-body {
  padding: 18px;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 22px;
  color: #fff;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  opacity: 0.68;
}

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

.category-info {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-info h2,
.category-info h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.category-info p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.6;
  font-size: 14px;
}

.page-hero {
  background: linear-gradient(135deg, #0f172a, #1d4ed8 58%, #60a5fa);
  color: #fff;
  padding: 74px 0;
}

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

.page-heading h1 {
  color: #fff;
}

.page-heading p {
  color: rgba(255, 255, 255, 0.84);
}

.search-panel {
  margin-bottom: 32px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 14px;
}

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

.filter-chip {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 8px 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  background: var(--blue);
  color: #fff;
}

.no-results {
  display: none;
  margin: 28px 0 0;
  padding: 28px;
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow);
}

.no-results.is-visible {
  display: block;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 86px 160px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.rank-num {
  display: inline-flex;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #fb923c);
  font-weight: 900;
  font-size: 20px;
}

.rank-poster {
  position: relative;
  height: 92px;
  overflow: hidden;
  border-radius: 16px;
  background: #e5e7eb;
}

.rank-content h2,
.rank-content h3 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 900;
}

.rank-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.rank-action {
  color: var(--blue);
  font-weight: 900;
  white-space: nowrap;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 22px auto 0;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue);
  font-weight: 750;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 34px;
  align-items: stretch;
}

.detail-cover {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border-radius: 26px;
  background: #e5e7eb;
  box-shadow: var(--shadow-strong);
}

.detail-type {
  top: 18px;
  right: 18px;
}

.detail-main {
  padding: 30px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow);
}

.detail-main h1 {
  margin-bottom: 18px;
}

.detail-lead {
  margin: 0 0 22px;
  color: #374151;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.detail-meta span {
  padding: 8px 13px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 14px;
}

.detail-tags .tag-pill {
  color: #1d4ed8;
  background: #dbeafe;
}

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

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.24));
  cursor: pointer;
  z-index: 3;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.34);
}

.content-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
}

.article-card,
.side-card {
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow);
}

.article-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 900;
}

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

.side-card {
  position: sticky;
  top: 88px;
}

.side-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.side-card li a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.side-card li a:hover {
  background: #eff6ff;
}

.side-card img {
  width: 64px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
}

.side-card strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
}

.side-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.related-section {
  width: min(1180px, calc(100% - 32px));
  margin: 54px auto 82px;
}

.site-footer {
  background: #111827;
  color: #d1d5db;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
  margin-bottom: 34px;
}

.footer-brand {
  color: #fff;
  margin-bottom: 14px;
}

.site-footer p {
  color: #9ca3af;
  line-height: 1.7;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 16px;
}

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

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

.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid #1f2937;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.back-to-top {
  border: 0;
  color: #d1d5db;
  background: transparent;
  font-weight: 800;
}

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

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

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

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

  .side-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-block;
  }

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

  .hero-slider {
    min-height: 560px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 76px;
  }

  .hero-control {
    width: 42px;
    height: 42px;
  }

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

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

  .card-poster {
    height: 210px;
  }

  .horizontal-link,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .horizontal-poster,
  .rank-poster {
    height: 190px;
  }

  .detail-cover {
    min-height: 380px;
  }

  .footer-grid,
  .footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .main-wrap,
  .page-heading,
  .footer-inner,
  .detail-hero,
  .player-section,
  .content-grid,
  .related-section,
  .breadcrumb {
    width: min(100% - 24px, 1180px);
  }

  .hero-slider {
    height: 78vh;
  }

  .hero-tags {
    gap: 7px;
  }

  .tag-pill {
    font-size: 12px;
  }

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

  .card-poster {
    height: 260px;
  }

  .detail-main,
  .article-card,
  .side-card {
    padding: 22px;
  }
}
