* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #0f172a;
  color: #fff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
}

#root {
  width: 100%;
  max-width: 512px;
}

button {
  border: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

/* ── Gradient utilities ── */
.gradient-text {
  background: linear-gradient(135deg, #22d3ee, #a78bfa, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-bg {
  background: linear-gradient(135deg, #06b6d4, #7c3aed);
}

.gradient-bg-hover:hover {
  background: linear-gradient(135deg, #0891b2, #6d28d9);
}

/* ── Loading screen ── */
.loading-gradient {
  background: linear-gradient(-45deg, #0f172a, #1e1b4b, #0f172a, #1e1b4b);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

/* ── Live transaction ticker ── */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: 12px;
  padding: 10px 0;
  position: relative;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ticker-wrap::before,
.ticker-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}

.ticker-wrap::before {
  left: 0;
  background: linear-gradient(to right, rgba(15,23,42,0.9), transparent);
}

.ticker-wrap::after {
  right: 0;
  background: linear-gradient(to left, rgba(15,23,42,0.9), transparent);
}

.ticker-track {
  display: flex;
  gap: 2rem;
  animation: tickerScroll var(--ticker-duration, 30s) linear infinite;
  width: max-content;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 0.8rem;
  color: #cbd5e1;
  text-decoration: none;
  padding: 2px 8px;
  border-radius: 6px;
  transition: background 150ms ease, color 150ms ease;
  cursor: pointer;
}

.ticker-item:hover {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
}

.ticker-item .tx-amount {
  color: #34d399;
  font-weight: 600;
}

.ticker-item .tx-addr {
  color: #94a3b8;
  font-family: monospace;
  font-size: 0.75rem;
}

.ticker-item .tx-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #34d399;
  flex-shrink: 0;
}

.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 0;
  margin-right: 1rem;
  border-right: 1px solid rgba(71, 85, 105, 0.4);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #22d3ee;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-label .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
  50% { opacity: 0.6; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0); }
}

/* ── Animated background blobs ── */
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.bg-blob.purple {
  background: #7c3aed;
  opacity: 0.2;
}

.bg-blob.cyan {
  background: #06b6d4;
  opacity: 0.2;
}

/* ── Page shell ── */
.page-shell {
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #0f172a 100%);
}

/* ── Main panel / card ── */
.panel {
  width: 100%;
  max-width: 512px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 24px;
  padding: 32px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.panel-topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.chip {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.16);
  color: #c4b5fd;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Hero ── */
.hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #06b6d4, #7c3aed);
  color: white;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.3);
}

.hero-icon svg {
  width: 28px;
  height: 28px;
}

.hero h1 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
}

.hero p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* ── Stats card ── */
.stats-card {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.3), transparent);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 12px;
}

.stats-label {
  text-align: center;
  color: #94a3b8;
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stats-grid div {
  text-align: center;
}

.stats-grid strong {
  display: block;
  font-size: 1.15rem;
  color: #ffffff;
}

.stats-grid span {
  color: #94a3b8;
  font-size: 0.75rem;
}

/* ── Wallet card ── */
.wallet-card {
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.wallet-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.pill.online {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.pill.offline {
  background: rgba(248, 113, 113, 0.14);
  color: #fda4af;
}

.wallet-meta {
  color: #e2e8f0;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ── Notices ── */
.notice {
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  backdrop-filter: blur(8px);
}

.notice p {
  margin: 0;
  font-size: 0.9rem;
}

.notice.error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.notice.success {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #bbf7d0;
}

/* ── Steps ── */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.step-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  background: transparent;
  border: none;
  transition: background 180ms ease;
}

.step-item:hover {
  background: rgba(51, 65, 85, 0.2);
}

.step-item.active {
  border-left: 4px solid rgba(34, 211, 238, 0.7);
}

.step-item.done {
  /* no special border */
}

.step-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 300ms ease;
}

.step-badge.active {
  background: linear-gradient(135deg, #06b6d4, #7c3aed);
  color: white;
  box-shadow: 0 8px 16px rgba(6, 182, 212, 0.3);
}

.step-badge.done {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.step-badge.pending {
  background: rgba(51, 65, 85, 0.5);
  color: rgba(226, 232, 240, 0.8);
}

.step-content h3 {
  margin: 0 0 4px;
  font-size: 0.96rem;
  color: white;
  font-weight: 600;
}

.step-content p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.84rem;
  line-height: 1.4;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 16px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 200ms ease;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  opacity: 0.92;
}

.btn.primary {
  background: linear-gradient(135deg, #06b6d4, #7c3aed);
  color: #ffffff;
}

.btn.primary:hover {
  background: linear-gradient(135deg, #0891b2, #6d28d9);
}

.btn.primary:disabled {
  background: linear-gradient(135deg, #475569, #374151);
  box-shadow: none;
}

/* ── Progress / Profit display ── */
.progress-card {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(34, 197, 94, 0.5);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 12px;
  backdrop-filter: blur(8px);
}

.progress-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.6);
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(135deg, #06b6d4, #22c55e);
  border-radius: inherit;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
  transition: width 300ms ease;
}

.progress-meta {
  color: #cbd5e1;
  font-size: 0.82rem;
}

.progress-meta.accent {
  color: #a78bfa;
  margin-top: 6px;
}

/* ── Footer ── */
.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 0.82rem;
  padding-top: 6px;
}

.footer svg {
  width: 14px;
  height: 14px;
}

/* ── Tailwind-style overrides ── */
.bg-gray-800 {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
}

.bg-gray-900 {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.3), transparent);
}

.bg-blue-500 {
  background: linear-gradient(135deg, #06b6d4, #7c3aed);
}

.bg-green-500 {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.bg-gray-600 {
  background: rgba(51, 65, 85, 0.5);
}

.bg-red-900 {
  background: rgba(239, 68, 68, 0.2);
}

.bg-green-900 {
  background: rgba(34, 197, 94, 0.2);
}

.border-gray-700 {
  border-color: rgba(71, 85, 105, 0.5);
}

/* ── Animations ── */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

@keyframes bounce {
  0%, 100% { transform: translateY(-20%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
  50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-bounce {
  animation: bounce 1s infinite;
}

/* ── Sizing / spacing (keep compatibility) ── */
.rounded-2xl { border-radius: 24px; }
.rounded-3xl { border-radius: 32px; }
.rounded-xl { border-radius: 12px; }
.rounded-lg { border-radius: 12px; }
.rounded-full { border-radius: 9999px; }
.text-center { text-align: center; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-5xl { font-size: 3rem; }
.text-xl { font-size: 1.25rem; }
.text-lg { font-size: 1.125rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-col { flex-direction: column; }
.w-full { width: 100%; }
.h-2 { height: 0.5rem; }
.h-3 { height: 0.75rem; }
.h-20 { height: 5rem; }
.w-20 { width: 5rem; }
.w-16 { width: 4rem; }
.h-16 { height: 4rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-0 { margin-bottom: 0; }
.border { border-width: 1px; border-style: solid; }
.border-green-600 { border-color: rgba(34, 197, 94, 0.5); }
.border-red-700 { border-color: rgba(239, 68, 68, 0.5); }
.border-green-700 { border-color: rgba(22, 163, 74, 0.5); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-600 { color: #4b5563; }
.text-white { color: #fff; }
.text-green-400 { color: #34d399; }
.text-blue-400 { color: #60a5fa; }
.text-red-300 { color: #fca5a5; }
.text-cyan-400 { color: #22d3ee; }
.text-purple-400 { color: #a78bfa; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

.shadow-soft { box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); }

.card {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(71, 85, 105, 0.5);
}

.button-primary {
  background: linear-gradient(135deg, #06b6d4, #7c3aed);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 8px 16px rgba(124, 58, 237, 0.2);
}

.button-primary:hover {
  background: linear-gradient(135deg, #0891b2, #6d28d9);
}

.button-primary:disabled {
  background: linear-gradient(135deg, #475569, #374151);
  opacity: 0.75;
  box-shadow: none;
}

.backdrop-blur {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.backdrop-blur-xl {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@media (max-width: 520px) {
  body {
    padding: 16px;
  }

  .max-w-md,
  .max-w-lg {
    max-width: 100%;
  }
}
