/* ============================================================
   [FILE: core/css/overlays.css]
   Назначение: структура оверлеев. Позиционирование, размеры,
   flex, анимации. Без цветов, теней, шрифтов, скруглений —
   они в game/css/theme.css.
   ============================================================ */


/* ============================================================
   [BLOCK: touch-hint]
   ============================================================ */
.touch-hint {
  position: fixed;
  inset: 0;

  width: max-content;
  height: max-content;
  max-width: 90%;

  margin: auto;

  padding: clamp(14px, 3vw, 28px) clamp(18px, 5vw, 42px);

  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  pointer-events: none;
  z-index: 10;

  animation: pulse-glow 1.8s ease-in-out infinite;
}

.touch-hint small {
  display: block;
}


/* ============================================================
   [BLOCK: hint-start]
   ============================================================ */
.hint-start {
  display: none;
}


/* ============================================================
   [BLOCK: hint-limit]
   ============================================================ */
.hint-limit {
  display: none;
}

.hint-limit-title,
.hint-limit-record,
.hint-limit-body {
  display: block;
}

.hint-limit-body p {
  margin: 0;
}

.hint-limit-body p + p {
  margin-top: 6px;
}


/* ============================================================
   [BLOCK: hint-state-switch]
   ============================================================ */
body[data-hint="none"]  .touch-hint { display: none; }

body[data-hint="start"] .hint-start { display: block; }
body[data-hint="limit"] .hint-limit { display: block; }

body[data-hint="limit"] .touch-hint {
  animation: none;
}


/* ============================================================
   [BLOCK: animations]
   transform управляется только анимацией. Центрирование —
   через margin: auto + inset: 0. translate отсутствует.
   ============================================================ */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.95;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes pulse-glow-danger {
  0%, 100% {
    opacity: 0.95;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}


/* ============================================================
   [BLOCK: intro-modal]
   ============================================================ */
.intro-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 16px;

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  transition:
    opacity var(--t-base),
    visibility var(--t-base);
}

.intro-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}


/* ============================================================
   [BLOCK: intro-content]
   ============================================================ */
.intro-content {
  position: relative;

  width: 100%;
  max-width: 460px;
  max-height: 90vh;

  display: flex;
  flex-direction: column;

  padding: clamp(20px, 5vw, 32px);

  text-align: center;

  overflow-y: auto;
}


/* ============================================================
   [BLOCK: intro-title]
   ============================================================ */
.intro-title {
  margin-bottom: 16px;
}


/* ============================================================
   [BLOCK: intro-rules]
   ============================================================ */
.intro-rules {
  line-height: 1.6;
  text-align: left;
}

.intro-rules ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.intro-rules li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
}

.intro-rules li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 0;
}


/* ============================================================
   [BLOCK: intro-cookie]
   ============================================================ */
.intro-cookie {
  margin-top: 20px;
  padding-top: 16px;

  line-height: 1.5;
  text-align: center;
}


/* ============================================================
   [BLOCK: intro-accept]
   ============================================================ */
.intro-accept {
  align-self: center;

  margin-top: 20px;
  padding: 12px 36px;

  font-family: inherit;
  white-space: nowrap;

  cursor: pointer;
  touch-action: manipulation;

  transition:
    background var(--t-fast),
    box-shadow var(--t-fast),
    transform var(--t-fast);
}

.intro-accept:active {
  transform: translateY(4px);
}


/* ============================================================
   [BLOCK: intro-mobile]
   ============================================================ */
@media (max-width: 520px) {
  .intro-content {
    max-height: 88vh;
    padding: 18px 16px;
  }

  .intro-accept {
    width: 100%;
  }
}