/* ═══════════════════════════════════════════════════════
   МОДАЛЬНЫЕ ОКНА (замена alert/confirm/prompt)
   ═══════════════════════════════════════════════════════ */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  padding: 20px;
}
#modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

#modal-window {
  background: linear-gradient(180deg, #1a1611 0%, #0e0c08 100%);
  border: 2px solid #4a3f2e;
  border-radius: 2px;
  padding: 24px;
  min-width: 380px;
  max-width: 560px;
  width: 100%;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 200, 120, 0.15);
  position: relative;
  transform: scale(0.92);
  transition: transform 0.15s;
  font-family: 'Roboto Condensed', sans-serif;
  color: #f0e6d2;
}
#modal-overlay.show #modal-window {
  transform: scale(1);
}

#modal-window::before,
#modal-window::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid #ffb833;
  opacity: 0.9;
  filter: drop-shadow(0 0 6px rgba(255, 184, 51, 0.6));
  pointer-events: none;
}
#modal-window::before {
  top: 4px; left: 4px;
  border-right: none; border-bottom: none;
}
#modal-window::after {
  bottom: 4px; right: 4px;
  border-left: none; border-top: none;
}

#modal-title {
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #ffb833;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-shadow: 0 0 12px rgba(255, 184, 51, 0.4);
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #3a3327;
  text-align: center;
}

#modal-message {
  font-size: 14px;
  line-height: 1.5;
  color: #c4b795;
  margin-bottom: 20px;
  text-align: center;
  white-space: pre-line;
}
#modal-message b,
#modal-message strong { color: #f0e6d2; font-weight: 700; }

#modal-input {
  width: 100%;
  padding: 10px 14px;
  background: #0a0805;
  border: 1px solid #4a3f2e;
  border-radius: 2px;
  color: #f0e6d2;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 14px;
  outline: none;
  margin-bottom: 16px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
  transition: border-color 0.15s, box-shadow 0.15s;
}
#modal-input:focus {
  border-color: #ffb833;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 0 8px rgba(255, 184, 51, 0.3);
}
#modal-input::placeholder { color: #5a5142; }

#modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 10px 24px;
  min-width: 100px;
  background: linear-gradient(180deg, #3a3327 0%, #1a1611 100%);
  border: 1px solid #4a3f2e;
  border-radius: 2px;
  color: #c4b795;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: inset 0 1px 0 rgba(255, 200, 120, 0.1);
}
.modal-btn:hover { border-color: #ffb833; color: #ffb833; }
.modal-btn:active { transform: translateY(1px); }

.modal-btn.primary {
  background: linear-gradient(180deg, #ffb833 0%, #cc5f10 100%);
  border-color: #ffb833;
  color: #0e0c08;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 2px 8px rgba(255,140,26,0.4);
}
.modal-btn.primary:hover {
  background: linear-gradient(180deg, #ffc94a 0%, #e07020 100%);
  color: #0e0c08;
}

.modal-btn.danger {
  background: linear-gradient(180deg, #cc3b1f 0%, #8a2010 100%);
  border-color: #cc3b1f;
  color: #fff;
}
.modal-btn.danger:hover { border-color: #ff5a3a; }

@media (max-width: 600px) {
  #modal-window { min-width: auto; width: 100%; padding: 20px; }
  #modal-title { font-size: 18px; }
  #modal-buttons { flex-direction: column-reverse; }
  .modal-btn { width: 100%; min-width: 0; }
}
/* ═══════════════════════════════════════════════════════
   SOCIAL TOASTS — WoT style
   ═══════════════════════════════════════════════════════ */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  pointer-events: none;
}

.social-toast {
  display: flex;
  align-items: stretch;
  background: linear-gradient(180deg, #2a251c 0%, #1a1611 100%);
  border: 1px solid #4a3f2e;
  border-left: 3px solid #ffb833;
  border-radius: 2px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 200, 120, 0.1);
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 13px;
  color: #f0e6d2;
  pointer-events: auto;
  animation: social-toast-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  min-width: 280px;
}

.social-toast.social-toast-out {
  animation: social-toast-out 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes social-toast-in {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes social-toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

.social-toast-icon {
  flex-shrink: 0;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(0, 0, 0, 0.3);
  border-right: 1px solid rgba(58, 51, 39, 0.6);
  line-height: 1;
}

.social-toast-body {
  flex: 1;
  padding: 10px 14px;
  min-width: 0;
}

.social-toast-text {
  line-height: 1.4;
  font-size: 13px;
  word-wrap: break-word;
}
.social-toast-text b {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}
.social-toast-text small {
  font-size: 11px;
  opacity: 0.7;
}

.social-toast-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.social-toast-btn {
  flex: 1;
  padding: 8px 12px;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s;
  background: linear-gradient(180deg, #3a3327 0%, #1a1611 100%);
  border: 1px solid #4a3f2e;
  color: #c4b795;
  box-shadow: inset 0 1px 0 rgba(255, 200, 120, 0.1);
}
.social-toast-btn:hover {
  border-color: #ffb833;
  color: #ffb833;
}
.social-toast-btn:active {
  transform: translateY(1px);
}

.social-toast-btn.primary {
  background: linear-gradient(180deg, #ffb833 0%, #cc5f10 100%);
  border-color: #ffb833;
  color: #0e0c08;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 2px 8px rgba(255, 140, 26, 0.3);
}
.social-toast-btn.primary:hover {
  background: linear-gradient(180deg, #ffc94a 0%, #e07020 100%);
  color: #0e0c08;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 12px rgba(255, 140, 26, 0.5);
}

/* Типы — цвет полоски слева и иконки */
.social-toast-request { border-left-color: #ffb833; }
.social-toast-ok      { border-left-color: #7ab648; }
.social-toast-err     { border-left-color: #cc3b1f; }
.social-toast-info    { border-left-color: #4d8bbf; }

.social-toast-ok .social-toast-icon      { color: #7ab648; text-shadow: 0 0 8px rgba(122, 182, 72, 0.6); }
.social-toast-err .social-toast-icon     { color: #ff5a3a; text-shadow: 0 0 8px rgba(204, 59, 31, 0.6); }
.social-toast-request .social-toast-icon { color: #ffb833; text-shadow: 0 0 8px rgba(255, 184, 51, 0.6); }
.social-toast-info .social-toast-icon    { color: #60a5fa; text-shadow: 0 0 8px rgba(77, 139, 191, 0.6); }

@media (max-width: 600px) {
  #toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  .social-toast {
    min-width: 0;
  }
}