/* Homepage layer. DMarket's palette: #0b0b0b page, #171717 panels, #ffc950 accent,
   Montserrat with bold uppercase display headings like DMarket's hero. */
.hm-page {
  --hm-panel: #151515;
  --hm-line: #222;
  --hm-muted: #8a8a8a;
  --hm-green: #ffc950;
  --hm-stage:
    linear-gradient(112deg, rgba(255, 255, 255, 0.022) 0 30%, transparent 30.2%),
    linear-gradient(64deg, transparent 0 46%, rgba(255, 255, 255, 0.018) 46.2% 62%, transparent 62.2%),
    radial-gradient(130% 110% at 8% 55%, #222 0%, #171717 32%, #0e0e0e 58%, #0a0a0a 100%);
}
.hm-section { width: 100%; max-width: 1432px; margin: 0 auto; padding: 0 36px; color: #e5e5e5; font-family: Montserrat, Arial, sans-serif; }
.hm-section a { color: inherit; text-decoration: none; }
.hm-kicker { display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--hm-green); }

/* Buttons */
.hm-cta { display: inline-flex; align-items: center; gap: 12px; height: 48px; padding: 0 6px 0 20px; border: 0; border-radius: 24px; background: var(--hm-green); color: #0b0b0b !important; font: 700 13px Montserrat, Arial, sans-serif; text-transform: uppercase; cursor: pointer; transition: filter 0.15s; }
.hm-cta:hover { filter: brightness(1.08); }
.hm-cta > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #0b0b0b; color: #fff; }
.hm-round { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: #0b0b0b; color: #fff; }

/* ---------- Hero ---------- */
.hm-hero { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; padding-top: 24px; }
.hm-hero-main { position: relative; min-height: 560px; overflow: hidden; border-radius: 24px; background: var(--hm-stage); clip-path: polygon(0 0, calc(100% - 48px) 0, 100% 48px, 100% 100%, 48px 100%, 0 calc(100% - 48px)); }
.hm-dashes { position: absolute; z-index: 3; left: 40px; top: 32px; display: flex; gap: 6px; }
.hm-dashes button { width: 24px; height: 4px; padding: 0; border: 0; border-radius: 2px; background: rgba(255, 255, 255, 0.2); cursor: pointer; transition: width 0.3s, background 0.3s; }
.hm-dashes button.on { width: 72px; background: rgba(255, 255, 255, 0.7); }
.hm-slide { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; padding: 72px 40px 40px; opacity: 0; visibility: hidden; transition: opacity 0.5s, visibility 0.5s; }
.hm-slide.on { opacity: 1; visibility: visible; }
.hm-slide-text { position: relative; z-index: 2; }
.hm-slide h1 { margin: 10px 0 0; font-size: clamp(40px, 5vw, 72px); font-weight: 800; line-height: 0.98; text-transform: uppercase; color: #fff; }
.hm-slide p { max-width: 420px; margin: 18px 0 32px; font-size: 17px; font-weight: 600; line-height: 1.45; text-transform: uppercase; color: #d4d4d4; }
.hm-slide-media { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.hm-slide-media img, .hm-slide-media video { height: 100%; max-height: 470px; object-fit: contain; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6)); }
.hm-hero-q { align-self: center; font-size: 220px; font-weight: 800; line-height: 1; color: rgba(255, 255, 255, 0.12); }

.hm-hero-side { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 16px; }
.hm-promo { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 230px; padding: 24px; overflow: hidden; border-radius: 20px; background: linear-gradient(135deg, #1d2747 0%, #141a2b 55%, #0f1512 100%); }
.hm-promo b { position: relative; z-index: 1; max-width: 190px; font-size: 24px; font-weight: 800; line-height: 1.1; text-transform: uppercase; color: #fff; }
.hm-promo .hm-round { position: relative; z-index: 1; margin-top: auto; }
.hm-promo img { position: absolute; right: -10px; bottom: -30px; height: 115%; object-fit: contain; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5)); transition: transform 0.3s; }
.hm-promo:hover img { transform: scale(1.04); }
.hm-feed { display: flex; flex-direction: column; min-width: 0; padding: 16px; border-radius: 20px; background: var(--hm-panel); }
.hm-feed-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; font-weight: 700; text-transform: uppercase; }
.hm-feed-head a { margin-left: auto; font-size: 12px; font-weight: 600; text-transform: none; color: var(--hm-green) !important; }
.hm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hm-green); box-shadow: 0 0 0 4px rgba(255, 201, 80, 0.15); }
.hm-feed-row { display: grid; grid-auto-flow: column; grid-auto-columns: 104px; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.hm-mini { --rar: #888; display: flex; flex-direction: column; padding: 8px; border-radius: 12px; background: #1c1c1c; border-bottom: 2px solid var(--rar); }
.hm-mini img, .hm-mini .hm-q { width: 100%; height: 96px; object-fit: contain; }
.hm-mini b { margin-top: 6px; font-size: 13px; color: #fff; }
.hm-mini small { overflow: hidden; font-size: 11px; color: var(--hm-muted); white-space: nowrap; text-overflow: ellipsis; }
.hm-mini.sold img { filter: grayscale(1); opacity: 0.45; }
.hm-q { display: grid; place-items: center; font-size: 44px; font-weight: 800; color: #3a414b; }

/* ---------- Blocks ---------- */
.hm-block { padding: 24px 0; }
.hm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.hm-head h2, .hm-pay h2 { margin: 0; font-size: clamp(22px, 2.4vw, 32px); font-weight: 800; text-transform: uppercase; color: #fff; }
.hm-head small { display: block; margin-top: 4px; font-size: 13px; color: var(--hm-muted); }
.hm-head > a { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--hm-green) !important; }

/* FAQ */
.hm-faq { overflow: hidden; border-radius: 20px; background: var(--hm-panel); }
.hm-faq-item + .hm-faq-item { border-top: 1px solid var(--hm-line); }
.hm-faq-item button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 18px 22px; border: 0; background: none; color: #fff; font: 700 15px Montserrat, Arial, sans-serif; text-align: left; cursor: pointer; }
.hm-faq-item button span { display: inline-flex; color: var(--hm-muted); transition: transform 0.2s; }
.hm-faq-item.open button span { transform: rotate(180deg); }
.hm-faq-item p { display: none; margin: -6px 22px 18px; font-size: 14px; line-height: 1.6; color: #a3a3a3; }
.hm-faq-item.open p { display: block; }

/* Telegram */
.hm-tg { display: flex; align-items: center; gap: 18px; margin: 24px 0; padding: 22px 24px; border: 1px solid rgba(34, 158, 217, 0.35); border-radius: 20px; background: radial-gradient(120% 160% at 0% 0%, rgba(34, 158, 217, 0.16), transparent 60%), var(--hm-panel); }
.hm-tg-ic { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 16px; background: #ffc950; color: #0b0b0b; }
.hm-tg div { flex: 1; min-width: 0; }
.hm-tg b { display: block; font-size: 18px; font-weight: 800; color: #fff; }
.hm-tg small { font-size: 14px; color: var(--hm-muted); }

/* Payments */
.hm-pay { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: center; margin: 24px 0; padding: 32px; border-radius: 24px; background: var(--hm-panel); }
.hm-pay p { margin: 10px 0 22px; font-size: 15px; line-height: 1.5; color: var(--hm-muted); }
.hm-pay-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hm-pay-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px; border-radius: 12px; background: #1c1c1c; }
.hm-pay-item b { flex: 1; min-width: 0; overflow: hidden; font-size: 13px; color: #fff; white-space: nowrap; text-overflow: ellipsis; }
.hm-pay-item small { font-size: 11px; color: var(--hm-muted); white-space: nowrap; }

/* Footer */
.hm-footer { width: 100%; max-width: 1360px; margin: 0 auto; padding: 40px 0 8px; font-family: Montserrat, Arial, sans-serif; }
.hm-footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 32px; }
.hm-footer h3 { margin: 0 0 12px; font-size: 14px; font-weight: 800; text-transform: uppercase; color: #fff; }
.hm-footer a { display: block; padding: 4px 0; font-size: 14px; color: var(--hm-muted); text-decoration: none; }
.hm-footer a:hover { color: var(--hm-green); }
.hm-footer p { margin: 36px 0 0; padding-top: 20px; border-top: 1px solid var(--hm-line); font-size: 12px; color: #5f5f5f; }

@media (max-width: 1279px) {
  .hm-hero { grid-template-columns: minmax(0, 1fr) 320px; }
  .hm-pay { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1023px) {
  .hm-hero { grid-template-columns: minmax(0, 1fr); }
  .hm-hero-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none; }
}
@media (max-width: 767px) {
  .hm-section { padding: 0 12px; }
  .hm-hero { padding-top: 12px; }
  .hm-hero-main { min-height: 520px; border-radius: 18px; clip-path: none; }
  .hm-slide { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); align-items: start; padding: 56px 20px 20px; }
  .hm-dashes { left: 20px; top: 24px; }
  .hm-slide p { margin: 12px 0 18px; font-size: 14px; }
  .hm-slide-media img, .hm-slide-media video { max-height: 260px; }
  .hm-hero-q { font-size: 160px; }
  .hm-hero-side { grid-template-columns: minmax(0, 1fr); }
  .hm-promo { min-height: 180px; }
  .hm-tg { flex-wrap: wrap; }
  .hm-tg .hm-cta { width: 100%; justify-content: space-between; }
  .hm-pay { padding: 20px; }
  .hm-pay-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hm-footer-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
}

/* DMarket's games slider, run as a plain horizontal scroller. */
.hm-games-track { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hm-games-track::-webkit-scrollbar { display: none; }
.hm-games-track > .swiper-slide { flex: none; scroll-snap-align: start; }
games-slider animated-button button { opacity: 1 !important; }
games-slider animated-button button.hm-off { opacity: 0.4 !important; pointer-events: none; }
games-slider .h-0\.5 { transition: width 0.2s, margin-left 0.2s; }
.hm-games-track > .swiper-slide { transition: width 0.35s ease; }
.hm-games-track > .swiper-slide:has(> card.active) { width: 620px !important; }
games-slider card myth-image[classes*="image-mask"] img { transition: opacity 0.35s; }
games-slider card.active myth-image[classes*="image-mask"] img { opacity: 0; }
@media (max-width: 767px) {
  .hm-games-track > .swiper-slide:has(> card.active) { width: 86vw !important; }
}

/* Shop game cards: game art with a dark shade so white text reads on any image.
   Inactive cards are tinted in the game's colour; the active card shows the art. */
games-slider card.hm-gcard .card { background: #111; }
games-slider card.hm-gcard myth-image img { filter: saturate(0.9); transition: filter 0.35s; }
games-slider card.hm-gcard myth-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0.15) 100%),
    linear-gradient(0deg, color-mix(in srgb, var(--tint) 38%, transparent), color-mix(in srgb, var(--tint) 38%, transparent));
  transition: opacity 0.35s;
}
games-slider card.hm-gcard.active myth-image::after { background: linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.25) 50%, transparent 80%); opacity: 1; }
games-slider card.hm-gcard .text-neutral-950, games-slider card.hm-gcard .card * { color: #fff !important; }
games-slider card.hm-gcard img.aspect-square, games-slider card.hm-gcard myth-image.aspect-square { display: none; }
games-slider card.hm-gcard.hm-gsoon { cursor: default; }
games-slider card.hm-gcard.hm-gsoon .whitespace-nowrap { color: rgba(255, 255, 255, 0.55) !important; }
