/* ===== PingFlow Mini App — Modern Dark Theme ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Core Palette */
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface-elevated: #1a1a25;
  --surface-hover: #222230;
  --border: rgba(255,255,255,0.06);
  --border-light: rgba(255,255,255,0.1);

  /* Text */
  --text: #f0f0f5;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;

  /* Accent */
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --accent: #00d4aa;
  --accent-glow: rgba(0,212,170,0.3);
  --warning: #ffa502;
  --danger: #ff4757;
  --success: #00d4aa;

  /* Effects */
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --glow-primary: 0 0 20px rgba(108,92,231,0.2);
  --glow-accent: 0 0 20px rgba(0,212,170,0.15);

  /* Shape */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

* { margin:0; padding:0; box-sizing:border-box; }

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== Onboarding Overlay ===== */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.onboarding-highlight {
  position: fixed;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 4px var(--primary), 0 0 40px rgba(108, 92, 231, 0.3);
  animation: highlightPulse 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 1001;
}

@keyframes highlightPulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--primary), 0 0 40px rgba(108, 92, 231, 0.3); }
  50% { box-shadow: 0 0 0 6px var(--primary), 0 0 60px rgba(108, 92, 231, 0.5); }
}

.onboarding-card {
  position: relative;
  z-index: 1002;
  max-width: 340px;
  width: 90%;
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-card.center {
  margin: auto;
}

.onboarding-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-light);
  transition: all 0.3s;
}

.onboarding-dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

.onboarding-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.onboarding-text {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 24px;
}

.onboarding-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.onboarding-btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.onboarding-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  flex: 1;
}

.onboarding-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-primary);
}

.onboarding-btn.secondary {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border-light);
}

.onboarding-skip {
  display: block;
  margin: 16px auto 0;
  padding: 6px 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s;
}

.onboarding-skip:hover {
  color: var(--text-secondary);
}

/* Help FAB */
.help-fab {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--glow-primary);
  z-index: 99;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-fab:hover {
  transform: scale(1.1);
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.8; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes scrollWheel {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(8px); opacity: 0; }
}
@keyframes rippleEffect {
  to { transform: scale(4); opacity: 0; }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastIn {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}
@keyframes toastOut {
  from { transform: translateX(-50%) translateY(0); opacity: 1; }
  to { transform: translateX(-50%) translateY(20px); opacity: 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(108, 92, 231, 0.2); }
  50% { box-shadow: 0 0 40px rgba(108, 92, 231, 0.4); }
}
@keyframes borderGlow {
  0%, 100% { border-color: rgba(0, 212, 170, 0.2); }
  50% { border-color: rgba(0, 212, 170, 0.5); }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
  opacity: 0;
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  padding: 48px 20px 36px;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  margin-bottom: 24px;
  position: relative;
}

.logo-pulse {
  position: absolute;
  inset: -2px;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  opacity: 0;
  animation: pulse 2s ease-in-out infinite;
  z-index: -1;
}

.logo-icon {
  width: 22px;
  height: 22px;
}

.logo-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title-secondary {
  color: var(--text);
}

.hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-weight: 400;
}

.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 14px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: var(--border-light);
}

/* Scroll Indicator */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  animation: fadeIn 1s ease 0.8s forwards;
  opacity: 0;
}

.scroll-mouse {
  width: 20px;
  height: 32px;
  border: 2px solid var(--text-muted);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-wheel {
  width: 4px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 2px;
  animation: scrollWheel 1.5s ease-in-out infinite;
}

.scroll-text {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===== Navigation ===== */
.nav-tabs {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
  flex: 1;
  min-width: 80px;
  padding: 14px 12px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-tab:hover {
  color: var(--text-secondary);
}

.nav-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-tab svg {
  width: 16px;
  height: 16px;
}

/* ===== Tab Panels ===== */
.tab-panel {
  display: none;
  padding: 20px 16px 100px;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

/* ===== Section Headers ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title svg {
  width: 20px;
  height: 20px;
  color: var(--primary-light);
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ===== Service Cards ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.service-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
  box-shadow: var(--shadow);
}

.service-card:hover::before {
  opacity: 0.03;
}

.service-card:active {
  transform: scale(0.98);
}

.service-icon {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 20px;
  margin-bottom: 12px;
  transition: all 0.3s;
}

.service-card:hover .service-icon {
  background: rgba(108, 92, 231, 0.1);
  border-color: rgba(108, 92, 231, 0.2);
  transform: scale(1.1);
}

.service-name {
  position: relative;
  z-index: 1;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.service-desc {
  position: relative;
  z-index: 1;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.service-price {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

/* ===== Orders List ===== */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s;
}

.order-item:hover {
  border-color: var(--border-light);
  background: var(--surface-elevated);
}

.order-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 18px;
  flex-shrink: 0;
}

.order-info {
  flex: 1;
  min-width: 0;
}

.order-service {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.order-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.order-status {
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.order-status.completed {
  background: rgba(0, 212, 170, 0.1);
  color: var(--success);
  border: 1px solid rgba(0, 212, 170, 0.2);
}

.order-status.pending {
  background: rgba(255, 165, 2, 0.1);
  color: var(--warning);
  border: 1px solid rgba(255, 165, 2, 0.2);
}

.order-status.failed {
  background: rgba(255, 71, 87, 0.1);
  color: var(--danger);
  border: 1px solid rgba(255, 71, 87, 0.2);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* ===== Wallet Login ===== */
.wallet-login {
  margin-top: 12px;
}

.btn-wallet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #f7931a, #f7b06e);
  color: #0a0a0f;
  border: none;
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(247, 147, 26, 0.25);
  width: 100%;
}

.btn-wallet:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(247, 147, 26, 0.4);
}

.btn-wallet:active {
  transform: translateY(-1px);
}

.btn-wallet:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.btn-wallet svg {
  width: 18px;
  height: 18px;
}

.wallet-connected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: var(--radius-lg);
  animation: fadeIn 0.3s ease;
}

.wallet-connected-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wallet-connected-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
}

.wallet-connected-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
}

.btn-wallet-disconnect {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.2);
  border-radius: var(--radius-sm);
  color: var(--danger);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-wallet-disconnect:hover {
  background: rgba(255, 71, 87, 0.2);
  border-color: rgba(255, 71, 87, 0.3);
}

.btn-wallet-disconnect svg {
  width: 14px;
  height: 14px;
}

/* ===== Wallet Error ===== */
.wallet-error {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(255, 71, 87, 0.08);
  border: 1px solid rgba(255, 71, 87, 0.25);
  border-radius: var(--radius-md);
  color: #ff6b7a;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  animation: fadeIn 0.3s ease;
}

.wallet-error a {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

.wallet-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  margin-bottom: 20px;
}

.wallet-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.wallet-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(108,92,231,0.1), rgba(0,212,170,0.1));
  border-radius: var(--radius);
  font-size: 20px;
}

.wallet-info {
  flex: 1;
}

.wallet-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.wallet-address {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  word-break: break-all;
}

.wallet-balance {
  text-align: right;
}

.balance-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.balance-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* ===== Payment Guide ===== */
.payment-guide {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
}

.guide-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 18px;
}

.guide-title svg {
  width: 18px;
  height: 18px;
  color: var(--primary-light);
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.step-num {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-light);
  flex-shrink: 0;
  transition: all 0.3s;
}

.guide-step:hover .step-num {
  background: rgba(108, 92, 231, 0.15);
  border-color: rgba(108, 92, 231, 0.3);
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 5px;
}

.step-title {
  font-size: 14px;
  font-weight: 600;
}

.step-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.8);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.2s ease;
}

.modal-sheet {
  position: relative;
  width: 100%;
  max-height: 92vh;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow-y: auto;
  animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 1px solid var(--border-light);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  margin: 14px auto;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 20px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover);
  border-radius: var(--radius);
  font-size: 24px;
  animation: float 3s ease-in-out infinite;
}

.modal-title-group {
  flex: 1;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 3px;
}

.modal-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.modal-close {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--border-light);
  color: var(--text);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  padding: 22px 20px 28px;
}

/* ===== Step Indicator ===== */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.step-dot-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.3s;
}

.step-dot.active {
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.step-dot.active .step-dot-num {
  color: var(--bg);
}

.step-line {
  width: 36px;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  transition: background 0.4s;
}

.step-line.active {
  background: linear-gradient(90deg, var(--accent), var(--primary));
}

/* ===== Step Content ===== */
.step-content {
  display: none;
}

.step-content.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

/* ===== Inputs ===== */
.input-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-textarea,
.input-field {
  width: 100%;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  resize: none;
  transition: all 0.2s;
}

.input-textarea:focus,
.input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.input-textarea::placeholder,
.input-field::placeholder {
  color: var(--text-muted);
}

.input-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 22px;
  padding: 12px 14px;
  background: rgba(108, 92, 231, 0.05);
  border: 1px solid rgba(108, 92, 231, 0.1);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
}

.input-hint svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--primary-light);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: var(--glow-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(108, 92, 231, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--border-light);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 13px;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-sm svg {
  width: 16px;
  height: 16px;
}

/* Ripple Effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}

.ripple:active::after {
  animation: rippleEffect 0.5s ease-out;
}

/* ===== Chain Warning Banner ===== */
.chain-warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255, 77, 77, 0.12), rgba(255, 165, 2, 0.08));
  border: 1px solid rgba(255, 77, 77, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #ff6b6b;
}

.chain-warning-banner svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #ff6b6b;
}

.chain-warning-banner strong {
  color: #ff4d4d;
  font-weight: 700;
}

.chain-warning-banner u {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== Payment Card ===== */
.payment-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 18px;
}

.payment-amount {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.amount-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.amount-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}

.payment-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  background: rgba(255, 165, 2, 0.05);
  border: 1px solid rgba(255, 165, 2, 0.15);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--warning);
}

.payment-timer svg {
  width: 16px;
  height: 16px;
}

.payment-timer.urgent {
  background: rgba(255, 71, 87, 0.05);
  border-color: rgba(255, 71, 87, 0.15);
  color: var(--danger);
  animation: pulse 1s ease-in-out infinite;
}

.payment-address-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.address-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.address-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.address-box code {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  word-break: break-all;
}

.copy-btn-sm {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.copy-btn-sm:hover {
  background: var(--border-light);
  color: var(--text);
}

.copy-btn-sm svg {
  width: 16px;
  height: 16px;
}

.payment-actions {
  display: flex;
  gap: 10px;
}

.payment-qr-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.qr-box:hover {
  box-shadow: var(--glow-accent);
  transform: scale(1.02);
}

.qr-box canvas {
  display: block;
  border-radius: var(--radius-sm);
}

.qr-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* QR Modal */
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 8, 0.9);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.2s ease;
}

.qr-modal.hidden {
  display: none;
}

.qr-modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  animation: fadeInScale 0.3s ease;
}

.qr-modal-content canvas {
  background: white;
  border-radius: var(--radius);
  padding: 12px;
}

.qr-modal-close {
  padding: 10px 24px;
  background: var(--surface-hover);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.qr-modal-close:hover {
  background: var(--border-light);
}

/* Auto-detect status */
.auto-detect-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: rgba(0, 212, 170, 0.05);
  border: 1px solid rgba(0, 212, 170, 0.1);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auto-detect-status.detecting .detect-spinner {
  animation: spin 1s linear infinite;
}

.auto-detect-status.detecting {
  color: var(--accent);
}

.auto-detect-status.success {
  background: rgba(0, 212, 170, 0.1);
  border-color: rgba(0, 212, 170, 0.2);
  color: var(--success);
}

.detect-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-light);
  border-top-color: currentColor;
  border-radius: 50%;
}

/* ===== Result ===== */
.result-card {
  text-align: center;
  padding: 24px 0;
}

.result-status {
  margin-bottom: 20px;
}

.result-body {
  text-align: left;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.7;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.result-body img {
  max-width: 100%;
  border-radius: var(--radius-sm);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  animation: toastIn 0.3s ease;
}

.toast.hidden {
  display: none;
}

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

.toast-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-message {
  font-size: 13px;
  font-weight: 500;
}

/* ===== Loading ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(5, 5, 8, 0.9);
  backdrop-filter: blur(12px);
  z-index: 150;
}

.loading-overlay.hidden {
  display: none;
}

.loading-spinner {
  position: relative;
  width: 52px;
  height: 52px;
}

.spinner-ring {
  position: absolute;
  inset: 0;
  border: 2.5px solid transparent;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
  inset: 7px;
  border-top-color: var(--accent);
  animation-duration: 0.8s;
  animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
  inset: 14px;
  border-top-color: var(--primary-light);
  animation-duration: 0.6s;
}

.loading-text {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== Skeleton Loading ===== */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* ===== Utilities ===== */
.hidden {
  display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 2px;
}

/* Selection */
::selection {
  background: rgba(108, 92, 231, 0.3);
  color: var(--text);
}

/* ===== Guide Tab Styles ===== */
.guide-section {
  margin-bottom: 28px;
}

.guide-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Quick Start Flow */
.guide-flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-flow-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.guide-flow-step:hover {
  border-color: var(--border-light);
  transform: translateX(4px);
}

.flow-num {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--bg);
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.flow-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
}

.flow-title {
  font-size: 14px;
  font-weight: 600;
}

.flow-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.guide-flow-arrow {
  text-align: center;
  color: var(--text-muted);
  font-size: 18px;
  display: none;
}

/* Services List in Guide */
.guide-services-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-service-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.guide-service-item:hover {
  border-color: var(--border-light);
}

.guide-service-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.guide-service-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.guide-service-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.guide-service-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Pro Tips */
.guide-tips-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tip-badge {
  padding: 3px 8px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
  flex-shrink: 0;
}

.tip-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Group Chat Guide */
.guide-group-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.group-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.group-step-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.group-step-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.group-step-title {
  font-size: 14px;
  font-weight: 600;
}

.group-step-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.group-step-desc code {
  background: var(--surface-hover);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
}

/* FAQ */
.guide-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-faq {
  padding: 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.faq-q {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.faq-a {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Status Banner ===== */
.status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13px;
}

.status-banner .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}

.status-banner .status-text {
  color: var(--text-secondary);
}

.status-banner .status-value {
  font-weight: 600;
  color: var(--text);
}

/* ===== Progress Bar ===== */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Back Button ===== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface-hover);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}

.back-btn:hover {
  background: var(--border-light);
  color: var(--text);
}

.back-btn svg {
  width: 16px;
  height: 16px;
}

/* ===== Security Notice ===== */
.security-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(0, 212, 170, 0.05);
  border: 1px solid rgba(0, 212, 170, 0.1);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.security-notice svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 1px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
