.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
}

.badge-green {
  background: var(--green-dark);
  color: var(--green-accent);
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

.dropdown {
  position: relative;
  display: inline-flex;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 4px;
  z-index: 50;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.dropdown-item.active {
  color: var(--green-accent);
}

.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  border: 1px solid var(--border-primary);
}

.tooltip:hover::after {
  opacity: 1;
}

.icon-sm {
  width: 14px;
  height: 14px;
}

.icon-md {
  width: 16px;
  height: 16px;
}

.icon-lg {
  width: 20px;
  height: 20px;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-hover) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ===== Wallet Connect Modal ===== */

.wallet-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
}

.wallet-modal.modal-active {
  visibility: visible;
  pointer-events: auto;
}

.wallet-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 12, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.wallet-modal.modal-active .wallet-modal-backdrop {
  opacity: 1;
}

.wallet-modal.modal-closing .wallet-modal-backdrop {
  opacity: 0;
}

.wallet-modal-card {
  position: relative;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: 40px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(29, 216, 159, 0.06),
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(29, 216, 159, 0.06);
  opacity: 0;
  transform: scale(0.92) translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wallet-modal.modal-active .wallet-modal-card {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.wallet-modal.modal-closing .wallet-modal-card {
  opacity: 0;
  transform: scale(0.92) translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.wallet-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  font-size: 16px;
  transition: color var(--transition-fast), background var(--transition-fast);
  cursor: pointer;
  background: none;
  border: none;
}

.wallet-modal-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.wallet-modal-icon-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallet-modal-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 216, 159, 0.25) 0%, transparent 70%);
  animation: glowPulse 2.5s ease-in-out infinite;
}

.wallet-modal-icon {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(29, 216, 159, 0.15) 0%, rgba(29, 216, 159, 0.05) 100%);
  border: 1px solid rgba(29, 216, 159, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--green-accent);
}

.wallet-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.wallet-modal-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 28px;
  max-width: 280px;
}

.wallet-modal-cta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--green-accent);
  color: #000;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.wallet-modal-cta:hover {
  background: #17c28d;
  box-shadow: 0 0 24px rgba(29, 216, 159, 0.3);
  transform: translateY(-1px);
}

.wallet-modal-cta:active {
  transform: translateY(0);
}

.wallet-modal-cta i {
  font-size: 14px;
}

.wallet-modal-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--text-tertiary);
}

.wallet-modal-hint i {
  font-size: 11px;
  color: var(--green-accent);
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
}

@media (max-width: 480px) {
  .wallet-modal-card {
    padding: 32px 20px 24px;
  }

  .wallet-modal-icon-wrap {
    width: 68px;
    height: 68px;
    margin-bottom: 20px;
  }

  .wallet-modal-icon {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }

  .wallet-modal-title {
    font-size: 18px;
  }

  .wallet-modal-desc {
    font-size: 13px;
  }
}
