@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --mshq-bg: #0b0f14;
  --mshq-surface: #141821;
  --mshq-surface-2: #1b212c;
  --mshq-text: #f5f7ff;
  --mshq-muted: #a9b1c3;
  --mshq-border: #2a3140;
  --mshq-accent: #ffb25b;
  --mshq-accent-2: #5ad1c3;
  --mshq-card-bg: #0f141c;
  --mshq-card-border: #20283a;
  --mshq-rating-bg: linear-gradient(135deg, #ffb703, #fb8500);
  --mshq-quality-bg: linear-gradient(135deg, #2196f3, #1565c0);
  --mshq-lang-bg: #1faa59;
  --mshq-type-movie-bg: #e63946;
  --mshq-type-episode-bg: #9d4edd;
  --mshq-type-series-bg: #f77f00;
  --mshq-title-color: #f8fafc;
  --mshq-meta-color: #9aa4bf;
  --mshq-hover-glow: 0 16px 32px rgba(0, 0, 0, 0.45);
  --mshq-facebook: #1877f2;
  --mshq-telegram: #25a4e2;
  --mshq-focus: rgba(255, 178, 91, 0.35);

  --mshq-radius-sm: 8px;
  --mshq-radius: 14px;
  --mshq-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);

  --mshq-space-1: 6px;
  --mshq-space-2: 12px;
  --mshq-space-3: 18px;
  --mshq-space-4: 28px;
  --mshq-space-5: 40px;
  --mshq-space-6: 60px;
}

html,
body {
  margin: 0;
}

body.mshq-custom-page {
  background:
    radial-gradient(circle at top, rgba(31, 39, 52, 0.6), transparent 50%),
    var(--mshq-bg);
  color: var(--mshq-text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  line-height: 1.6;
}

/* Only affect theme wrappers inside custom pages */
body.mshq-custom-page #page,
body.mshq-custom-page #content,
body.mshq-custom-page .site,
body.mshq-custom-page .site-content,
body.mshq-custom-page .content-area {
  background: transparent !important;
}

/* Scope ALL mshq design system */
body.mshq-custom-page .mshq-page {
  background: var(--mshq-bg);
  color: var(--mshq-text);
  min-height: 100%;
  padding-bottom: var(--mshq-space-6);
  min-width: 100%;
}

/* Hide header/navbar ONLY on movie details page */
body.mshq-body-details header,
body.mshq-body-details .site-header,
body.mshq-body-details .main-navigation,
body.mshq-body-details nav,
body.mshq-body-details .navbar,
body.mshq-body-details .menu,
body.mshq-body-details .primary-navigation {
  display: none !important;
}

body.mshq-custom-page header,
body.mshq-custom-page .site-header,
body.mshq-custom-page .main-navigation {
  display: none !important;
}

body.mshq-custom-page .site-footer,
body.mshq-custom-page .ast-footer-wrap,
body.mshq-custom-page .ast-small-footer {
  display: none !important;
}

/* Links */
a {
  color: inherit;
}

.mshq-scope,
.mshq-scope * {
  color-scheme: dark;
}

.mshq-hero-title,
.mshq-section-title,
.mshq-card-title,
.mshq-card__title,
.mshq-community-card__title {
  font-family: "Fraunces", "Times New Roman", serif;
  line-height: 1.2;
  color: var(--mshq-title-color);
}

.mshq-container {
  max-width: 1200px;
  padding: 0 16px;
  margin: 0 auto;
}

.mshq-section {
  padding: var(--mshq-space-5) 0;
}

.mshq-section-head {
  display: flex;
  flex-direction: column;
  gap: var(--mshq-space-2);
  margin-bottom: var(--mshq-space-3);
  position: relative;
  padding-bottom: var(--mshq-space-2);
}

.mshq-section-title {
  font-size: clamp(16px, 2vw, 22px);
  margin: 0;
  letter-spacing: 0.2px;
}

.mshq-section-sub {
  margin: 0;
  color: var(--mshq-muted);
  line-height: 1.6;
}

.mshq-section-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, var(--mshq-accent), transparent);
}

.mshq-card {
  background: var(--mshq-surface);
  border: 1px solid var(--mshq-border);
  border-radius: var(--mshq-radius);
  box-shadow: var(--mshq-shadow);
  padding: var(--mshq-space-4);
}

.mshq-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.mshq-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mshq-card-title {
  margin: 0 0 var(--mshq-space-3);
  font-size: 18px;
}

.mshq-grid {
  display: grid;
  gap: var(--mshq-space-3);
}

.mshq-grid-2 {
  grid-template-columns: 1fr;
}

.mshq-hero-grid {
  display: grid;
  gap: var(--mshq-space-4);
}

.mshq-hero-poster {
  border-radius: var(--mshq-radius);
  overflow: hidden;
  border: 1px solid var(--mshq-border);
  box-shadow: var(--mshq-shadow);
  background: var(--mshq-surface-2);
}

.mshq-hero-poster img {
  width: 100%;
  display: block;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.mshq-hero-title {
  margin: 0 0 var(--mshq-space-2);
  font-size: clamp(22px, 4vw, 40px);
}

.mshq-hero-sub {
  margin: 0 0 var(--mshq-space-3);
  color: var(--mshq-muted);
  font-size: 15px;
  max-width: 560px;
}

.mshq-hero-panel {
  background: var(--mshq-surface);
  border: 1px solid var(--mshq-border);
  border-radius: var(--mshq-radius);
  padding: var(--mshq-space-4);
  box-shadow: var(--mshq-shadow);
  display: grid;
  gap: var(--mshq-space-3);
  align-content: start;
}

.mshq-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mshq-space-2);
  margin-bottom: var(--mshq-space-3);
}

.mshq-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--mshq-border);
  background: var(--mshq-surface-2);
  color: var(--mshq-text);
  font-size: 12px;
}

.mshq-facts {
  display: grid;
  gap: var(--mshq-space-2);
  margin-bottom: var(--mshq-space-4);
  color: var(--mshq-muted);
}

.mshq-fact {
  display: flex;
  align-items: center;
  gap: var(--mshq-space-2);
  padding: var(--mshq-space-2);
  background: var(--mshq-surface-2);
  border: 1px solid var(--mshq-border);
  border-radius: var(--mshq-radius-sm);
}

.mshq-fact strong {
  color: var(--mshq-text);
  font-weight: 600;
}

.mshq-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mshq-space-2);
  align-items: center;
}

.mshq-watch-actions {
  margin-bottom: var(--mshq-space-4);
}

.mshq-watch {
  padding-bottom: var(--mshq-space-6);
}

.mshq-watch-player {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  background: #0c1118;
  border: 1px solid var(--mshq-border);
  border-radius: var(--mshq-radius);
  overflow: hidden;
  box-shadow: var(--mshq-shadow);
}

.mshq-watch-player .video-js {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
}

.mshq-watch .mshq-watch-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 10px;
  background: rgba(10, 14, 20, 0.65);
  color: var(--mshq-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.mshq-watch .mshq-watch-nav__icon {
  width: 18px;
  height: 18px;
  display: block;
}

.mshq-watch .mshq-watch-nav:hover,
.mshq-watch .mshq-watch-nav:focus-visible {
  background: rgba(20, 26, 38, 0.85);
  border-color: rgba(255, 178, 91, 0.45);
  transform: translateY(-50%) scale(1.03);
}

.mshq-watch .mshq-watch-nav:focus-visible {
  outline: 2px solid var(--mshq-focus);
  outline-offset: 2px;
}

.mshq-watch .mshq-watch-nav.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.mshq-watch .mshq-watch-nav--prev {
  left: 12px;
}

.mshq-watch .mshq-watch-nav--next {
  right: 12px;
}

@media (max-width: 520px) {
  .mshq-watch .mshq-watch-nav {
    display: none;
  }
}

.mshq-button {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #ffb25b, #ff8a3d);
  color: #0b0f14;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--mshq-space-1);
  font-size: 14px;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.2s ease;
}

.mshq-button:focus-visible,
.mshq-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--mshq-shadow);
}

.mshq-button:focus-visible {
  outline: 2px solid var(--mshq-focus);
  outline-offset: 2px;
}

.mshq-button--ghost {
  background: var(--mshq-surface-2);
  border-color: var(--mshq-border);
  color: var(--mshq-text);
}

.mshq-button--ghost:hover,
.mshq-button--ghost:focus-visible {
  border-color: var(--mshq-accent);
  color: var(--mshq-title-color);
  box-shadow: var(--mshq-shadow);
}

.mshq-meta-list {
  display: grid;
  gap: var(--mshq-space-2);
  color: var(--mshq-muted);
  margin: 0;
}

.mshq-meta-list > div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mshq-space-1);
}

.mshq-meta-list strong {
  color: var(--mshq-text);
}

.mshq-screen-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--mshq-space-2);
}

.mshq-screen-grid img {
  width: 100%;
  display: block;
  border-radius: var(--mshq-radius-sm);
  border: 1px solid var(--mshq-border);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.mshq-download-list {
  display: grid;
  gap: var(--mshq-space-2);
}

.mshq-download-row {
  display: grid;
  gap: var(--mshq-space-2);
  padding: var(--mshq-space-2);
  border-radius: var(--mshq-radius-sm);
  background: var(--mshq-surface-2);
  border: 1px solid var(--mshq-border);
  align-items: center;
}

.mshq-related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--mshq-space-3);
}

.mshq-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mshq-space-2);
  align-items: center;
  justify-content: center;
  margin-top: var(--mshq-space-4);
}

.mshq-pagination__pages {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mshq-space-2);
}

.mshq-page-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--mshq-border);
  background: var(--mshq-surface-2);
  color: var(--mshq-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.mshq-page-btn[aria-current="page"] {
  background: var(--mshq-accent);
  color: #0b0f14;
  border-color: transparent;
}

.mshq-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mshq-page-ellipsis {
  padding: 0 4px;
  color: var(--mshq-muted);
}

.mshq-recently-updated {
  position: relative;
}

.mshq-recently-updated.is-loading .mshq-recently-updated__body {
  opacity: 0.6;
  pointer-events: none;
}

.mshq-recently-updated__loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
  pointer-events: none;
  z-index: 3;
  background: radial-gradient(
    circle at center,
    rgba(11, 15, 20, 0.45),
    rgba(11, 15, 20, 0.15) 40%,
    transparent 70%
  );
}

.mshq-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(245, 247, 255, 0.2);
  border-top-color: var(--mshq-accent);
  box-shadow: 0 0 18px rgba(255, 178, 91, 0.25);
  animation: mshq-spin 0.9s linear infinite;
}

.mshq-recently-updated.is-loading .mshq-recently-updated__loader {
  opacity: 1;
  visibility: visible;
}

.mshq-recently-updated__error {
  margin: var(--mshq-space-2) 0 0;
  color: var(--mshq-muted);
  min-height: 1.2em;
}

@keyframes mshq-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mshq-spinner {
    animation: none;
  }
}

.mshq-related-card img {
  width: 100%;
  display: block;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--mshq-radius-sm);
  margin-bottom: var(--mshq-space-2);
}

.mshq-related-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.mshq-related-card span {
  color: var(--mshq-muted);
  font-size: 13px;
}

.mshq-community {
  background: linear-gradient(
    180deg,
    rgba(27, 33, 44, 0.7),
    rgba(11, 15, 20, 0.95)
  );
  border-top: 1px solid rgba(255, 178, 91, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 178, 91, 0.08);
}

.mshq-community-grid {
  display: grid;
  gap: var(--mshq-space-3);
}

.mshq-community-card {
  --mshq-community-accent: var(--mshq-accent);
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--mshq-space-2);
  padding: var(--mshq-space-4);
  border-radius: var(--mshq-radius);
  border: 1px solid var(--mshq-border);
  background: var(--mshq-surface);
  text-decoration: none;
  color: var(--mshq-text);
  overflow: hidden;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.mshq-community-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background: radial-gradient(
    circle at top left,
    var(--mshq-community-accent),
    transparent 60%
  );
  pointer-events: none;
}

.mshq-community-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--mshq-community-accent);
}

.mshq-community-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--mshq-community-accent);
}

.mshq-community-card__content {
  display: grid;
  gap: 6px;
}

.mshq-community-card__title {
  margin: 0;
  font-size: 20px;
}

.mshq-community-card__text {
  margin: 0;
  color: var(--mshq-muted);
}

.mshq-community-card__cta {
  border-color: var(--mshq-community-accent);
  color: var(--mshq-community-accent);
  white-space: nowrap;
}

.mshq-community-card--facebook {
  --mshq-community-accent: var(--mshq-facebook);
}

.mshq-community-card--telegram {
  --mshq-community-accent: var(--mshq-telegram);
}

.mshq-community-card:hover {
  transform: translateY(-2px);
  border-color: var(--mshq-community-accent);
  box-shadow: var(--mshq-hover-glow);
}

.mshq-community-card:focus-visible {
  outline: 2px solid var(--mshq-focus);
  outline-offset: 3px;
}

@media (min-width: 640px) {
  .mshq-hero-grid {
    grid-template-columns: 320px 1fr;
  }

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

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

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

  .mshq-download-row {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

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

  .mshq-cta .mshq-button,
  .mshq-download-row .mshq-button,
  .mshq-community-card__cta {
    width: auto;
  }

  .mshq-community-card {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--mshq-space-3);
  }
}

@media (min-width: 900px) {
  .mshq-hero-grid {
    grid-template-columns: 380px 1fr;
  }

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

  .mshq-related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (min-width: 1200px) {
  .mshq-related-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.mshq-footer {
  padding: var(--mshq-space-5) 0;
  background: var(--mshq-bg);
  border-top: 1px solid var(--mshq-border);
  text-align: center;
}

.mshq-footer__brand {
  margin: 0;
  font-size: clamp(16px, 2vw, 20px);
  letter-spacing: 2px;
}

.mshq-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mshq-space-2);
  justify-content: center;
  margin: var(--mshq-space-2) 0;
}

.mshq-footer__link {
  color: var(--mshq-muted);
  text-decoration: none;
  font-size: 13px;
}

.mshq-footer__link:hover,
.mshq-footer__link:focus-visible {
  color: var(--mshq-title-color);
}

.mshq-footer__copy {
  margin: 0;
  color: var(--mshq-muted);
  font-size: 12px;
}

.mshq-card-title,
.mshq-related-title {
  color: var(--mshq-title-color);
  font-weight: 600;
}

.mshq-topbar {
  padding-top: 25px;
  padding-bottom: 10px;
  text-align: center;
}

.mshq-topbar-inner {
  display: grid;
  gap: var(--mshq-space-2);
  justify-items: center;
}

.mshq-brand {
  font-size: 28px;
  letter-spacing: 6px;
  font-weight: 700;
}

.mshq-brand-title {
  color: var(--mshq-text);
}

.mshq-brand-accent {
  color: var(--mshq-accent);
}

.mshq-brand-sub {
  margin: 0;
  color: var(--mshq-muted);
}

.mshq-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mshq-space-2);
  justify-content: center;
}

.mshq-tab {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--mshq-border);
  background: transparent;
  color: var(--mshq-text);
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.mshq-tab--active,
.mshq-tab:hover {
  border-color: var(--mshq-accent);
  color: var(--mshq-accent);
  transform: translateY(-1px);
}

.mshq-tab:focus-visible {
  outline: 2px solid var(--mshq-focus);
  outline-offset: 2px;
}

.mshq-search {
  padding-top: var(--mshq-space-4);
}

.mshq-search-panel {
  display: grid;
  gap: var(--mshq-space-3);
  align-items: center;
  text-align: center;
  position: relative;
}

.mshq-search-bar {
  display: grid;
  gap: var(--mshq-space-2);
  background: var(--mshq-surface);
  border: 1px solid var(--mshq-border);
  border-radius: 999px;
  padding: var(--mshq-space-2);
  padding-left: 22px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  width: 100%;
  position: relative;
}

.mshq-search-input {
  width: 100%;
  min-height: 44px;
  background: transparent;
  border: none;
  color: var(--mshq-text);
  font-size: 16px;
  font-weight: 500;
  outline: none;
}

.mshq-search-input::placeholder {
  color: var(--mshq-muted);
}

.mshq-search-button {
  width: 100%;
}

.mshq-search-btn-text {
  display: inline-flex;
}

.mshq-search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  width: 100%;
  background: var(--mshq-surface);
  border: 1px solid var(--mshq-border);
  border-radius: var(--mshq-radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  max-height: min(360px, 60vh);
  overflow-y: auto;
  z-index: 9999;
  text-align: left;
  transform: translateY(2px);
}

.mshq-search-dropdown[hidden] {
  display: none;
}

.mshq-search-item {
  display: flex;
  gap: var(--mshq-space-2);
  align-items: center;
  padding: 12px 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--mshq-border);
  color: var(--mshq-text);
  transition: background 0.2s ease;
}

.mshq-search-item:last-child {
  border-bottom: none;
}

.mshq-search-item:hover,
.mshq-search-item:focus-visible {
  background: var(--mshq-surface-2);
}

.mshq-search-thumb {
  width: 44px;
  height: 64px;
  border-radius: var(--mshq-radius-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--mshq-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mshq-search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mshq-search-thumb--placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
}

.mshq-search-thumb--placeholder svg {
  width: 26px;
  height: 26px;
}

.mshq-search-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.mshq-search-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--mshq-title-color);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mshq-search-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--mshq-muted);
}

.mshq-search-badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #0b0f14;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.mshq-search-badge--movie {
  background: var(--mshq-type-movie-bg);
}

.mshq-search-badge--series {
  background: var(--mshq-type-series-bg);
}

.mshq-search-empty {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 18px 14px;
  opacity: 0.85;
  font-size: 14px;
  color: var(--mshq-muted);
}

.mshq-cta .mshq-button,
.mshq-download-row .mshq-button,
.mshq-community-card__cta {
  width: 100%;
}

.mshq-search-bar:focus-within {
  border-color: rgba(255, 178, 91, 0.6);
  box-shadow: 0 0 0 2px rgba(255, 178, 91, 0.15);
}

.mshq-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mshq-space-2);
}

.mshq-pill {
  min-height: 40px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--mshq-border);
  background: var(--mshq-surface-2);
  color: var(--mshq-text);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.mshq-pill:hover {
  border-color: var(--mshq-accent);
  transform: translateY(-1px);
}

.mshq-pill:focus-visible {
  outline: 2px solid var(--mshq-focus);
  outline-offset: 2px;
}

.mshq-pill--active {
  border-color: var(--mshq-accent);
  background: rgba(255, 178, 91, 0.15);
  color: var(--mshq-title-color);
}

.mshq-card--movie {
  padding: 0;
  background: linear-gradient(
    180deg,
    rgba(16, 20, 28, 0.9),
    rgba(12, 15, 22, 0.95)
  );
  border-color: var(--mshq-card-border);
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.mshq-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.mshq-card--movie:hover {
  transform: translateY(-4px);
  box-shadow: var(--mshq-hover-glow);
  cursor: pointer;
}

.mshq-card__media {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.mshq-card__media::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  background: linear-gradient(
    180deg,
    rgba(11, 15, 20, 0),
    rgba(11, 15, 20, 0.85)
  );
  pointer-events: none;
}

.mshq-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.2s ease;
}

.mshq-card--movie:hover .mshq-card__img {
  transform: scale(1.03);
}

.mshq-card__badge {
  position: absolute;
  top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: none;
  font-size: 12px;
  color: #0b0f14;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.mshq-card__badge--rating {
  left: 10px;
  background: var(--mshq-rating-bg);
}

.mshq-card__badge--quality {
  right: 10px;
  background: var(--mshq-quality-bg);
  color: #f8fafc;
}

.mshq-card__chips {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  gap: var(--mshq-space-2);
  z-index: 2;
}

.mshq-chip--tight {
  background: var(--mshq-lang-bg);
  color: #0b0f14;
  border: none;
  font-weight: 600;
}

.mshq-chip--ghost {
  border: none;
  color: #f8fafc;
  font-weight: 600;
}

.mshq-chip--movie {
  background: var(--mshq-type-movie-bg);
}

.mshq-chip--episode {
  background: var(--mshq-type-episode-bg);
}

.mshq-chip--series {
  background: var(--mshq-type-series-bg);
}

.mshq-card__body {
  padding: var(--mshq-space-3);
  display: grid;
  gap: 6px;
}

.mshq-card__title {
  font-size: 16px;
  margin: 0;
  color: var(--mshq-title-color);
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mshq-card__meta {
  display: flex;
  gap: 8px;
  color: var(--mshq-meta-color);
  font-size: 13px;
  align-items: center;
}

.mshq-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (min-width: 640px) {
  .mshq-search-bar {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .mshq-search-button {
    width: auto;
  }

  .mshq-brand {
    font-size: 34px;
  }
}

@media (max-width: 639px) {
  .mshq-search-panel {
    text-align: left;
  }

  .mshq-search-bar {
    grid-template-columns: 1fr auto;
    gap: var(--mshq-space-1);
    padding: 6px 8px 6px 12px;
    border-radius: 14px;
  }

  .mshq-search-input {
    min-height: 40px;
    font-size: 15px;
  }

  .mshq-search-button {
    width: auto;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 12px;
  }

  .mshq-search-btn-text {
    display: none;
  }
}

/* Mobile: community cards + download rows */
@media (max-width: 639px) {
  .mshq-community-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--mshq-space-2);
    padding: var(--mshq-space-2) var(--mshq-space-3);
  }

  .mshq-community-card__content {
    min-width: 0;
  }

  .mshq-community-card__title {
    font-size: 16px;
    margin: 0;
  }

  .mshq-community-card__text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mshq-community-card__cta {
    width: auto;
    min-width: 40px;
    padding: 8px;
    border-radius: 10px;
  }

  .mshq-community-cta-text {
    display: none;
  }

  .mshq-download-row {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .mshq-download-row > div {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
  }

  .mshq-download-row .mshq-section-sub {
    margin: 0;
  }

  .mshq-download-row .mshq-section-sub::before {
    content: "·";
    margin: 0 6px 0 2px;
  }

  .mshq-download-row .mshq-button {
    width: auto;
    min-height: 36px;
    padding: 8px 12px;
  }
}

@media (min-width: 900px) {
  .mshq-brand {
    font-size: 40px;
  }
}
