/* Wallet Modal */
:root {
  --bg-card: #23294a;
  --border-radius: 18px;
  --primary: #6c5ce7;
  --text-secondary: #b2bec3;
  --text-primary: #fff;
  --transition: all 0.3s ease;
}

/* Overlay: darker, with a subtle gradient for depth */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(120deg, rgba(30, 34, 54, 0.92) 60%, rgba(44, 62, 80, 0.92) 100%);
  backdrop-filter: blur(7px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: block;
  opacity: 1;
}

/* Modal: more padding, softer look, shadow */
.wallet-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 500px;
  background: linear-gradient(135deg, #23294a 80%, #181c2a 100%);
  color: #fff;
  border-radius: 22px;
  z-index: 1100;
  display: none;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 12px 48px rgba(44, 62, 80, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0;
  font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.wallet-modal::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.wallet-modal.active {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Modal header and close button */
.wallet-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: transparent;
}

.wallet-modal-header h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.close-modal {
  background: none;
  border: none;
  color: #b2bec3;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal:hover {
  color: #6c5ce7;
}

.wallet-modal-body {
  padding: 1.5rem;
}

.wallet-modal-body p {
  color: #b2bec3;
  font-size: 1.08rem;
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: 0.1px;
}

/* Wallet options: card style, hover effect */
.wallet-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wallet-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(108, 92, 231, 0.08);
  border-radius: 14px;
  color: #fff;
  padding: 1rem;
  transition: background 0.2s, border 0.2s;
  text-align: left;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.06);
}

.wallet-option:hover {
  background: rgba(108, 92, 231, 0.08);
  border-color: #6c5ce7;
}

.wallet-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallet-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wallet-info {
  flex: 1;
}

.wallet-info h4 {
  color: #fff;
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.wallet-info p {
  color: #b2bec3;
  font-size: 0.97rem;
  margin: 0;
  text-align: left;
}

/* Modal footer */
.wallet-modal-footer {
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 1rem 1.5rem;
}

.wallet-modal-footer p {
  color: #b2bec3;
  font-size: 0.93rem;
  text-align: center;
}

.wallet-modal-footer a {
  color: #6c5ce7;
  text-decoration: underline;
}

.wallet-modal-footer a:hover {
  color: #00cec9;
}

/* Animation for wallet modal */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes modalFadeOut {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
}

@media (max-width: 575.98px) {
  .wallet-modal {
    max-width: 98vw;
    min-width: 0;
    padding: 0;
    max-height: 96vh;
  }
}