/* ============================================================
   Web3 Wallet Connect — style.css
   Dark glassmorphism aesthetic with indigo/sky accent palette
   ============================================================ */

/* ---------- Reset & base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:          #0a0c14;          /* Near-black navy base */
  --surface:     rgba(255,255,255,0.05);
  --surface-hover: rgba(255,255,255,0.10);
  --border:      rgba(255,255,255,0.10);
  --border-hover: rgba(129,140,248,0.55);
  --accent-1:    #818cf8;          /* Indigo */
  --accent-2:    #38bdf8;          /* Sky */
  --text-primary: #f1f5f9;
  --text-muted:  #94a3b8;
  --radius:      16px;
  --card-size:   140px;
  --transition:  0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Animated blobs ---------- */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
  z-index: 0;
}

.blob-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #818cf8, transparent 70%);
  top: -160px; left: -140px;
  animation-duration: 16s;
}
.blob-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #38bdf8, transparent 70%);
  bottom: -120px; right: -100px;
  animation-duration: 12s;
  animation-delay: -4s;
}
.blob-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #a78bfa, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 18s;
  animation-delay: -8s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, 20px) scale(1.08); }
}

/* ---------- Layout ---------- */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  padding: 48px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;

  /* Fade-in on load */
  animation: pageIn 0.6s ease both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Header ---------- */
.header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 56px; height: 56px;
  background: rgba(129,140,248,0.12);
  border: 1px solid rgba(129,140,248,0.3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.heading {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #f1f5f9 0%, #818cf8 60%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
}

.subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ---------- Wallet Grid ---------- */
.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
  width: 100%;
}

/* ---------- Wallet Card ---------- */
.wallet-card {
  /* Glassmorphism */
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  user-select: none;

  /* Stagger fade-in handled by JS */
  opacity: 0;
  transform: scale(0.92) translateY(10px);
  transition:
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition),
    opacity 0.3s ease;
}

.wallet-card.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Hover glow */
.wallet-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: scale(1.06) translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(129,140,248,0.25),
    0 8px 32px rgba(129,140,248,0.15),
    0 2px 8px rgba(0,0,0,0.4);
}

.wallet-card:active {
  transform: scale(0.98);
}

/* Wallet logo */
.wallet-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 12px;
  transition: transform var(--transition);
}

.wallet-card:hover .wallet-logo {
  transform: scale(1.08);
}

/* Wallet name */
.wallet-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: 0.01em;
  line-height: 1.3;
  max-width: 100px;
}

/* ---------- Ripple Effect ---------- */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(129,140,248,0.35);
  transform: scale(0);
  animation: ripple-anim 0.55s linear;
  pointer-events: none;
}

@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* ---------- Footer note ---------- */
.footer-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

.link {
  color: var(--accent-1);
  text-decoration: none;
  transition: color 0.2s;
}
.link:hover { color: var(--accent-2); text-decoration: underline; }

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
  .wallet-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .wallet-card { padding: 18px 8px; }
  .wallet-logo { width: 40px; height: 40px; }
  .wallet-name { font-size: 0.72rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .bg-blob { animation: none; }
  .wallet-card { transition: none; }
  .container { animation: none; opacity: 1; transform: none; }
}

/* ---------- Logo wrapper (added for SVG fallback support) ---------- */
.wallet-logo-wrap {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition);
}
.wallet-card:hover .wallet-logo-wrap {
  transform: scale(1.08);
}
.wallet-logo-wrap svg {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: block;
}
