.custom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.custom-modal.active {
  display: flex;
}

.custom-modal-content {
  background: var(--white);
  padding: 30px;
  font-size: 0.95em;
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow-y: auto;
  max-height: 90vh;
  margin: auto;
  border: 1px solid var(--border);
}

#depositModal .custom-modal-content {
  max-width: 800px;
  width: 90%;
}

.custom-modal-content form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.custom-modal-content form label {
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--green-primary);
}

.custom-modal-content form input[type="email"],
.custom-modal-content form input[type="text"],
.custom-modal-content form input[type="password"],
.custom-modal-content form input[type="number"],
.custom-modal-content form select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
  font-size: 1em;
  transition: all 0.3s ease;
}

.custom-modal-content form input:focus,
.custom-modal-content form select:focus {
  border-color: var(--green-primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--green-light);
}

.custom-modal-content form button {
  background: var(--gradient-main);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.custom-modal-content form button:hover {
  background: var(--gradient-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.custom-modal-content h3 {
  text-align: center;
  margin-bottom: 25px;
  color: var(--green-primary);
  font-size: 1.8em;
  font-weight: 700;
}

.custom-modal-content p {
  font-size: 1em;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.custom-modal-content .close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  z-index: 1001;
  transition: color 0.3s ease;
  line-height: 1;
}

.custom-modal-content .close:hover {
  color: var(--green-primary);
  text-decoration: none;
}

.custom-modal-overlay {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 999;
  justify-content: center;
  align-items: center;
}

.btn {
  padding: 12px 24px;
  cursor: pointer;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.btn.danger {
  background-color: #dc2626;
  color: var(--white);
  border: none;
}

.btn.danger:hover {
  background-color: #b91c1c;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.scrollable-modal {
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
}

.scrollable-modal::-webkit-scrollbar {
  width: 8px;
}

.scrollable-modal::-webkit-scrollbar-track {
  background: var(--surface-secondary);
  border-radius: 4px;
}

.scrollable-modal::-webkit-scrollbar-thumb {
  background: var(--green-primary);
  border-radius: 4px;
}

.scrollable-modal::-webkit-scrollbar-thumb:hover {
  background: var(--green-secondary);
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.custom-modal.active .custom-modal-content {
  animation: fadeInScale 0.3s ease-out;
}

.fraud-modal {
  animation: fadeInScale 0.3s ease-out;
}

@media (max-width: 768px) {
  .custom-modal-content {
    width: 95%;
    max-width: none;
    margin: 0 auto;
    padding: 25px;
  }
  
  #depositModal .custom-modal-content {
    width: 95%;
    max-width: none;
  }
  
  .custom-modal-content h3 {
    font-size: 1.5em;
  }
}

@media (max-width: 480px) {
  .custom-modal-content {
    padding: 20px;
  }
  
  .custom-modal-content form {
    gap: 15px;
  }
  
  .custom-modal-content .close {
    font-size: 24px;
    top: 10px;
    right: 10px;
  }
}