/* SolAgent Pay — Stylesheet
   Colosseum Global Hackathon 2026 | Lamina Build */

:root {
  --bg:      #0a0a0f;
  --surface: #111118;
  --border:  #1e1e2e;
  --accent:  #9945FF;
  --accent2: #14F195;
  --text:    #e8e8f0;
  --muted:   #6b6b80;
  --danger:  #ff4f4f;
  --card:    #13131c;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* GRID BACKGROUND */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(153,69,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(153,69,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none; z-index: 0;
}

.glow-blob {
  position: fixed; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(153,69,255,0.12) 0%, transparent 70%);
  top: -200px; right: -200px; pointer-events: none; z-index: 0;
  animation: blobFloat 8s ease-in-out infinite alternate;
}
.glow-blob2 {
  position: fixed; width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(20,241,149,0.08) 0%, transparent 70%);
  bottom: -100px; left: -100px; pointer-events: none; z-index: 0;
  animation: blobFloat 10s ease-in-out infinite alternate-reverse;
}
@keyframes blobFloat {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(30px, 40px) scale(1.1); }
}

.wrapper {
  position: relative; z-index: 1;
  max-width: 980px; margin: 0 auto; padding: 0 24px;
}

/* HEADER */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 0 24px; border-bottom: 1px solid var(--border);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.2rem; font-weight: 800; letter-spacing: -0.5px;
}
.logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.badge {
  font-family: 'Space Mono', monospace; font-size: 0.65rem;
  background: rgba(153,69,255,0.15); border: 1px solid rgba(153,69,255,0.3);
  color: var(--accent); padding: 3px 10px; border-radius: 100px;
  letter-spacing: 1px; text-transform: uppercase;
}
.badge.green {
  background: rgba(20,241,149,0.1); border-color: rgba(20,241,149,0.3); color: var(--accent2);
}

/* HERO */
.hero {
  padding: 64px 0 48px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.hero-tag {
  font-family: 'Space Mono', monospace; font-size: 0.7rem; color: var(--accent2);
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.hero-tag::before { content: ''; display: block; width: 20px; height: 1px; background: var(--accent2); }
h1 { font-size: 3.2rem; font-weight: 800; line-height: 1.05; letter-spacing: -2px; margin-bottom: 20px; }
h1 span {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-desc { color: var(--muted); font-size: 1rem; line-height: 1.7; margin-bottom: 32px; }
.stats { display: flex; gap: 24px; margin-bottom: 32px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-value { font-size: 1.4rem; font-weight: 800; color: var(--accent2); }
.stat-label {
  font-family: 'Space Mono', monospace; font-size: 0.65rem;
  color: var(--muted); text-transform: uppercase; letter-spacing: 1px;
}

/* WALLET CARD */
.wallet-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px; position: relative; overflow: hidden;
}
.wallet-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.wallet-label {
  font-family: 'Space Mono', monospace; font-size: 0.65rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px;
}
.wallet-connect-btn {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--accent), #7b2ff7);
  border: none; border-radius: 10px; color: white;
  font-family: 'Syne', sans-serif; font-size: 0.9rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s; letter-spacing: 0.5px;
}
.wallet-connect-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(153,69,255,0.35); }
.wallet-connected { display: none; }
.wallet-address {
  font-family: 'Space Mono', monospace; font-size: 0.75rem; color: var(--accent2);
  background: rgba(20,241,149,0.08); border: 1px solid rgba(20,241,149,0.2);
  padding: 8px 12px; border-radius: 8px; margin-bottom: 12px; word-break: break-all;
}
.balance-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.balance-amount { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.balance-amount span { font-size: 0.8rem; color: var(--muted); font-weight: 400; margin-left: 4px; }

/* SECTIONS */
.section-title {
  font-size: 0.7rem; font-family: 'Space Mono', monospace;
  text-transform: uppercase; letter-spacing: 2px; color: var(--muted);
  margin-bottom: 20px; display: flex; align-items: center; gap: 12px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* TASKS */
.tasks-section { padding: 48px 0 0; }
.tasks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 40px; }
.task-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px; cursor: pointer; transition: all 0.25s;
}
.task-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(153,69,255,0.15); }
.task-card.selected { border-color: var(--accent2); background: rgba(20,241,149,0.05); }
.task-icon { font-size: 1.8rem; margin-bottom: 12px; }
.task-name { font-size: 0.9rem; font-weight: 700; margin-bottom: 6px; }
.task-desc { font-size: 0.75rem; color: var(--muted); line-height: 1.5; margin-bottom: 14px; }
.task-price { font-family: 'Space Mono', monospace; font-size: 0.8rem; color: var(--accent2); font-weight: 700; }

/* AGENT PANEL */
.agent-panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; margin-bottom: 40px;
}
.agent-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.agent-info { display: flex; align-items: center; gap: 12px; }
.agent-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.agent-name { font-size: 0.9rem; font-weight: 700; }
.agent-status {
  font-family: 'Space Mono', monospace; font-size: 0.65rem; color: var(--accent2);
  display: flex; align-items: center; gap: 5px;
}
.dot {
  width: 6px; height: 6px; background: var(--accent2); border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}
.price-tag {
  background: rgba(153,69,255,0.1); border: 1px solid rgba(153,69,255,0.25);
  border-radius: 6px; padding: 4px 10px;
  font-family: 'Space Mono', monospace; font-size: 0.7rem; color: var(--accent);
}

/* CHAT */
.chat-area {
  height: 320px; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth;
}
.chat-area::-webkit-scrollbar { width: 4px; }
.chat-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.msg { display: flex; gap: 10px; animation: msgIn 0.3s ease forwards; }
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg.user { flex-direction: row-reverse; }
.msg-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.msg.agent .msg-avatar { background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.msg.user  .msg-avatar { background: var(--border); }
.msg-bubble { max-width: 75%; padding: 10px 14px; border-radius: 12px; font-size: 0.85rem; line-height: 1.6; }
.msg.agent .msg-bubble { background: var(--surface); border: 1px solid var(--border); border-top-left-radius: 2px; }
.msg.user  .msg-bubble { background: rgba(153,69,255,0.15); border: 1px solid rgba(153,69,255,0.3); border-top-right-radius: 2px; }
.msg-bubble.typing { display: flex; gap: 4px; align-items: center; padding: 12px 16px; }
.typing-dot { width: 6px; height: 6px; background: var(--muted); border-radius: 50%; animation: typingBounce 1s ease-in-out infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40%            { transform: translateY(-6px); opacity: 1; }
}

/* PAYMENT BAR */
.payment-bar {
  padding: 16px 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,0.2);
}
.task-input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; color: var(--text);
  font-family: 'Syne', sans-serif; font-size: 0.85rem; outline: none; transition: border-color 0.2s;
}
.task-input:focus { border-color: var(--accent); }
.task-input::placeholder { color: var(--muted); }
.pay-btn {
  background: linear-gradient(135deg, var(--accent2), #0ecc7e);
  border: none; border-radius: 8px; padding: 10px 20px;
  color: #0a0a0f; font-family: 'Syne', sans-serif; font-size: 0.85rem; font-weight: 800;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.pay-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(20,241,149,0.3); }
.pay-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px); z-index: 100;
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 32px; width: 420px; max-width: 90vw;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }
.modal-sub { color: var(--muted); font-size: 0.82rem; margin-bottom: 24px; line-height: 1.6; }
.modal-detail { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 20px; }
.modal-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; padding: 6px 0; }
.modal-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.modal-row-label { color: var(--muted); }
.modal-row-value { font-family: 'Space Mono', monospace; font-size: 0.78rem; }
.modal-row-value.green { color: var(--accent2); }
.modal-actions { display: flex; gap: 10px; }
.btn-cancel {
  flex: 1; padding: 12px; background: transparent; border: 1px solid var(--border);
  border-radius: 10px; color: var(--muted); font-family: 'Syne', sans-serif;
  font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-cancel:hover { border-color: var(--danger); color: var(--danger); }
.btn-confirm {
  flex: 2; padding: 12px; background: linear-gradient(135deg, var(--accent), #7b2ff7);
  border: none; border-radius: 10px; color: white;
  font-family: 'Syne', sans-serif; font-size: 0.85rem; font-weight: 800;
  cursor: pointer; transition: all 0.2s;
}
.btn-confirm:hover { box-shadow: 0 6px 20px rgba(153,69,255,0.35); }

/* TOAST */
.toast {
  position: fixed; bottom: 32px; right: 32px;
  background: var(--card); border: 1px solid rgba(20,241,149,0.3);
  border-radius: 12px; padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
  z-index: 200; transform: translateY(80px); opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-icon { font-size: 1.4rem; }
.toast-title { font-weight: 700; color: var(--accent2); font-size: 0.82rem; }
.toast-sub { color: var(--muted); font-family: 'Space Mono', monospace; font-size: 0.7rem; }

/* TX LOG */
.tx-section { padding: 0 0 64px; }
.tx-list { display: flex; flex-direction: column; gap: 8px; }
.tx-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.82rem; animation: msgIn 0.3s ease forwards;
}
.tx-left { display: flex; align-items: center; gap: 12px; }
.tx-icon {
  width: 32px; height: 32px; background: rgba(20,241,149,0.1);
  border: 1px solid rgba(20,241,149,0.2); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.tx-task { font-weight: 700; }
.tx-hash { font-family: 'Space Mono', monospace; font-size: 0.65rem; color: var(--muted); }
.tx-amount { font-family: 'Space Mono', monospace; font-size: 0.85rem; color: var(--accent2); font-weight: 700; }
.tx-status { display: flex; align-items: center; gap: 4px; font-family: 'Space Mono', monospace; font-size: 0.65rem; color: var(--accent2); }

/* SPINNER */
.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.2);
  border-top-color: white; border-radius: 50%;
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* FOOTER */
footer {
  border-top: 1px solid var(--border); padding: 28px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-left { font-family: 'Space Mono', monospace; font-size: 0.7rem; color: var(--muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-family: 'Space Mono', monospace; font-size: 0.65rem; color: var(--muted);
  text-decoration: none; text-transform: uppercase; letter-spacing: 1px; transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent2); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; }
  h1 { font-size: 2.2rem; }
  .tasks-grid { grid-template-columns: 1fr 1fr; }
  .stats { flex-wrap: wrap; gap: 16px; }
}
@media (max-width: 480px) {
  .tasks-grid { grid-template-columns: 1fr; }
}
