/* Модальное окно */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 12, 0.82);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.open {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  background: #181820;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  padding: 28px 24px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-box.theme-men {
  border-color: rgba(0, 136, 255, 0.45);
  box-shadow: 0 0 40px rgba(0, 136, 255, 0.18);
}

.modal-box.theme-women {
  border-color: rgba(255, 42, 133, 0.45);
  box-shadow: 0 0 40px rgba(255, 42, 133, 0.18);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: #9898a8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.modal-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.theme-men .modal-badge {
  background: rgba(0, 136, 255, 0.15);
  color: #0088ff;
}

.theme-women .modal-badge {
  background: rgba(255, 42, 133, 0.15);
  color: #ff2a85;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 18px;
}

.modal-summary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.92rem;
  color: #9898a8;
  padding: 5px 0;
}

.summary-row strong {
  color: #fff;
}

.summary-amount {
  font-size: 1.25rem;
  color: #ffd60a !important;
  font-variant-numeric: tabular-nums;
}

.pay-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.modal-nick-edit {
  width: 175px;
  background: #121218;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 10px;
  text-align: right;
  outline: none;
  transition: border-color 0.2s;
}

.modal-nick-edit:focus {
  border-color: #ffd60a;
  text-align: left;
}

.method-card {
  background: #121218;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: 0.15s;
  user-select: none;
}

.method-card input {
  display: none;
}

.method-card.active {
  border-color: #ffd60a;
  background: rgba(255, 214, 10, 0.08);
  color: #ffd60a;
}

.agree-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.78rem;
  color: #8e8e9e;
  line-height: 1.4;
  margin-bottom: 20px;
  cursor: pointer;
}

.agree-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #ffd60a;
  flex-shrink: 0;
}

.agree-label a {
  color: #ffffff;
  text-decoration: underline;
}

.modal-submit-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: transform 0.1s, opacity 0.2s;
}

.modal-submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.modal-submit-btn:active {
  transform: scale(0.98);
}

.theme-men .modal-submit-btn {
  background: #0088ff;
  box-shadow: 0 4px 20px rgba(0, 136, 255, 0.35);
}

.theme-women .modal-submit-btn {
  background: #ff2a85;
  box-shadow: 0 4px 20px rgba(255, 42, 133, 0.35);
}
