:root {
  --accent: #dc2626;
  --accent-dark: #b91c1c;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --panel: #ffffff;
  --dark: #111827;
  --radius: 18px;
  --shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #f6f7fb;
  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;
  width: 100%;
}

.container-wrap {
  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);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 21px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.25);
}

.logo-mark span {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid white;
  margin-left: 3px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  color: #374151;
  font-size: 15px;
}

.main-nav a,
.mobile-panel nav a,
.category-strip a {
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-panel nav a:hover,
.category-strip a:hover {
  color: var(--accent);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 7px 8px 7px 16px;
}

.search-form input {
  width: 178px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
}

.search-form button,
.primary-button,
.secondary-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.search-form button {
  background: var(--accent);
  color: white;
  padding: 8px 14px;
}

.search-form button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 28px;
}

.category-strip {
  border-top: 1px solid #f0f1f3;
}

.strip-inner {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #4b5563;
  font-size: 14px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #f0f1f3;
  padding: 14px 16px 18px;
  background: white;
}

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

.mobile-panel .search-form {
  margin-bottom: 14px;
}

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

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hero {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.55) 44%, rgba(0, 0, 0, 0.12) 100%), linear-gradient(0deg, rgba(17, 24, 39, 0.88) 0%, rgba(17, 24, 39, 0) 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 570px;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  color: white;
  padding: 72px 0;
}

.hero-eyebrow,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 6px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 5vw, 52px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.hero p {
  max-width: 620px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 24px 0 28px;
  color: #f3f4f6;
}

.hero-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  padding: 8px 12px;
  backdrop-filter: blur(10px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  padding: 13px 24px;
  box-shadow: 0 16px 30px rgba(220, 38, 38, 0.28);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 13px 24px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: white;
  font-size: 28px;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

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

.main-content {
  padding: 46px 0 0;
}

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

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 36px);
}

.section-head p,
.page-hero p,
.detail-title p {
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

.movie-card-link,
.wide-card a,
.category-card,
.rank-panel,
.info-panel,
.detail-panel,
.player-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card-link:hover,
.wide-card a:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #111827);
}

.poster-wrap img,
.wide-poster img,
.rank-item img,
.related-mini img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.movie-card-link:hover .poster-wrap img,
.wide-card a:hover img,
.rank-item:hover img,
.related-mini:hover img {
  transform: scale(1.08);
}

.quality-badge,
.score-badge,
.wide-poster span,
.detail-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 9px;
}

.quality-badge {
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.66);
}

.score-badge {
  top: 12px;
  right: 12px;
  background: var(--accent);
}

.poster-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.78));
  transition: opacity 0.25s ease;
}

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

.play-circle {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.95);
  color: white;
  font-size: 25px;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.34);
}

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

.movie-card-body h3,
.wide-body h3 {
  margin: 0;
  overflow: hidden;
  color: #111827;
  font-size: 17px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.movie-meta-line,
.wide-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #9ca3af;
  font-size: 12px;
}

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

.tag-row span,
.detail-tags a,
.breadcrumb a,
.breadcrumb span {
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  padding: 6px 9px;
  font-size: 12px;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 26px;
}

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

.rank-panel {
  padding: 18px;
}

.rank-panel h3 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 900;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 38px 76px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  padding: 10px;
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: #f9fafb;
}

.rank-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e5e7eb;
  color: #4b5563;
  font-size: 17px;
  font-weight: 900;
}

.rank-1 {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.rank-2 {
  background: linear-gradient(135deg, #cbd5e1, #64748b);
  color: white;
}

.rank-3 {
  background: linear-gradient(135deg, #fb923c, #c2410c);
  color: white;
}

.rank-item img {
  width: 76px;
  height: 56px;
  border-radius: 10px;
  background: #111827;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
  font-style: normal;
}

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

.wide-card a {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
}

.wide-poster {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  background: #111827;
}

.wide-poster span {
  top: 12px;
  left: 12px;
  background: var(--accent);
}

.wide-body {
  padding: 18px;
}

.tint-section {
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(135deg, #fff1f2, #eff6ff);
}

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

.category-card {
  padding: 22px;
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
}

.category-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.category-card span {
  color: var(--accent);
  font-weight: 800;
}

.page-hero {
  padding: 56px 0;
  background: linear-gradient(135deg, var(--accent), #7f1d1d);
  color: white;
}

.page-hero h1 {
  color: white;
  font-size: clamp(34px, 5vw, 52px);
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 160px 160px 160px;
  gap: 12px;
  margin-bottom: 24px;
  border-radius: 20px;
  background: white;
  padding: 14px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: white;
  padding: 12px 13px;
  color: #111827;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 18px;
}

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

.player-card {
  background: #05070d;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #05070d;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  background: #05070d;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(5, 7, 13, 0.15), rgba(5, 7, 13, 0.72));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 32px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.38);
}

.detail-title {
  margin: 26px 0;
}

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

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

.detail-meta span {
  border-radius: 999px;
  background: #fff;
  color: #4b5563;
  padding: 8px 12px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.detail-panel,
.info-panel {
  padding: 24px;
}

.detail-panel h2,
.info-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.detail-panel p {
  margin: 0 0 18px;
  color: #374151;
  line-height: 1.92;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.side-poster {
  overflow: hidden;
  border-radius: var(--radius);
  background: #111827;
  box-shadow: var(--shadow);
}

.side-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.info-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
  color: #4b5563;
}

.info-list strong {
  color: #111827;
}

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

.related-mini {
  overflow: hidden;
  border-radius: 16px;
  background: white;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.related-mini img {
  aspect-ratio: 16 / 10;
  background: #111827;
}

.related-mini span {
  display: block;
  overflow: hidden;
  padding: 12px;
  color: #111827;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-empty {
  border-radius: 22px;
  background: white;
  padding: 60px 22px;
  color: var(--muted);
  text-align: center;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

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

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

.footer-brand {
  color: white;
}

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

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

.footer-links {
  display: grid;
  gap: 9px;
}

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

.footer-links a:hover {
  color: white;
}

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

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

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

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

@media (max-width: 820px) {
  .main-nav,
  .topbar > .search-form,
  .category-strip {
    display: none;
  }

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

  .hero,
  .hero-content {
    min-height: 520px;
  }

  .hero-control {
    display: none;
  }

  .grid-cards,
  .grid-cards.compact,
  .wide-list,
  .category-grid,
  .related-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wide-card a {
    grid-template-columns: 130px minmax(0, 1fr);
  }

  .wide-poster {
    min-height: 180px;
  }
}

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

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

  .hero,
  .hero-content {
    min-height: 540px;
  }

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

  .hero-meta {
    gap: 8px;
  }

  .hero-meta span {
    padding: 7px 10px;
    font-size: 13px;
  }

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

  .grid-cards,
  .grid-cards.compact,
  .wide-list,
  .category-grid,
  .feature-poster-grid,
  .related-grid,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .wide-poster {
    min-height: 240px;
  }

  .rank-item {
    grid-template-columns: 34px 64px minmax(0, 1fr);
  }

  .rank-item img {
    width: 64px;
    height: 52px;
  }

  .detail-panel,
  .info-panel {
    padding: 18px;
  }
}
