/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0a0f; --bg2: #111118; --card: #16161f; --border: #2a2a3a;
  --primary: #7c3aed; --secondary: #06b6d4; --text: #e2e2f0; --muted: #8888aa;
  --radius: 12px;
}
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
.grad {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 40px;
  background: rgba(10,10,15,0.9); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { font-size: 1.4rem; font-weight: 800; }
.nav-logo span { background: linear-gradient(135deg,var(--primary),var(--secondary)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.btn-connect {
  padding: 10px 22px; border-radius: 8px; border: none; cursor: pointer;
  font-size: 0.9rem; font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff;
  transition: opacity .2s;
}
.btn-connect:hover { opacity: 0.85; }

/* ── Profile Pill ────────────────────────────────────────── */
.nav-wallet-area { position: relative; }

.profile-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 14px 5px 5px;
  border-radius: 40px; border: 1px solid var(--border);
  background: var(--card); cursor: pointer;
  transition: border-color .2s; user-select: none;
  position: relative;
}
.profile-pill:hover { border-color: var(--primary); }

.profile-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; color: #fff; flex-shrink: 0;
}
.profile-info { display: flex; flex-direction: column; gap: 1px; }
.profile-addr { font-size: 0.85rem; font-weight: 600; font-family: monospace; }
.profile-net  { font-size: 0.68rem; color: #22c55e; font-weight: 600; }
.profile-arrow { font-size: 0.7rem; color: var(--muted); }

/* ── Dropdown ────────────────────────────────────────────── */
.profile-dropdown {
  display: none;
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 230px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5); z-index: 9999;
}
.profile-dropdown.open { display: block; }

.dd-header { display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.dd-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; color: #fff; flex-shrink: 0;
}
.dd-addr { font-size: 0.82rem; font-family: monospace; color: var(--text); }
.dd-bal  { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.dd-sep  { height: 1px; background: var(--border); }

.dd-btn {
  display: block; width: 100%; padding: 13px 18px;
  background: transparent; border: none; color: var(--text);
  cursor: pointer; text-align: left; font-size: 0.9rem;
  transition: background .2s;
}
.dd-btn:hover { background: rgba(124,58,237,0.12); }
.dd-logout { color: #f87171 !important; }
.dd-logout:hover { background: rgba(239,68,68,0.1) !important; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 48px; padding: 100px 40px 80px; max-width: 1100px; margin: 0 auto;
}
.hero-content { flex: 1; }
.hero-badge {
  display: inline-block; margin-bottom: 20px; padding: 6px 14px;
  border-radius: 20px; border: 1px solid var(--border);
  font-size: 0.8rem; color: var(--muted); letter-spacing: .5px;
}
.hero h1 { font-size: clamp(2.4rem,5vw,3.8rem); font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.hero-sub { font-size: 1.05rem; color: var(--muted); max-width: 480px; margin-bottom: 36px; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary {
  padding: 14px 28px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; font-weight: 600; text-decoration: none; transition: opacity .2s;
}
.btn-primary:hover { opacity: .85; }
.btn-outline {
  padding: 14px 28px; border-radius: var(--radius);
  border: 1px solid var(--border); color: var(--text);
  font-weight: 600; text-decoration: none; transition: border-color .2s;
}
.btn-outline:hover { border-color: var(--primary); }
.hero-coin { flex-shrink: 0; }
.coin-outer {
  width: 220px; height: 220px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  animation: float 3s ease-in-out infinite;
  box-shadow: 0 0 60px rgba(124,58,237,.4);
}
.coin-inner {
  width: 180px; height: 180px; border-radius: 50%; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; font-weight: 900;
  background: linear-gradient(135deg,var(--primary),var(--secondary));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
@keyframes float { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-16px); } }

/* ── Wallet Card ─────────────────────────────────────────── */
#walletSection { padding: 0 24px 32px; }
.wallet-card {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 24px 32px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--primary);
}
.wc-icon { font-size: 2rem; }
.wc-info, .wc-bal, .wc-eth { flex: 1; min-width: 120px; }
.wc-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.wc-addr  { font-family: monospace; font-size: 0.85rem; word-break: break-all; }
.wc-amount { font-size: 1.6rem; font-weight: 700; }

.btn-refresh {
  padding: 8px 18px; border-radius: 8px; cursor: pointer;
  font-size: 0.85rem; font-weight: 600;
  background: rgba(124,58,237,0.15); color: #a78bfa;
  border: 1px solid var(--primary); transition: opacity .2s;
  white-space: nowrap;
}
.btn-refresh:hover { opacity: 0.8; }

/* ── Sections ────────────────────────────────────────────── */
.section { padding: 80px 40px; }
.section-dark { background: var(--bg2); }
.section-title { font-size: clamp(1.8rem,3vw,2.6rem); font-weight: 800; text-align: center; margin-bottom: 16px; }
.section-sub { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 56px; font-size: 1.05rem; }

/* ── Charts ──────────────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 28px;
}
.chart-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.chart-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.chart-sub   { font-size: 0.85rem; color: var(--muted); margin-bottom: 20px; }
.chart-wrap  { position: relative; height: 300px; }
.chart-wrap canvas { max-height: 300px; }
.chart-note  { margin-top: 12px; font-size: 0.8rem; color: var(--muted); text-align: center; font-style: italic; }
.pie-legend  { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; justify-content: center; }
.leg-item    { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; color: var(--muted); }
.leg-dot     { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }

/* ── About Cards ─────────────────────────────────────────── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 24px; }
.card { padding: 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--primary); transform: translateY(-4px); }
.card-icon { font-size: 2rem; margin-bottom: 12px; }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p  { color: var(--muted); font-size: .9rem; }

/* ── Tokenomics ──────────────────────────────────────────── */
.token-grid { display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 48px; justify-content: center; }
.token-stat { text-align: center; padding: 28px 32px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); flex: 1; min-width: 140px; max-width: 200px; }
.stat-val { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; }
.stat-lbl { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.dist-box { padding: 32px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); }
.dist-box h3 { margin-bottom: 20px; }
.dist-bar  { height: 40px; border-radius: 8px; overflow: hidden; background: var(--border); margin-bottom: 16px; }
.dist-fill { height: 100%; width: 100%; background: linear-gradient(135deg,var(--primary),var(--secondary)); display: flex; align-items: center; padding: 0 16px; font-size: .85rem; font-weight: 600; color: #fff; }
.dist-note { color: var(--muted); font-size: .9rem; }

/* ── Steps ───────────────────────────────────────────────── */
.steps { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.step { flex: 1; min-width: 200px; padding: 28px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); }
.step-num { font-size: 2rem; font-weight: 900; margin-bottom: 12px; background: linear-gradient(135deg,var(--primary),var(--secondary)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.step h3 { margin-bottom: 8px; }
.step p  { color: var(--muted); font-size: .9rem; }
.step-arrow { font-size: 2rem; color: var(--muted); align-self: center; }

/* ── Contract ────────────────────────────────────────────── */
.contract-box { max-width: 720px; margin: 0 auto; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.contract-row { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 8px; }
.c-label { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; }
.c-val   { font-family: monospace; font-size: .9rem; word-break: break-all; }
.c-val-row { display: flex; align-items: center; gap: 12px; }
.btn-copy { padding: 6px 14px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; font-size: .8rem; transition: border-color .2s; }
.btn-copy:hover { border-color: var(--primary); }
.btn-etherscan { display: block; text-align: center; padding: 18px; background: linear-gradient(135deg,var(--primary),var(--secondary)); color: #fff; font-weight: 600; text-decoration: none; transition: opacity .2s; }
.btn-etherscan:hover { opacity: .85; }

/* ── Footer ──────────────────────────────────────────────── */
.footer { text-align: center; padding: 48px 24px; border-top: 1px solid var(--border); color: var(--muted); }
.footer-logo { font-size: 1.4rem; font-weight: 700; margin-bottom: 12px; background: linear-gradient(135deg,var(--primary),var(--secondary)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.footer p { font-size: .9rem; margin-bottom: 4px; }
.footer-note { font-size: .8rem; opacity: .6; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 14px 20px; }
  .nav-links { display: none; }
  .hero { flex-direction: column; padding: 60px 20px 40px; text-align: center; }
  .hero-sub { margin: 0 auto 32px; }
  .hero-btns { justify-content: center; }
  .hero-coin { order: -1; }
  .coin-outer { width: 160px; height: 160px; }
  .coin-inner { width: 130px; height: 130px; font-size: 2.5rem; }
  .section { padding: 60px 20px; }
  .step-arrow { display: none; }
  .steps { flex-direction: column; }
  .charts-grid { grid-template-columns: 1fr; }
}

/* ── Send TC Section ─────────────────────────────────────── */
.send-box {
  display: flex; gap: 28px; flex-wrap: wrap;
  max-width: 860px; margin: 0 auto;
}
.send-form {
  flex: 2; min-width: 280px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
}
.send-field { margin-bottom: 20px; }
.send-label { display: block; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.send-input {
  width: 100%; padding: 12px 16px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: 1rem; outline: none;
  transition: border-color .2s;
}
.send-input:focus { border-color: var(--primary); }
.send-input::placeholder { color: var(--muted); }
.btn-send {
  width: 100%; padding: 14px; border-radius: 8px; border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: opacity .2s; margin-top: 4px;
}
.btn-send:hover { opacity: .85; }
.btn-send:disabled { opacity: .5; cursor: not-allowed; }
.send-status { margin-top: 14px; font-size: 0.9rem; min-height: 20px; }
.send-status.success { color: #22c55e; }
.send-status.error   { color: #f87171; }
.send-status.warn    { color: #f59e0b; }
.send-status.info    { color: var(--muted); }
.tx-link { color: #06b6d4; text-decoration: underline; }
.send-info {
  flex: 1; min-width: 220px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.send-info-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.9rem; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.send-info-row:last-child { border-bottom: none; padding-bottom: 0; }
.send-info-row span:first-child { color: var(--muted); }
.send-info-row span:last-child  { font-weight: 600; }
.send-contract { font-family: monospace; font-size: 0.8rem; }

/* ── Chatbot ─────────────────────────────────────────────── */
.chat-bubble {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; cursor: pointer;
  box-shadow: 0 4px 20px rgba(124,58,237,.5);
  transition: transform .2s;
}
.chat-bubble:hover { transform: scale(1.1); }

.chat-window {
  position: fixed; bottom: 96px; right: 28px; z-index: 9999;
  width: 360px; max-height: 500px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}

.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.chat-header-info { display: flex; align-items: center; gap: 10px; }
.chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; color: #fff;
}
.chat-name   { font-weight: 700; font-size: 0.9rem; color: #fff; }
.chat-status { font-size: 0.7rem; color: rgba(255,255,255,.8); }
.chat-close  { background: transparent; border: none; color: #fff; font-size: 1rem; cursor: pointer; padding: 4px; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  max-height: 320px;
}
.chat-msg {
  max-width: 82%; padding: 10px 14px; border-radius: 12px;
  font-size: 0.88rem; line-height: 1.5; word-break: break-word;
}
.chat-msg.bot  { background: var(--bg2); color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-msg.typing { background: var(--bg2); color: var(--muted); align-self: flex-start; font-style: italic; animation: pulse 1.5s ease-in-out infinite; }

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

.chat-input-row {
  display: flex; gap: 8px; padding: 12px 14px;
  border-top: 1px solid var(--border);
}
.chat-input {
  flex: 1; padding: 10px 14px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: 0.9rem; outline: none;
}
.chat-input:focus { border-color: var(--primary); }
.chat-send-btn {
  padding: 10px 14px; border-radius: 8px; border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; cursor: pointer; font-size: 1rem; transition: opacity .2s;
}
.chat-send-btn:hover { opacity: .85; }

@media (max-width: 600px) {
  .chat-window { width: calc(100vw - 32px); right: 16px; }
  .send-box { flex-direction: column; }
}
