/* ─── Быстрая дуэль: поиск соперника и призрак ───
   Кнопка «Найти соперника» на плитке дуэли, экран поиска /match,
   вид соперника-призрака в дуэли (полупрозрачный, со значком). */

/* Плитка дуэли: вместо стрелки — кнопка поиска */
.mt-quick {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px 0 12px;
  border-radius: 999px;
  background: #fff;
  color: #1a0f3d;
  font-size: 13.5px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s cubic-bezier(0.2, 1.6, 0.4, 1), background 0.2s;
}

.mt-quick:hover,
.mt-quick:focus-visible {
  background: var(--yellow);
  transform: scale(1.05);
}

.mt-quick:active {
  transform: scale(0.97);
}

.mt-quick:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.mtile.has-quick .mt-foot {
  gap: 8px;
}

.mt-quick > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Узкая плитка: кнопка на всю ширину, стрелка «с другом» не нужна —
   туда ведёт вся плитка */
@media (max-width: 560px) {
  .mtile.has-quick .mt-go {
    display: none;
  }

  .mt-quick {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
    height: 34px;
    padding: 0 10px;
    font-size: 12.5px;
  }
}

/* «Найти соперника» в шапке «С друзьями» */
.page-head .mm-find {
  align-self: center;
}

@media (max-width: 560px) {
  .page-head .mm-find {
    width: 100%;
  }
}

/* ─── Экран поиска ─── */

.mm-page {
  padding-top: 12px;
}

.mm-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 26px 22px 24px;
  animation: pageIn 0.35s both;
}

.mm-card .page-title {
  margin: 6px 0 18px;
}

.mm-radar {
  position: relative;
  width: 188px;
  height: 188px;
  margin: 4px auto 10px;
  display: grid;
  place-items: center;
}

.mm-wave {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 210, 63, 0.55);
  opacity: 0;
  animation: mmWave 2.4s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
}

.mm-wave:nth-child(2) {
  animation-delay: 0.8s;
}

.mm-wave:nth-child(3) {
  animation-delay: 1.6s;
}

@keyframes mmWave {
  0% {
    transform: scale(0.55);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.mm-ring {
  position: absolute;
  inset: 22px;
  width: calc(100% - 44px);
  height: calc(100% - 44px);
  transform: rotate(-90deg);
}

.mm-ring circle {
  fill: none;
  stroke-width: 6;
}

.mm-ring .bg {
  stroke: rgba(255, 255, 255, 0.1);
}

.mm-ring .fg {
  stroke: var(--yellow);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.25s linear;
}

.mm-me {
  position: relative;
  border-radius: 50%;
  animation: mmBob 2.4s ease-in-out infinite;
}

@keyframes mmBob {
  50% {
    transform: scale(1.04);
  }
}

.mm-time {
  font-size: 40px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.mm-sub {
  min-height: 20px;
  margin-top: 8px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 700;
}

.mm-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.mm-actions.col {
  flex-direction: column;
  align-items: center;
}

.mm-actions.col .btn {
  min-width: 230px;
}

.mm-card .form-error {
  margin: 0 auto 4px;
  max-width: 360px;
}

.mm-gate {
  padding-top: 4px;
}

/* Соперник найден: я — VS — он */
.mm-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 8px 0 6px;
  animation: mmIn 0.45s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}

@keyframes mmIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
}

.mm-p {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  flex: 0 1 170px;
  min-width: 0;
}

.mm-p b {
  max-width: 100%;
  font-size: 15px;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}

.mm-vs-x {
  font-size: 30px;
  font-weight: 900;
  font-style: italic;
  color: var(--yellow);
  text-shadow: 0 4px 18px rgba(255, 210, 63, 0.45);
}

/* ─── Призрак ───
   Аватар владельца записи — полупрозрачный, с голубым свечением */
.mm-p.ghost > .avatar,
.mm-p.ghost > .avf,
.rslot.ghost .rslot-av > .avatar,
.rslot.ghost .rslot-av > .avf,
.dh-card.ghost > .avatar,
.dh-card.ghost > .avf,
.dr-p.ghost > .avatar,
.dr-p.ghost > .avf,
.dw-p.ghost > .avatar,
.dw-p.ghost > .avf {
  opacity: 0.62;
  filter: grayscale(0.35) drop-shadow(0 0 10px rgba(140, 220, 255, 0.75));
}

.mm-ghost-ico,
.rslot-ghost {
  position: absolute;
  top: 58px;
  left: calc(50% + 20px);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #8cdcff;
  color: #10203a;
  box-shadow: 0 0 0 3px var(--panel-solid);
}

.rslot-ghost {
  top: auto;
  bottom: -4px;
  left: auto;
  right: -6px;
  width: 24px;
  height: 24px;
}

.dh-card.ghost .dh-name,
.dr-p.ghost .dr-name {
  color: #bfeaff;
}

.dh-gshort {
  display: none;
}

@media (max-width: 760px) {
  .dh-gfull {
    display: none;
  }

  .dh-gshort {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
  }

  .dh-gshort .ico {
    flex: none;
  }

  .dh-gshort > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 560px) {
  .mm-radar {
    width: 168px;
    height: 168px;
  }

  .mm-vs {
    gap: 10px;
  }

  .mm-vs-x {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-wave,
  .mm-me {
    animation: none;
  }
}
