/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

:root {
  --bg: #09090f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.14);
  --accent: #7c5cfc;
  --accent2: #a78bfa;
  --green: #22d3a5;
  --gold: #f5c242;
  --text: #f1f5f9;
  --text2: #94a3b8;
  --text3: #64748b;
  --error: #f87171;
  --radius: 18px;
  --radius-sm: 12px;
}

html {
  font-size: 16px;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* ===== BACKGROUND BLOBS ===== */
.bg-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.16;
  animation: blobFloat 12s ease-in-out infinite alternate;
}

.blob-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #7c5cfc, #4f46e5);
  top: -120px;
  left: -80px;
  animation-duration: 14s;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #22d3a5, #0ea5e9);
  top: 40%;
  right: -80px;
  animation-duration: 10s;
  animation-delay: -4s;
}

.blob-3 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, #f5c242, #f97316);
  bottom: -80px;
  left: 35%;
  animation-duration: 16s;
  animation-delay: -8s;
}

@keyframes blobFloat {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(40px, 30px) scale(1.08);
  }
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ===== PAGE SHELL ===== */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  padding: 36px 24px 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== TWO-COLUMN GRID ===== */
.page-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
  /* both columns same height */
}

/* ===== LEFT COLUMN ===== */
.left-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Filler card — grows to match right column height */
.left-filler {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 80px;
}

.left-filler-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
}

.left-filler-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  justify-content: space-around;
}

.left-filler-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.left-filler-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.lfi-purple {
  background: rgba(124, 92, 252, 0.15);
  border: 1px solid rgba(124, 92, 252, 0.25);
}

.lfi-green {
  background: rgba(34, 211, 165, 0.12);
  border: 1px solid rgba(34, 211, 165, 0.22);
}

.lfi-gold {
  background: rgba(245, 194, 66, 0.12);
  border: 1px solid rgba(245, 194, 66, 0.22);
}

.left-filler-item-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.left-filler-item-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.left-filler-item-desc {
  font-size: 0.7rem;
  color: var(--text3);
  line-height: 1.5;
}

/* ===== RIGHT COLUMN ===== */
.right-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ===== HEADER ===== */
.header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.2), rgba(167, 139, 250, 0.1));
  border: 1px solid rgba(124, 92, 252, 0.35);
  border-radius: 99px;
  padding: 9px 22px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent2);
}

.logo-icon {
  font-size: 1.05rem;
}

.site-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 30%, var(--accent2) 70%, var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.site-subtitle {
  font-size: 0.8rem;
  color: var(--text3);
  letter-spacing: 0.03em;
}

/* ===== SEARCH CARD ===== */
.search-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.search-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
}

.search-row {
  display: flex;
  gap: 10px;
}

.input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 13px;
  color: var(--text3);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.2s;
}

.input-wrapper:focus-within .input-icon {
  color: var(--accent2);
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  padding: 11px 40px 11px 42px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.search-input::placeholder {
  color: var(--text3);
}

.search-input:focus {
  border-color: var(--accent);
  background: rgba(124, 92, 252, 0.06);
  box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.15);
}

.clear-btn {
  position: absolute;
  right: 11px;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}

.clear-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.check-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--accent), #5b3fea);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 11px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 4px 20px rgba(124, 92, 252, 0.4);
  position: relative;
  overflow: hidden;
}

.check-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent);
  border-radius: inherit;
}

.check-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(124, 92, 252, 0.5);
}

.check-btn:active:not(:disabled) {
  transform: translateY(0);
}

.check-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#btn-loader svg {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.search-hint {
  font-size: 0.72rem;
  color: var(--text3);
  line-height: 1.5;
}

.search-hint code {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.7rem;
  color: var(--accent2);
}

/* ===== ERROR ===== */
.error-card {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--error);
  font-size: 0.85rem;
  animation: slideIn 0.3s ease;
}

.error-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* ===== RESULT CARD ===== */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: slideIn 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Profile */
.profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border2);
  display: block;
  background: var(--surface2);
}

.avatar-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
}

.verified-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--accent);
  color: #fff;
  font-size: 0.55rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.display-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.username-fid-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.username-badge {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent2);
  background: rgba(124, 92, 252, 0.1);
  border: 1px solid rgba(124, 92, 252, 0.2);
  border-radius: 99px;
  padding: 2px 10px;
}

.fid-chip {
  font-size: 0.72rem;
  color: var(--text3);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 2px 10px;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border2), transparent);
}

/* Allocation */
.allocation-section {
  text-align: center;
  padding: 4px 0;
}

.allocation-label-top {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px;
}

.allocation-amount {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.amount-number {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--green), #06d6a0, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  background-size: 200%;
  animation: shimmer 3s ease-in-out infinite alternate;
}

@keyframes shimmer {
  from {
    background-position: 0%;
  }

  to {
    background-position: 100%;
  }
}

.amount-token {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: 0.04em;
}

.allocation-subtext {
  margin-top: 6px;
  font-size: 0.73rem;
  color: var(--text3);
}

/* Actions */
.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  transition: color 0.18s, border-color 0.18s, background 0.18s, transform 0.18s;
}

.action-link:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}

.action-link:active {
  transform: translateY(0);
}

/* ===== ESTIMATOR CARD ===== */
.estimator-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.estimator-header-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.estimator-icon-wrap {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.estimator-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.estimator-supply {
  font-size: 0.7rem;
  color: var(--text3);
  margin-top: 3px;
}

/* Empty state */
.est-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  text-align: center;
  border: 1px dashed var(--border2);
  border-radius: var(--radius-sm);
}

.est-empty-icon {
  font-size: 2rem;
  opacity: 0.5;
}

.est-empty p {
  font-size: 0.78rem;
  color: var(--text3);
  line-height: 1.6;
  max-width: 240px;
}

/* Filled state */
.est-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.est-alloc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(124, 92, 252, 0.08);
  border: 1px solid rgba(124, 92, 252, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.est-alloc-label {
  font-size: 0.73rem;
  color: var(--text3);
}

.est-alloc-value {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent2);
}

/* Table */
.est-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.est-table-head {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
}

.est-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  padding: 9px 14px;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.est-row:last-child {
  border-bottom: none;
}

.est-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.est-fdv {
  font-weight: 600;
  color: var(--text2);
}

.est-price {
  color: var(--text3);
  font-size: 0.72rem;
}

.est-value-cell {
  font-weight: 700;
  color: var(--green);
}

.est-row.highlight {
  background: rgba(34, 211, 165, 0.06);
}

.est-row.highlight .est-value-cell {
  color: var(--gold);
}

/* Tier colors for value cell — realism per FDV milestone */
.est-row.tier-silver .est-value-cell {
  background: linear-gradient(135deg, #e8e8e8 0%, #b8b8b8 40%, #f5f5f5 60%, #9a9a9a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 12px rgba(220, 220, 220, 0.25);
}

.est-row.tier-gold .est-value-cell {
  background: linear-gradient(135deg, #fff3a0 0%, #f5c242 45%, #ffe27a 65%, #c9971f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 14px rgba(245, 194, 66, 0.35);
}

.est-row.tier-diamond .est-value-cell {
  background: linear-gradient(135deg, #ffd1ec 0%, #ff7ac6 25%, #e0aaff 50%, #b5e8ff 75%, #ff9ed8 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 16px rgba(255, 122, 198, 0.45);
  animation: diamondShine 3.5s ease-in-out infinite alternate;
}

@keyframes diamondShine {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}

.est-row.tier-silver  { background: linear-gradient(90deg, transparent, rgba(200, 200, 200, 0.05), transparent); }
.est-row.tier-diamond { background: linear-gradient(90deg, transparent, rgba(255, 122, 198, 0.06), transparent); }

.est-disclaimer {
  font-size: 0.8rem;
  color: var(--text3);
  text-align: center;
}

/* ===== INFO CARDS (right col — horizontal rows) ===== */
.info-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.25s, transform 0.22s, box-shadow 0.25s;
}

.info-card:hover {
  border-color: rgba(124, 92, 252, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 92, 252, 0.12);
}

.info-card-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.info-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.info-card-desc {
  font-size: 0.71rem;
  color: var(--text3);
  line-height: 1.55;
}

.info-card-desc strong {
  color: var(--gold);
  font-weight: 600;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer a {
  color: var(--accent2);
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover {
  color: #fff;
}

.credit-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text2) !important;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border2);
  border-radius: 99px;
  padding: 7px 18px;
  text-decoration: none !important;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.18s;
}

.credit-btn:hover {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  transform: translateY(-1px);
}

.credit-heart {
  color: #f43f5e;
  animation: heartbeat 1.4s ease-in-out infinite;
}

@keyframes heartbeat {

  0%,
  100% {
    transform: scale(1);
  }

  14% {
    transform: scale(1.25);
  }

  28% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.15);
  }

  56% {
    transform: scale(1);
  }
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: rgba(20, 20, 40, 0.96);
  border: 1px solid var(--border2);
  border-radius: 99px;
  padding: 10px 22px;
  font-size: 0.8rem;
  color: var(--text);
  backdrop-filter: blur(20px);
  z-index: 999;
  white-space: nowrap;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.toast.hide {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .page-wrapper {
    grid-template-columns: 1fr;
  }

  .header {
    align-items: center;
    text-align: center;
  }

  .container {
    padding: 28px 16px 40px;
  }

  /* Filler only meaningful in two-column layout */
  .left-filler {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .search-row {
    flex-direction: column;
  }

  .check-btn {
    width: 100%;
    justify-content: center;
  }

  .result-actions {
    flex-direction: column;
  }

  .action-link {
    justify-content: center;
  }
}