.modal-container {
  z-index: 9999;
  position: fixed;
  inset: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-hidden {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}

.modal-visible {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}

.wallet-adapter-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.wallet-adapter-modal-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 800px at 50% 20%, rgba(255,255,255,0.06), transparent 60%),
    radial-gradient(1000px 700px at 20% 90%, rgba(255,255,255,0.04), transparent 55%),
    rgba(0, 0, 0, 0.60);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.wallet-adapter-modal-container {
  position: relative;
  width: min(520px, calc(100vw - 48px));
  z-index: 1;
}

.wallet-adapter-modal-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 18px;
  color: rgba(255,255,255,0.92);
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.80), rgba(10, 10, 10, 0.84));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 30px 70px rgba(0,0,0,0.55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  font-family: "PP Mori Regular", "PP Mori", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.wallet-adapter-modal-wrapper::before {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  opacity: 0.55;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,0.10) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 22%, rgba(255,255,255,0.08) 0 1px, transparent 2px),
    radial-gradient(circle at 52% 64%, rgba(255,255,255,0.07) 0 1px, transparent 2px),
    radial-gradient(circle at 22% 78%, rgba(255,255,255,0.06) 0 1px, transparent 2px),
    radial-gradient(circle at 90% 78%, rgba(255,255,255,0.06) 0 1px, transparent 2px);
  filter: blur(0.2px);
}

.wallet-adapter-modal-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.18) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

.wallet-adapter-modal-fade-in .wallet-adapter-modal-container {
  animation: bulkModalIn 180ms ease-out;
}

@keyframes bulkModalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.wallet-adapter-modal-button-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  z-index: 2;
}

.wallet-adapter-modal-button-close:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-1px);
}

.wallet-adapter-modal-button-close svg {
  fill: currentColor;
}

.wallet-adapter-modal-header {
  position: relative;
  padding: 8px 6px 14px;
  text-align: center;
}

.wallet-adapter-modal-mark {
  font-size: 18px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.75);
  margin-bottom: 10px;
}

.wallet-adapter-modal-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.wallet-adapter-modal-subtitle {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255,255,255,0.62);
}

.wallet-adapter-modal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wallet-adapter-modal-list-secondary {
  padding-top: 10px;
}

.wallet-adapter-modal-wrapper .wallet-adapter-button {
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.92);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.wallet-adapter-modal-wrapper .wallet-adapter-button:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-1px);
}

.wallet-adapter-modal-wrapper .wallet-adapter-button:active {
  transform: translateY(0);
  background: rgba(255,255,255,0.09);
}

.wallet-adapter-modal-wrapper .wallet-adapter-button:focus-visible {
  outline: 2px solid rgba(255,255,255,0.22);
  outline-offset: 2px;
}

.wallet-adapter-modal-wrapper .wallet-adapter-button-start-icon,
.wallet-adapter-modal-wrapper .wallet-adapter-button-end-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.wallet-adapter-modal-wrapper .wallet-adapter-button-start-icon img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.wallet-adapter-badge {
  margin-left: auto;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.70);
}

.wallet-adapter-modal-list-more {
  margin-top: 12px;
  width: 100%;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.82);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.wallet-adapter-modal-list-more:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
}

.wallet-adapter-modal-chevron {
  transition: transform 0.25s ease-out;
  fill: rgba(255,255,255,0.78);
}

.wallet-adapter-collapse {
  transition: height 250ms ease-out;
}

.wallet-adapter-collapse-item {
  width: 100%;
}

@media (max-width: 520px) {
  .wallet-adapter-modal {
    padding: 18px;
    place-items: end center;
  }
  .wallet-adapter-modal-container {
    width: 100%;
  }
  .wallet-adapter-modal-wrapper {
    border-radius: 18px;
    padding: 16px;
  }
  .wallet-adapter-modal-title {
    font-size: 22px;
  }
}