/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --secondary: #06b6d4;
  --accent: #f59e0b;
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a2e;
  --card: #16162a;
  --border: rgba(124, 58, 237, 0.25);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(124,58,237,0.15);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-brand { display: flex; align-items: center; gap: 12px; }

.nav-logo {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px; letter-spacing: 0.5px;
  box-shadow: 0 0 20px rgba(124,58,237,0.5);
}

.nav-name { font-weight: 700; font-size: 16px; }

.nav-links {
  display: flex; list-style: none; gap: 32px;
}

.nav-links a {
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.btn-connect {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; border: none; padding: 10px 22px;
  border-radius: 50px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: opacity 0.2s, transform 0.1s;
}
.btn-connect:hover { opacity: 0.9; transform: translateY(-1px); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: space-between;
  padding: 120px 80px 80px;
  position: relative; overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.35;
  animation: float 8s ease-in-out infinite;
}
.orb1 { width: 500px; height: 500px; background: var(--primary); top: -150px; left: -100px; }
.orb2 { width: 350px; height: 350px; background: var(--secondary); bottom: -100px; right: 200px; animation-delay: -3s; }
.orb3 { width: 250px; height: 250px; background: var(--accent); top: 40%; right: -50px; animation-delay: -5s; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

.hero-content { position: relative; z-index: 1; max-width: 560px; }

.token-badge {
  display: inline-block; padding: 6px 16px;
  background: rgba(124,58,237,0.2); border: 1px solid var(--border);
  border-radius: 50px; font-size: 13px; font-weight: 600;
  color: var(--primary-light); margin-bottom: 24px;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(124,58,237,0); }
}

.hero-title {
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 900; line-height: 1.1;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted); font-size: 18px;
  margin-bottom: 36px; line-height: 1.7;
}

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #5b21b6);
  color: white; padding: 14px 28px; border-radius: 50px;
  font-weight: 600; font-size: 15px; border: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124,58,237,0.5);
}

.btn-secondary {
  background: transparent; color: var(--text);
  padding: 14px 28px; border-radius: 50px;
  border: 1px solid var(--border); font-weight: 600; font-size: 15px;
  cursor: pointer; transition: background 0.2s, transform 0.2s;
  display: inline-flex; align-items: center;
}
.btn-secondary:hover {
  background: rgba(124,58,237,0.1); transform: translateY(-2px);
}

/* Wallet card in hero */
.wallet-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--border);
  padding: 20px 28px; border-radius: var(--radius);
  max-width: 340px;
}
.wallet-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.wallet-balance { font-size: 28px; font-weight: 800; color: var(--primary-light); }
.wallet-addr { font-size: 11px; color: var(--text-muted); font-family: monospace; word-break: break-all; }

/* ===== COIN ANIMATION ===== */
.hero-coin {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
}

.coin {
  width: 280px; height: 280px; border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #06b6d4, #f59e0b);
  display: flex; align-items: center; justify-content: center;
  animation: coin-spin 6s ease-in-out infinite, coin-glow 3s ease-in-out infinite;
  box-shadow: 0 0 60px rgba(124,58,237,0.6), 0 0 120px rgba(6,182,212,0.3);
  position: relative;
}

.coin::before {
  content: '';
  position: absolute; inset: 8px; border-radius: 50%;
  background: linear-gradient(135deg, #1a1a2e, #0a0a1f);
}

.coin-face {
  position: relative; z-index: 1;
  font-size: 48px; font-weight: 900; letter-spacing: 2px;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes coin-spin {
  0%, 100% { transform: rotateY(0deg) scale(1); }
  25% { transform: rotateY(15deg) scale(1.02); }
  75% { transform: rotateY(-15deg) scale(1.02); }
}

@keyframes coin-glow {
  0%, 100% { box-shadow: 0 0 60px rgba(124,58,237,0.6), 0 0 120px rgba(6,182,212,0.3); }
  50% { box-shadow: 0 0 80px rgba(124,58,237,0.9), 0 0 160px rgba(6,182,212,0.5); }
}

/* ===== STATS ===== */
.stats {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}

.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}

.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 24px; text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.stat-icon { font-size: 32px; margin-bottom: 12px; }
.stat-value { font-size: 32px; font-weight: 800; color: var(--primary-light); margin-bottom: 6px; }
.stat-label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* ===== SECTION HEADERS ===== */
.section-header {
  text-align: center; margin-bottom: 56px;
}
.section-header h2 {
  font-size: clamp(32px, 4vw, 48px); font-weight: 800; margin-bottom: 12px;
}
.section-header p { color: var(--text-muted); font-size: 17px; }

/* ===== ABOUT ===== */
.about {
  padding: 100px 0;
  background: var(--bg2);
}

.about-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}

.about-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 32px;
  transition: transform 0.2s, border-color 0.2s;
}
.about-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124,58,237,0.5);
}
.about-icon { font-size: 36px; margin-bottom: 16px; }
.about-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.about-card p { color: var(--text-muted); line-height: 1.7; }

/* ===== CONTRACT ===== */
.contract-section {
  padding: 100px 0;
  background: var(--bg);
}

.contract-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}

.contract-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px; border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}
.contract-row:hover { background: rgba(124,58,237,0.05); }
.contract-row:last-of-type { border-bottom: none; }

.contract-key { color: var(--text-muted); font-size: 14px; font-weight: 500; }
.contract-val { font-weight: 600; font-size: 15px; }

.address-val {
  display: flex; align-items: center; gap: 12px;
  font-family: monospace; font-size: 13px;
}

.copy-btn {
  background: rgba(124,58,237,0.2); border: 1px solid var(--border);
  color: var(--text); padding: 4px 10px; border-radius: 8px;
  cursor: pointer; font-size: 13px; transition: background 0.2s;
}
.copy-btn:hover { background: rgba(124,58,237,0.4); }

.contract-links {
  display: flex; gap: 16px; padding: 28px 32px;
  background: rgba(124,58,237,0.05); flex-wrap: wrap;
}

.btn-metamask {
  display: inline-flex; align-items: center; gap: 10px;
  background: #f6851b;
  color: white; padding: 14px 28px; border-radius: 50px;
  border: none; font-weight: 600; font-size: 15px;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
}
.btn-metamask:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(246,133,27,0.4);
}
.btn-metamask.large { padding: 16px 32px; font-size: 16px; }

/* ===== HOW TO ===== */
.how {
  padding: 100px 0;
  background: var(--bg2);
}

.steps-grid {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 56px;
}

.step-card {
  flex: 1; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 28px;
  transition: transform 0.2s, border-color 0.2s;
}
.step-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124,58,237,0.5);
}

.step-number {
  font-size: 48px; font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 16px;
}
.step-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.step-card p { color: var(--text-muted); line-height: 1.7; font-size: 14px; }
.step-card a { color: var(--primary-light); text-decoration: underline; }

.step-arrow {
  font-size: 28px; color: var(--primary-light); flex-shrink: 0;
}

.import-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px;
  text-align: center; max-width: 680px; margin: 0 auto;
}
.import-label { color: var(--text-muted); margin-bottom: 16px; font-size: 14px; }
.import-addr {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
  background: rgba(0,0,0,0.3); border: 1px solid var(--border);
  padding: 16px 24px; border-radius: 12px; margin-bottom: 28px;
}
.import-addr code {
  font-family: monospace; font-size: 13px;
  color: var(--primary-light); word-break: break-all;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 60px 0; text-align: center;
}
.footer-brand {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 20px; font-weight: 700; font-size: 18px;
}
.footer-note { color: var(--text-muted); font-size: 13px; margin-bottom: 24px; }
.footer-links {
  display: flex; justify-content: center; gap: 32px; margin-bottom: 24px;
}
.footer-links a { color: var(--primary-light); font-size: 14px; }
.footer-links a:hover { text-decoration: underline; }
.footer-copy { color: var(--text-muted); font-size: 12px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  background: #10b981; color: white; padding: 14px 28px;
  border-radius: 50px; font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, bottom 0.3s;
  z-index: 999;
}
.toast.show { opacity: 1; bottom: 40px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero { flex-direction: column; padding: 120px 24px 60px; text-align: center; gap: 48px; }
  .hero-buttons { justify-content: center; }
  .hero-wallet { display: flex !important; justify-content: center; }
  .hero-coin { order: -1; }
  .coin { width: 180px; height: 180px; }
  .coin-face { font-size: 32px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .steps-grid { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); }
  .navbar { padding: 16px 20px; }
  .nav-links { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .contract-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .address-val { flex-direction: column; align-items: flex-start; }
}


/* ===================================================
   AI CHAT SUPPORT WIDGET
   =================================================== */

/* Launcher button (bottom-right bubble) */
.chat-launcher {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.55);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: launcher-pulse 3s ease-in-out infinite;
}
.chat-launcher:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.75);
}
@keyframes launcher-pulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(124, 58, 237, 0.55); }
  50%       { box-shadow: 0 8px 48px rgba(124, 58, 237, 0.85); }
}
.chat-launcher-icon { font-size: 26px; transition: transform 0.3s; }
.chat-launcher.open .chat-launcher-icon { transform: rotate(90deg); }

/* Unread badge */
.chat-unread {
  position: absolute;
  top: 2px; right: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

/* Chat window */
.chat-window {
  position: fixed;
  bottom: 108px;
  right: 32px;
  width: 380px;
  max-height: 580px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  z-index: 901;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  transform: scale(0.85) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transform-origin: bottom right;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}
.chat-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Header */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(6,182,212,0.15));
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.chat-title   { font-weight: 700; font-size: 15px; }
.chat-status  { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.status-dot   {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.chat-close {
  background: rgba(255,255,255,0.08);
  border: none; color: var(--text-muted);
  width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer; font-size: 13px;
  transition: background 0.2s, color 0.2s;
}
.chat-close:hover { background: rgba(239,68,68,0.2); color: #ef4444; }

/* Messages area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.3); border-radius: 4px; }

/* Message rows */
.chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  animation: msg-in 0.3s ease;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-msg.user { flex-direction: row-reverse; }

.msg-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}

.msg-bubble {
  max-width: 78%;
  padding: 11px 15px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}
.chat-msg.bot  .msg-bubble {
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text);
}
.chat-msg.user .msg-bubble {
  background: linear-gradient(135deg, var(--primary), #5b21b6);
  border-bottom-right-radius: 4px;
  color: white;
}

/* Typing indicator */
.typing-bubble {
  display: flex; gap: 4px;
  align-items: center;
  padding: 14px 18px;
}
.typing-bubble span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary-light);
  animation: typing-dot 1.2s ease-in-out infinite;
}
.typing-bubble span:nth-child(2) { animation-delay: 0.2s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-dot {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1;   }
}

/* Suggestion chips */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 0 40px;
}
.suggestion-chip {
  background: rgba(124,58,237,0.15);
  border: 1px solid var(--border);
  color: var(--primary-light);
  padding: 6px 13px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-family: 'Inter', sans-serif;
}
.suggestion-chip:hover {
  background: rgba(124,58,237,0.35);
  transform: translateY(-1px);
}

/* Input area */
.chat-input-area {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 50px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--primary); }
.chat-input::placeholder { color: var(--text-muted); }

.chat-send {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  color: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s, opacity 0.2s;
}
.chat-send:hover:not(:disabled) { transform: scale(1.1); }
.chat-send:disabled { opacity: 0.45; cursor: not-allowed; }

.chat-footer-note {
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  padding: 0 16px 10px;
  background: var(--bg);
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .chat-window  { width: calc(100vw - 24px); right: 12px; bottom: 96px; }
  .chat-launcher { right: 20px; bottom: 20px; }
}
