/* ===== LOGIN MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active {
  display: flex;
}
.login-modal {
  background: var(--bg-white, #fff);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  position: relative;
  border: 2px solid var(--accent-green, #00e676);
  animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  font-size: 22px;
  color: #999;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}
.modal-close:hover {
  background: #f0f0f0;
  color: #333;
}
.modal-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
.modal-logo .m-icon {
  width: 48px;
  height: 48px;
  background: var(--primary, #3535f3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 18px;
}
.modal-logo .m-text {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary, #3535f3);
}
.modal-logo .m-text .reg {
  font-size: 14px;
  vertical-align: super;
  font-weight: 400;
}
.modal-form .form-group {
  margin-bottom: 18px;
}
.modal-form .form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}
.modal-form .form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  background: #f8f9fb;
  transition: border-color 0.2s;
  outline: none;
  color: #333;
}
.modal-form .form-group input:focus {
  border-color: var(--primary, #3535f3);
  background: #fff;
}
.modal-form .btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--accent-green, #00e676);
  color: #1a1a2e;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.modal-form .btn-submit:hover {
  background: #00c853;
}
.modal-form .forgot-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--primary, #3535f3);
  font-weight: 600;
  cursor: pointer;
}
.modal-form .forgot-link:hover {
  text-decoration: underline;
}
.modal-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #e53935;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.modal-success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #16a34a;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

/* ===== BALANCE WARNING MODAL ===== */
.balance-modal {
  background: var(--bg-white, #fff);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  text-align: center;
  animation: modalSlideIn 0.3s ease;
}
.balance-modal .warn-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #e53935;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.balance-modal .warn-icon i {
  font-size: 40px;
  color: #e53935;
}
.balance-modal h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}
.balance-modal p {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
}
.balance-modal .modal-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.balance-modal .btn-modal-deposit {
  padding: 12px 28px;
  background: #00e676;
  color: #1a1a2e;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
}
.balance-modal .btn-modal-deposit:hover { background: #00c853; }
.balance-modal .btn-modal-close {
  padding: 12px 28px;
  background: #f0f0f0;
  color: #666;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
}
.balance-modal .btn-modal-close:hover { background: #e0e0e0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .login-modal {
    margin: 16px;
    padding: 28px 20px;
  }
  .modal-logo .m-text { font-size: 26px; }
  .modal-logo .m-icon { width: 40px; height: 40px; font-size: 16px; }
}
