/* Страница модуля Poker HUD (/poker-hud). Свой файл, как у реплеера и игроков:
   общее оформление и переменные темы - в style.css, здесь только раскладка
   описания и картинок. */

.hud-page {
  overflow-x: clip;
  --pin: #a98bff;
}

/* ------------------------------------------------------------ первый экран */

.hud-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 24px 40px;
}
.hud-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: -160px;
  width: min(980px, 140vw);
  height: 560px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side at 40% 50%, rgba(139, 92, 246, 0.24), transparent 75%),
    radial-gradient(closest-side at 62% 46%, rgba(79, 140, 255, 0.18), transparent 75%);
  filter: blur(8px);
  pointer-events: none;
}

.hud-title {
  margin: 22px 0 0;
  padding-bottom: 0.08em;
  font-size: clamp(3rem, 8vw, 5.4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
  background: linear-gradient(135deg, #ffffff 0%, #d9ccff 45%, #a98bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hud-slogan {
  margin: 10px 0 0;
  max-width: 820px;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hud-lead {
  margin: 18px 0 0;
  max-width: 700px;
  color: var(--text-dim);
  font-size: 1.05rem;
}

/* ---------------------------------------------------------------- картинки */

.shot {
  margin: 0;
  min-width: 0;
}

/* Картинка - не шире своего размера: кадры песочницы с мелким текстом при
   растяжении мылятся. Уже - по ширине колонки. */
.shot img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #0b2a1f;
  box-shadow: var(--shadow);
}

.shot .zoom {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  border-radius: 10px;
  cursor: zoom-in;
}

.shot figcaption {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.shot-hero {
  width: min(1180px, 100% - 48px);
  margin: 8px auto 0;
}
.shot-hero figcaption { text-align: center; }

/* Узкие кадры (значок, лог, подменю) - по центру своей колонки. */
.shot-narrow {
  justify-self: center;
  width: 100%;
  max-width: 540px;
}

.shot-wide { margin-top: 28px; }

/* Выноски: рамка поверх картинки и номер в углу. Координаты - в процентах
   от картинки, поэтому рамки едут вместе с ней на любой ширине. */
.anno {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

.hl {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  border: 2px solid var(--pin);
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), 0 0 14px rgba(169, 139, 255, 0.35);
  pointer-events: none;
}
.hl::before {
  content: attr(data-n);
  position: absolute;
  left: -11px;
  top: -11px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--pin);
  color: #15101f;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(15, 17, 21, 0.9);
}

.anno-legend {
  list-style: none;
  counter-reset: pin;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.anno-legend li {
  counter-increment: pin;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.anno-legend li::before {
  content: counter(pin);
  flex: 0 0 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--pin);
  color: #15101f;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  transform: translateY(-1px);
}

/* ----------------------------------------------------------------- разделы */

.hud-toc {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: min(1120px, 100%);
  margin: 40px auto 0;
  padding: 0 24px;
}
.hud-toc a {
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(23, 26, 33, 0.7);
  color: var(--text-dim);
  font-size: 0.88rem;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.hud-toc a:hover {
  border-color: var(--pin);
  color: var(--text);
}

.hud-section {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 64px 24px 0;
  scroll-margin-top: 12px;
}

.hud-h2 {
  margin: 0 0 8px;
  font-size: 1.7rem;
  letter-spacing: -0.015em;
}

.hud-h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.hud-intro {
  margin: 0 0 26px;
  max-width: 760px;
  color: var(--text-dim);
  font-size: 1.02rem;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 36px;
  align-items: center;
}
.feature + .feature,
.feature + .shots-row,
.shots-row + .feature { margin-top: 40px; }
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature-top { margin-top: 28px; }
.feature.flip > :first-child { order: 2; }

.feature-text p {
  margin: 0 0 10px;
  color: var(--text-dim);
}
.feature-text p:last-child { margin-bottom: 0; }

.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  color: var(--text-dim);
}
.checks li {
  position: relative;
  padding-left: 26px;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--pin);
  border-bottom: 2px solid var(--pin);
  transform: rotate(-45deg);
}
.checks b {
  color: var(--text);
  font-weight: 600;
}
.checks.small {
  gap: 8px;
  font-size: 0.93rem;
}

.shots-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

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

.info-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: linear-gradient(180deg, var(--bg-panel) 0%, rgba(23, 26, 33, 0.4) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.info-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.info-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.93rem;
}

.info-link {
  align-self: flex-start;
  margin-top: 16px;
  font-size: 0.92rem;
  text-decoration: none;
}
.info-link::after { content: " →"; }
.info-link:hover { text-decoration: underline; }

.fine {
  margin: 16px 0 0;
  max-width: 760px;
  color: var(--text-faint);
  font-size: 0.86rem;
}

/* ------------------------------------------------------------------ колода */

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

.deck-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 16px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 50% 40%, rgba(22, 101, 64, 0.55), rgba(10, 42, 28, 0.85) 75%);
}

.deck-cards {
  display: flex;
  gap: 8px;
}

/* Карта-схема: пропорции карты игры (80:118), масть - цветом. */
.pcard {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 50px;
  height: 74px;
  padding: 5px 6px;
  border-radius: 6px;
  background: #fcfcfc;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}
.pcard i {
  align-self: flex-end;
  font-style: normal;
  font-size: 1.6rem;
}
.pcard.blk { color: #1b1b1b; }
.pcard.red { color: #d01b23; }
.pcard.blue { color: #1565c0; }
.pcard.green { color: #2e7d32; }

.deck-solid {
  display: block;
  width: 100%;
  max-width: 230px;
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.deck-name {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.88rem;
  text-align: center;
}

/* --------------------------------------------------------------- подключение */

.hud-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 8px;
}
.hud-cta .hint { margin: 6px 0 0; }

/* ------------------------------------------------------- картинка крупно */

.zoom-view {
  max-width: 96vw;
  max-height: 94vh;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #0b2a1f;
  box-shadow: var(--shadow);
  overflow: auto;
}
.zoom-view::backdrop {
  background: rgba(8, 9, 12, 0.82);
  backdrop-filter: blur(3px);
}
.zoom-view img {
  display: block;
  max-width: none;
  cursor: zoom-out;
}

.zoom-close {
  position: sticky;
  top: 8px;
  float: right;
  margin: 8px 8px -44px 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: rgba(15, 17, 21, 0.85);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.zoom-close:hover { border-color: var(--pin); }

/* ------------------------------------------------------------------ телефон */

@media (max-width: 860px) {
  .feature,
  .feature.flip,
  .shots-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .feature.flip > :first-child { order: 0; }
  .info-grid,
  .info-grid.two,
  .deck-demo { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .hud-hero { padding: 44px 16px 28px; }
  .shot-hero { width: calc(100% - 32px); }
  .hud-toc { padding: 0 16px; margin-top: 28px; }
  .hud-section { padding: 48px 16px 0; }
  .hud-h2 { font-size: 1.4rem; }
  .pcard { width: 44px; height: 65px; }
  /* Номера выносок меньше: на узкой картинке соседние рамки близко. */
  .hl::before {
    left: -8px;
    top: -8px;
    width: 16px;
    height: 16px;
    font-size: 0.62rem;
    line-height: 16px;
  }
}
