/* ═══ Paycash.coin — style.css ═══ */
/* Fintech dark dashboard design */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --bg-input: #1a1a1a;
  --border: #222222;
  --border-hover: #333333;
  --text: #f0f0f0;
  --text-muted: #666666;
  --text-dim: #444444;
  --green: #00d084;
  --blue: #4a9eff;
  --purple: #8b5cf6;
  --orange: #f59e0b;
  --red: #ef4444;
  --accent: #00d084;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Fira Code', monospace;
  --radius: 8px;
  --transition: 200ms ease;
}

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

html { font-size: 14px; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ═══ HEADER ═══ */
#main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left { display: flex; align-items: center; gap: 12px; }
.header-right { display: flex; align-items: center; gap: 12px; }

.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { color: var(--accent); font-size: 1.4rem; }
.logo-text { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.5px; }
.logo-dot { color: var(--accent); }

.badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}
.badge-mock {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple);
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.badge-testnet {
  background: rgba(74, 158, 255, 0.15);
  color: var(--blue);
  border: 1px solid rgba(74, 158, 255, 0.3);
}
.status-live {
  background: var(--green);
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 208, 132, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(0, 208, 132, 0); }
}

/* ═══ BUTTONS ═══ */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #000;
  font-size: 0.95rem;
  padding: 12px 24px;
}
.btn-primary:hover:not(:disabled) { background: #00e896; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,208,132,0.3); }

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  padding: 6px 14px;
}
.btn-outline:hover { border-color: var(--text-muted); color: var(--text); }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { width: 100%; padding: 14px 24px; font-size: 1rem; }

.btn-chip {
  background: var(--bg-input);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 16px;
  font-size: 0.85rem;
  border-radius: 20px;
}
.btn-chip:hover { border-color: var(--accent); color: var(--accent); }

.btn-copy {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 2px 8px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-copy:hover { color: var(--accent); border-color: var(--accent); }
.btn-copy.copied { color: var(--green); border-color: var(--green); }

/* Spinner */
.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.btn.loading .btn-text { opacity: 0.5; }
.btn.loading .btn-spinner { display: inline-block; }

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

.btn-stripe {
  background: #635bff;
  color: #fff;
  font-size: 0.95rem;
  padding: 14px 24px;
}
.btn-stripe:hover:not(:disabled) { background: #7a73ff; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(99,91,255,0.4); }

.stripe-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 10px;
  text-align: center;
}
.stripe-note code {
  font-family: var(--font-mono);
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--text-muted);
}

.pending-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin-top: 20px;
  animation: fadeIn 0.3s ease;
}
.pending-card h3 { margin-bottom: 8px; font-size: 1rem; }
.pending-card p { color: var(--text-muted); font-size: 0.85rem; }
.pending-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

/* ═══ PROGRESS BAR ═══ */
#progress-bar {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.progress-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.progress-line {
  position: absolute;
  top: 16px;
  left: 60px;
  right: 60px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.progress-line-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.5s ease;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 1;
  cursor: pointer;
  flex: 1;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: all var(--transition);
}

.progress-step.active .step-circle {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(0, 208, 132, 0.3);
}
.progress-step.done .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.step-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.progress-step.active .step-label { color: var(--accent); }
.progress-step.done .step-label { color: var(--text-muted); }

/* ═══ MAIN LAYOUT ═══ */
#app-main {
  flex: 1;
  padding: 24px;
  display: flex;
  justify-content: center;
  overflow-y: auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

#log-panel {
  flex: 0 0 40%;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: #080808;
  max-height: calc(100vh - 160px);
}

/* ═══ STEP PANELS ═══ */
.step-panel { animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.step-header { margin-bottom: 24px; }
.step-header h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 4px; }
.step-subtitle { color: var(--text-muted); font-size: 0.9rem; }

/* ═══ FORMS ═══ */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
}
input:focus, select:focus { border-color: var(--accent); }
input::placeholder { color: var(--text-dim); }
input.mono, .mono { font-family: var(--font-mono); font-size: 0.85rem; }

select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
select option { background: var(--bg-card); color: var(--text); }

.input-with-prefix {
  display: flex;
  align-items: stretch;
}
.input-prefix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
}
.input-with-prefix input {
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 600;
}

.quick-amounts { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

/* ═══ PREVIEW BOX ═══ */
.preview-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.preview-row.highlight { color: var(--text); font-weight: 600; font-size: 1rem; }
.preview-row + .preview-row { border-top: 1px solid var(--border); }

.progress-bar-mini {
  width: 120px;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-mini-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ═══ RESULT CARDS ═══ */
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 1.1rem;
  font-weight: 600;
}
.result-header .check { color: var(--green); font-size: 1.3rem; }

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.result-row:last-of-type { border-bottom: none; }
.result-label { color: var(--text-muted); }
.result-value { font-family: var(--font-mono); color: var(--text); display: flex; align-items: center; gap: 6px; }
.result-value.green { color: var(--green); }

.result-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue);
  text-decoration: none;
  font-size: 0.85rem;
  margin-top: 12px;
  transition: color var(--transition);
}
.result-link:hover { color: #6cb5ff; }

.result-actions { margin-top: 16px; display: flex; gap: 8px; }

.btn-next {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-next:hover { background: var(--accent); color: #000; }

/* ═══ MINI WALLET CARD ═══ */
.mini-wallet-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
}
.mini-wallet-card .mw-name { font-weight: 600; }
.mini-wallet-card .mw-addr { font-family: var(--font-mono); color: var(--text-muted); font-size: 0.8rem; }
.mini-wallet-card .mw-bal { margin-left: auto; color: var(--accent); font-family: var(--font-mono); font-weight: 600; }

/* ═══ WALLET PAIR (Payment step) ═══ */
.wallet-pair {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.wallet-card-mini {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}
.wallet-card-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.wallet-card-balance { font-family: var(--font-mono); font-size: 1.2rem; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.wallet-card-address { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim); }
.wallet-merchant .wallet-card-balance { color: var(--purple); }

.wallet-arrow {
  font-size: 1.5rem;
  color: var(--text-dim);
  animation: arrowPulse 1.5s infinite;
}
@keyframes arrowPulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; color: var(--accent); } }

/* ═══ LOG PANEL ═══ */
.log-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.log-title { font-weight: 600; font-size: 0.9rem; }
.log-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  color: var(--text-dim);
}

.log-entries {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
}

.log-entry {
  padding: 2px 16px;
  display: flex;
  gap: 8px;
  animation: logFade 0.2s ease;
  white-space: nowrap;
}
.log-entry:hover { background: rgba(255,255,255,0.02); }

@keyframes logFade { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: translateX(0); } }

.log-time { color: var(--text-dim); flex-shrink: 0; }
.log-type { font-weight: 600; width: 48px; flex-shrink: 0; text-align: right; }
.log-msg { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }

.log-type.INFO { color: var(--text-dim); }
.log-type.API { color: var(--blue); }
.log-type.CHAIN { color: var(--purple); }
.log-type.OK { color: var(--green); }
.log-type.ERR { color: var(--red); }
.log-type.DB { color: var(--orange); }

/* ═══ STATS BAR ═══ */
#stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 10px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.stat-item { display: flex; align-items: center; gap: 8px; padding: 0 24px; }
.stat-label { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-family: var(--font-mono); font-weight: 600; color: var(--text); font-size: 0.9rem; }
.stat-divider { width: 1px; height: 20px; background: var(--border); }

/* ═══ TX HISTORY ═══ */
.tx-history {
  margin-top: 24px;
  animation: fadeIn 0.3s ease;
}
.tx-history h3 { font-size: 1rem; margin-bottom: 12px; font-weight: 600; }

.table-wrapper { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
th {
  text-align: left;
  padding: 8px 12px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-family: var(--font-mono);
  color: var(--text-muted);
}
tr:hover td { background: rgba(255,255,255,0.02); }

.type-mint { color: var(--green); }
.type-payment { color: var(--blue); }
.status-confirmed { color: var(--green); }
.status-pending { color: var(--orange); }
.status-processing { color: var(--blue); }
.status-failed { color: var(--red); }

/* ═══ DEMO COMPLETE ═══ */
.demo-complete-card {
  background: linear-gradient(135deg, rgba(0, 208, 132, 0.08), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(0, 208, 132, 0.2);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 24px;
  text-align: center;
  animation: slideUp 0.4s ease;
}
.demo-complete-icon { font-size: 2.5rem; color: var(--green); margin-bottom: 8px; }
.demo-complete-card h2 { font-size: 1.3rem; margin-bottom: 8px; }
.demo-complete-card > p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }

.demo-complete-grid { display: flex; gap: 16px; justify-content: center; }
.demo-compare {
  flex: 1;
  max-width: 220px;
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius);
  padding: 16px;
  text-align: left;
}
.demo-compare-header { font-weight: 600; font-size: 0.85rem; margin-bottom: 8px; color: var(--accent); }
.demo-compare ul { list-style: none; }
.demo-compare li {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 3px 0;
  padding-left: 14px;
  position: relative;
}
.demo-compare li::before { content: '→'; position: absolute; left: 0; color: var(--text-dim); }

/* ═══ ERROR ═══ */
.error-msg {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-top: 12px;
  animation: fadeIn 0.2s ease;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1100px) {
  #app-main { flex-direction: column; }
  #main-panel { flex: none; max-height: none; }
  #log-panel { flex: none; height: 300px; border-left: none; border-top: 1px solid var(--border); }
}

/* ═══ FAN SHOP ═══ */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.shop-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.shop-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 12px 24px rgba(0, 255, 136, 0.1);
}

.shop-card-image {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
}

.shop-card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.shop-card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.shop-card .price-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(0, 255, 136, 0.1);
  color: var(--primary);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 12px 0;
}

.shop-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 15px;
}

.shop-card .btn-shop {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
}

.shop-card .btn-shop:hover {
  background: #00dd77;
  transform: scale(1.02);
}

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

