/* ══════════════════════════════
   GOLD THEME VARIABLES
   #f5a623 = primary gold
   #d4891a = gold hover/dark
   #fbbf24 = gold light accent
══════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; background: #0a0a0a; color: #fff; overflow-x: hidden; }

/* ══════════════════════════════
   1. TICKER BAR
══════════════════════════════ */
.ticker-bar {
  background: #000;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 8px 0;
  overflow: hidden;
}
.ticker-track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: tickerScroll 35s linear infinite;
}
.ticker-bar:hover .ticker-track { animation-play-state: paused; }
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-coin {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 999px;
  padding: 5px 12px 5px 6px;
  white-space: nowrap; cursor: pointer;
  transition: border-color 0.15s;
}
.ticker-coin:hover     { border-color: rgba(245,166,35,0.35); }
.ticker-coin img       { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.tc-name               { font-size: 12px; font-weight: 600; color: #fff; }
.tc-addr               { font-size: 11px; color: rgba(255,255,255,0.35); }
.tc-action             { font-size: 11px; font-weight: 600; }
.tc-action.buy         { color: #4ade80; }
.tc-action.sell        { color: #fbbf24; }
.tc-action.launch      { color: #f5a623; }

/* ══════════════════════════════
   2. HEADER
══════════════════════════════ */
.site-header {
  background: #000;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 12px 24px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  position: sticky; top: 0; z-index: 100;
}
.header-left   { display: flex; align-items: center; gap: 14px; }
.site-logo     { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.site-logo img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.logo-text     { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -0.02em; }

.search-wrap     { position: relative; display: flex; align-items: center; }
.search-wrap svg { position: absolute; left: 11px; color: rgba(255,255,255,0.35); pointer-events: none; }
.search-wrap input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 8px 16px 8px 36px;
  font-size: 13px; color: #fff; width: 230px;
  font-family: 'DM Sans', sans-serif; outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.search-wrap input::placeholder { color: rgba(255,255,255,0.3); }
.search-wrap input:focus {
  border-color: rgba(245,166,35,0.5);
  background: rgba(245,166,35,0.05);
}

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

.btn-how {
  background: transparent; border: none; color: rgba(255,255,255,0.6);
  font-size: 14px; font-family: 'DM Sans', sans-serif; font-weight: 500;
  cursor: pointer; padding: 7px 13px; border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.btn-how:hover { color: #fff; background: rgba(255,255,255,0.07); }

/* Login button — gold */
.btn-launch {
  background: #f5a623;
  border: none; color: #000;
  font-size: 14px; font-family: 'DM Sans', sans-serif; font-weight: 700;
  cursor: pointer; padding: 8px 20px; border-radius: 999px;
  transition: background 0.15s, transform 0.1s;
}
.btn-launch:hover  { background: #d4891a; color: #000; }
.btn-launch:active { transform: scale(0.97); }

/* Sign In button — gold outline */
.btn-wallet {
  background: transparent;
  border: 1px solid rgba(245,166,35,0.45);
  color: #f5a623;
  font-size: 14px; font-family: 'DM Sans', sans-serif; font-weight: 500;
  cursor: pointer; padding: 8px 18px; border-radius: 999px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.btn-wallet:hover {
  border-color: #f5a623;
  background: rgba(245,166,35,0.08);
  color: #fbbf24;
}

/* ══════════════════════════════
   3. HERO
══════════════════════════════ */
.hero {
  position: relative; padding: 36px 24px 48px;
  overflow: hidden; background-color: #080600;
  background-image:
    /* dark overlay */
    linear-gradient(rgba(8,6,0,0.62) 0%, rgba(8,6,0,0.50) 100%),
    /* subtle grid */
    linear-gradient(rgba(245,166,35,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,166,35,0.03) 1px, transparent 1px),
    /* hero image */
    url('./hero-bg.png');
  background-size: 100% 100%, 48px 48px, 48px 48px, cover;
  background-position: center, center, center, top right;
  background-repeat: no-repeat, repeat, repeat, no-repeat;
}

/* Gold orb — top right */
.hero::before {
  content: ''; position: absolute; top: -100px; right: -60px;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,166,35,0.18) 0%, rgba(212,137,26,0.07) 45%, transparent 70%);
  pointer-events: none; z-index: 0;
  animation: orbFloat 9s ease-in-out infinite;
}

/* Dimmer gold orb — bottom left */
.hero::after {
  content: ''; position: absolute; bottom: -80px; left: 5%;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,166,35,0.10) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
  animation: orbFloat 11s ease-in-out infinite reverse;
}

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-18px) scale(1.03); }
}

.hero-grid {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 240px 1fr 260px;
  gap: 14px; align-items: start;
}

/* LEFT — stat boxes */
.stat-col { display: flex; flex-direction: column; gap: 12px; }

.stat-box {
  background: rgba(18,14,4,0.88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(245,166,35,0.15);
  border-radius: 16px; padding: 20px 22px;
  position: relative; overflow: hidden; transition: border-color 0.2s;
}
.stat-box:hover { border-color: rgba(245,166,35,0.35); }

/* Gold inner glow */
.stat-box::before {
  content: ''; position: absolute; top: -50px; left: -50px;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,166,35,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.stat-icon {
  position: absolute; top: 18px; right: 18px;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.stat-icon.gold-icon { background: rgba(245,166,35,0.18); }
.stat-icon.green     { background: rgba(34,197,94,0.18); }

.stat-label { font-size: 12px; color: rgba(255,255,255,0.4); font-weight: 500; margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 700; color: #fff; letter-spacing: -0.025em; line-height: 1; }

.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2);
  border-radius: 999px; padding: 3px 10px;
  font-size: 11px; color: #4ade80; font-weight: 500; margin-top: 10px;
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #4ade80;
  animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.75); }
}

.claimed-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(245,166,35,0.06); border: 1px solid rgba(245,166,35,0.15);
  border-radius: 999px; padding: 4px 10px 4px 5px;
  font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 11px;
}
.claimed-avatar {
  width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, #f5a623, #d4891a); flex-shrink: 0;
}
.claimed-amount { color: #f5a623; font-weight: 600; }

/* CENTER — coin grid */
.hero-center-box {
  background: rgba(18,14,4,0.88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(245,166,35,0.15);
  border-radius: 16px; padding: 22px 22px 24px;
}
.box-title {
  font-size: 11px; font-weight: 600; color: rgba(245,166,35,0.6);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px;
}
.hero-coins-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.hero-coin-card {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 8px; cursor: pointer;
  background: rgba(245,166,35,0.04); border: 1px solid rgba(245,166,35,0.1);
  border-radius: 12px; transition: transform 0.15s, border-color 0.15s;
}
.hero-coin-card:hover { transform: translateY(-3px); border-color: rgba(245,166,35,0.3); }
.hero-coin-img {
  width: 54px; height: 54px; border-radius: 12px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(245,166,35,0.1);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.hero-coin-img img  { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.hero-coin-name     { font-size: 11px; font-weight: 700; color: #fff; text-align: center; }
.hero-coin-mcap     { font-size: 10px; color: rgba(255,255,255,0.38); text-align: center; }

/* RIGHT — volume */
.vol-box {
  background: rgba(18,14,4,0.88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(245,166,35,0.15);
  border-radius: 16px; padding: 20px 22px;
}
.vol-table { width: 100%; border-collapse: collapse; }
.vol-table thead th {
  font-size: 10px; color: rgba(255,255,255,0.28); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em; padding-bottom: 10px; text-align: left;
}
.vol-table thead th:not(:first-child) { text-align: right; }
.vol-table tbody tr {
  border-top: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s; cursor: pointer;
}
.vol-table tbody tr:hover { background: rgba(245,166,35,0.04); }
.vol-table td             { padding: 9px 0; font-size: 13px; color: #fff; }
.vol-table td:not(:first-child) { text-align: right; }
.vol-coin-cell { display: flex; align-items: center; gap: 8px; }
.vol-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(245,166,35,0.1);
  overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.vol-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.down-badge {
  display: inline-flex; align-items: center; gap: 2px;
  background: rgba(239,68,68,0.1); color: #f87171;
  border-radius: 5px; padding: 1px 5px; font-size: 10px; font-weight: 600;
}
.vol-num { color: rgba(255,255,255,0.55); font-size: 12px; }

/* ══════════════════════════════
   4. COIN LIST TABLE
══════════════════════════════ */
.coin-list-section { max-width: 1280px; margin: 0 auto; padding: 28px 24px 60px; }

.coin-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.coin-tab {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px; padding: 7px 16px;
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.5);
  cursor: pointer; transition: all 0.15s; font-family: 'DM Sans', sans-serif;
}
.coin-tab:hover  { border-color: rgba(245,166,35,0.35); color: rgba(255,255,255,0.85); }
.coin-tab.active {
  background: linear-gradient(135deg, #f5a623, #d4891a);
  border-color: #f5a623; color: #000; font-weight: 700;
}
.tab-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

.coins-table-wrap {
  background: rgba(14,11,2,0.92); border: 1px solid rgba(245,166,35,0.1);
  border-radius: 16px; overflow: hidden; overflow-x: auto;
}
.coins-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.coins-table thead th {
  font-size: 11px; color: rgba(255,255,255,0.3); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 14px 20px; text-align: left;
  border-bottom: 1px solid rgba(245,166,35,0.08);
  cursor: pointer; user-select: none; white-space: nowrap;
}
.coins-table thead th:hover  { color: #f5a623; }
.coins-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s; cursor: pointer;
}
.coins-table tbody tr:last-child { border-bottom: none; }
.coins-table tbody tr:hover      { background: rgba(245,166,35,0.04); }
.coins-table td { padding: 14px 20px; font-size: 13px; color: #fff; vertical-align: middle; }

.coin-cell { display: flex; align-items: center; gap: 12px; }
.coin-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(245,166,35,0.12);
  overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.coin-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.coin-info-name  { font-size: 14px; font-weight: 600; color: #fff; }
.coin-info-sub   { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 2px; }
.change-neg      { color: #f87171; font-size: 11px; font-weight: 600; }
.change-pos      { color: #4ade80; font-size: 11px; font-weight: 600; }
.sparkline       { display: inline-block; width: 56px; height: 26px; vertical-align: middle; margin-right: 8px; }

.receiver-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px; padding: 4px 10px 4px 5px;
  font-size: 11px; color: rgba(255,255,255,0.5);
}
.receiver-dot { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; }
.earned-val   { font-size: 13px; font-weight: 600; color: #f5a623; }

.btn-trade {
  background: transparent; border: 1px solid rgba(245,166,35,0.3); color: #f5a623;
  font-size: 12px; font-family: 'DM Sans', sans-serif; font-weight: 600;
  padding: 6px 16px; border-radius: 999px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s; white-space: nowrap;
}
.btn-trade:hover {
  border-color: #f5a623;
  color: #000;
  background: #f5a623;
}

/* ══════════════════════════════
   5. FOOTER
══════════════════════════════ */
.site-footer {
  background: #000;
  border-top: 1px solid rgba(245,166,35,0.1);
  padding: 14px 24px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
}
.footer-left { display: flex; align-items: center; gap: 20px; }

.theme-toggle {
  display: flex; align-items: center; gap: 2px;
  background: rgba(245,166,35,0.07);
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: 999px; padding: 3px 5px;
  cursor: pointer; transition: border-color 0.15s;
}
.theme-toggle:hover { border-color: rgba(245,166,35,0.4); }

.toggle-icon {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; transition: background 0.2s;
}
.toggle-icon.active { background: rgba(245,166,35,0.2); }

.footer-nav { display: flex; align-items: center; gap: 20px; }
.footer-nav a {
  font-size: 13px; color: rgba(255,255,255,0.5);
  text-decoration: none; transition: color 0.15s;
}
.footer-nav a:hover { color: #f5a623; }

.footer-right {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: rgba(255,255,255,0.4);
}
.footer-divider { color: rgba(245,166,35,0.25); }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 220px 1fr; }
  .vol-box   { display: none; }
}

@media (max-width: 768px) {
  .hero              { padding: 20px 14px 32px; }
  .hero-grid         { grid-template-columns: 1fr; gap: 12px; }
  .stat-col          { flex-direction: row; gap: 10px; }
  .stat-box          { flex: 1; padding: 14px 16px; }
  .stat-value        { font-size: 20px; }
  .claimed-pill      { display: none; }
  .hero-coins-grid   { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .hero-coin-img     { width: 46px; height: 46px; }
  .site-header       { padding: 10px 14px; }
  .search-wrap input { width: 150px; }
  .btn-how           { display: none; }
  .coin-list-section { padding: 20px 14px 40px; }
}

@media (max-width: 480px) {
  .stat-col        { flex-direction: column; }
  .hero-coins-grid { grid-template-columns: repeat(2, 1fr); }
  .logo-text       { display: none; }
  .btn-wallet      { display: none; }
  .coins-table td:nth-child(4),
  .coins-table th:nth-child(4) { display: none; }
}

@media (max-width: 640px) {
  .site-footer    { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px 14px; }
  .footer-right   { font-size: 12px; flex-wrap: wrap; gap: 6px; }
  .footer-divider { display: none; }
}

@media (max-width: 380px) {
  .footer-nav { gap: 14px; }
  .footer-nav a { font-size: 12px; }
}

/* Up badge for positive % in vol box */
.up-badge {
  display: inline-flex; align-items: center; gap: 2px;
  background: rgba(74,222,128,0.1); color: #4ade80;
  border-radius: 5px; padding: 1px 5px; font-size: 10px; font-weight: 600;
}

/* Loading pulse for cells waiting on API */
.loading { color: rgba(255,255,255,0.25); animation: loadPulse 1.2s ease-in-out infinite; }
@keyframes loadPulse { 0%,100%{opacity:0.25;} 50%{opacity:0.6;} }

/* ══════════════════════════════
   SEARCH DROPDOWN
══════════════════════════════ */
.search-wrap { position: relative; }

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 420px;
  background: #111008;
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: 14px;
  overflow: hidden;
  z-index: 999;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(245,166,35,0.2) transparent;
}

.sd-loading {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px;
  font-size: 13px; color: rgba(255,255,255,0.4);
}

.sd-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(245,166,35,0.2);
  border-top-color: #f5a623;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sd-empty {
  padding: 18px 16px;
  font-size: 13px; color: rgba(255,255,255,0.4);
}
.sd-empty strong { color: rgba(255,255,255,0.7); }

.sd-item {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.12s;
  gap: 12px;
}
.sd-item:last-child { border-bottom: none; }
.sd-item:hover { background: rgba(245,166,35,0.06); }

.sd-item-left {
  display: flex; align-items: center; gap: 10px;
  min-width: 0; flex: 1;
}

.sd-img {
  width: 36px; height: 36px;
  border-radius: 50%; object-fit: cover;
  border: 1px solid rgba(245,166,35,0.15);
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}

.sd-item-info { min-width: 0; }

.sd-item-name {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}

.sd-symbol {
  font-size: 13px; font-weight: 700; color: #fff;
}

.sd-fullname {
  font-size: 11px; color: rgba(255,255,255,0.4);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 110px;
}

.sd-chain-badge {
  font-size: 10px; font-weight: 600;
  background: rgba(245,166,35,0.12);
  color: #f5a623;
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: 4px;
  padding: 1px 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sd-item-addr {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  font-family: monospace;
  margin-top: 2px;
}

.sd-item-right {
  text-align: right; flex-shrink: 0;
}

.sd-price {
  font-size: 13px; font-weight: 600; color: #fff;
}

.sd-pos { font-size: 11px; color: #4ade80; font-weight: 600; }
.sd-neg { font-size: 11px; color: #f87171; font-weight: 600; }

.sd-meta {
  font-size: 10px; color: rgba(255,255,255,0.3);
  margin-top: 2px; white-space: nowrap;
}

/* Row highlight when scrolled to from search */
.row-highlight {
  background: rgba(245,166,35,0.08) !important;
  transition: background 0.3s;
}

/* Loading pulse */
.loading {
  color: rgba(255,255,255,0.25);
  animation: loadPulse 1.2s ease-in-out infinite;
}
@keyframes loadPulse { 0%,100%{opacity:0.25;} 50%{opacity:0.6;} }

/* Up badge */
.up-badge {
  display: inline-flex; align-items: center; gap: 2px;
  background: rgba(74,222,128,0.1); color: #4ade80;
  border-radius: 5px; padding: 1px 5px; font-size: 10px; font-weight: 600;
}

/* Mobile: shrink dropdown */
@media (max-width: 600px) {
  .search-dropdown { width: calc(100vw - 28px); left: 0; }
}

/* ══════════════════════════════
   TRADE MODAL
══════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: #100e04;
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: 20px;
  width: 100%; max-width: 420px;
  padding: 28px 24px;
  position: relative;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  display: flex; align-items: center; gap: 10px;
}

.modal-token-img {
  width: 36px; height: 36px;
  border-radius: 50%; object-fit: cover;
  border: 1px solid rgba(245,166,35,0.25);
}

.modal-token-name {
  font-size: 18px; font-weight: 700; color: #fff;
}

.modal-token-price {
  font-size: 12px; color: rgba(255,255,255,0.4);
  margin-top: 1px;
}

.modal-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.modal-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* Buy / Sell tabs */
.modal-tabs {
  display: flex;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 24px;
}

.modal-tab {
  flex: 1; padding: 9px;
  border: none; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: rgba(255,255,255,0.45);
}

.modal-tab.active-buy {
  background: #f5a623;
  color: #000;
  box-shadow: 0 2px 12px rgba(245,166,35,0.3);
}

.modal-tab.active-sell {
  background: #f87171;
  color: #fff;
  box-shadow: 0 2px 12px rgba(248,113,113,0.3);
}

/* Amount input */
.modal-label {
  font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.modal-input-wrap {
  position: relative;
  margin-bottom: 14px;
}

.modal-currency {
  position: absolute; left: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 18px; font-weight: 700;
  color: rgba(255,255,255,0.4);
  pointer-events: none;
}

.modal-amount-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: 12px;
  padding: 16px 16px 16px 32px;
  font-size: 28px; font-weight: 700;
  color: #fff; font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s;
  text-align: center;
}
.modal-amount-input:focus { border-color: rgba(245,166,35,0.5); }
.modal-amount-input::placeholder { color: rgba(255,255,255,0.15); }

/* Quick amount pills */
.modal-quick {
  display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}

.modal-quick-btn {
  flex: 1; min-width: 60px;
  padding: 8px 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.6);
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.15s; text-align: center;
}
.modal-quick-btn:hover {
  border-color: #f5a623;
  color: #f5a623;
  background: rgba(245,166,35,0.07);
}
.modal-quick-btn.active {
  background: rgba(245,166,35,0.15);
  border-color: #f5a623;
  color: #f5a623;
}

/* Balance info */
.modal-balance-box {
  background: rgba(245,166,35,0.05);
  border: 1px solid rgba(245,166,35,0.12);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.modal-balance-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}

.modal-balance-row + .modal-balance-row {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(245,166,35,0.08);
}

.modal-balance-label { color: rgba(255,255,255,0.4); }
.modal-balance-value { color: #fff; font-weight: 600; }
.modal-balance-highlight { color: #f5a623; font-weight: 700; font-size: 15px; }

/* Slippage */
.modal-slippage {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: rgba(255,255,255,0.35);
  margin-bottom: 20px;
}
.modal-slippage span { color: #f5a623; font-weight: 600; cursor: pointer; }
.modal-slippage span:hover { text-decoration: underline; }

/* Action button */
.modal-action-btn {
  width: 100%; padding: 15px;
  border: none; border-radius: 999px;
  font-size: 16px; font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.modal-action-btn.buy-btn {
  background: linear-gradient(135deg, #f5a623, #d4891a);
  color: #000;
  box-shadow: 0 4px 20px rgba(245,166,35,0.25);
}
.modal-action-btn.buy-btn:hover { background: linear-gradient(135deg, #fbbf24, #f5a623); transform: translateY(-1px); }
.modal-action-btn.sell-btn {
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: #fff;
  box-shadow: 0 4px 20px rgba(248,113,113,0.2);
}
.modal-action-btn.sell-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.modal-action-btn:active { transform: scale(0.98); }

/* Connect wallet state */
.modal-action-btn.connect-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
}
.modal-action-btn.connect-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }

@media (max-width: 480px) {
  .modal-box { padding: 20px 16px; }
  .modal-amount-input { font-size: 22px; }
}

/* ══════════════════════════════
   TOKEN SIDE PANEL
══════════════════════════════ */
.side-panel-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 900;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.side-panel-overlay.open {
  opacity: 1; pointer-events: all;
}

.side-panel {
  position: fixed; top: 0; right: 0;
  width: 360px; height: 100vh;
  background: #0e0b02;
  border-left: 1px solid rgba(245,166,35,0.15);
  z-index: 901;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}
.side-panel.open { transform: translateX(0); }

/* Panel header */
.sp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(245,166,35,0.1);
  flex-shrink: 0;
}
.sp-header-left { display: flex; align-items: center; gap: 12px; }
.sp-token-img {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: cover; border: 1px solid rgba(245,166,35,0.2);
}
.sp-token-symbol { font-size: 17px; font-weight: 700; color: #fff; }
.sp-token-sub    { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 1px; }
.sp-header-right { display: flex; align-items: center; gap: 8px; }

.sp-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.sp-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* Price block */
.sp-price-block {
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(245,166,35,0.08);
  flex-shrink: 0;
}
.sp-mcap-label { font-size: 11px; color: rgba(255,255,255,0.35); margin-bottom: 4px; }
.sp-mcap-value {
  font-size: 26px; font-weight: 700; color: #fff; letter-spacing: -0.02em;
}
.sp-mcap-value span { font-size: 16px; color: rgba(255,255,255,0.5); }
.sp-change-pos { color: #4ade80; font-size: 13px; font-weight: 600; margin-left: 8px; }
.sp-change-neg { color: #f87171; font-size: 13px; font-weight: 600; margin-left: 8px; }

/* Tabs */
.sp-tabs {
  display: flex; border-bottom: 1px solid rgba(245,166,35,0.08);
  flex-shrink: 0;
}
.sp-tab {
  flex: 1; padding: 12px 8px;
  background: transparent; border: none;
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.4);
  font-family: 'DM Sans', sans-serif; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.sp-tab:hover  { color: rgba(255,255,255,0.7); }
.sp-tab.active { color: #f5a623; border-bottom-color: #f5a623; font-weight: 600; }

/* Scrollable content */
.sp-content {
  flex: 1; overflow-y: auto; padding: 16px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245,166,35,0.15) transparent;
}

/* Chart timeframe buttons */
.sp-timeframes {
  display: flex; gap: 4px; margin-bottom: 12px;
}
.sp-tf-btn {
  padding: 4px 10px; border-radius: 6px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.4);
  font-family: 'DM Sans', sans-serif; cursor: pointer;
  transition: all 0.15s;
}
.sp-tf-btn:hover  { color: #fff; border-color: rgba(255,255,255,0.2); }
.sp-tf-btn.active { background: rgba(245,166,35,0.15); border-color: #f5a623; color: #f5a623; }

/* Chart canvas */
.sp-chart-wrap {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(245,166,35,0.08);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  height: 200px;
  position: relative;
}
#spChart { width: 100%; height: 100%; }

/* Stats grid */
.sp-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 16px;
}
.sp-stat-card {
  background: rgba(245,166,35,0.04);
  border: 1px solid rgba(245,166,35,0.1);
  border-radius: 10px; padding: 12px;
}
.sp-stat-label { font-size: 10px; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.sp-stat-value { font-size: 14px; font-weight: 600; color: #fff; }

/* Trade section inside panel */
.sp-trade-section { margin-bottom: 8px; }
.sp-trade-label {
  font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.35);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px;
}
.sp-trade-tabs {
  display: flex; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px; padding: 3px; margin-bottom: 14px;
}
.sp-trade-tab {
  flex: 1; padding: 8px;
  border: none; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  font-family: 'DM Sans', sans-serif; cursor: pointer;
  transition: all 0.2s; background: transparent;
  color: rgba(255,255,255,0.4);
}
.sp-trade-tab.active-buy  { background: #f5a623; color: #000; }
.sp-trade-tab.active-sell { background: #f87171; color: #fff; }

.sp-input-wrap { position: relative; margin-bottom: 10px; }
.sp-dollar { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 16px; font-weight: 700; color: rgba(255,255,255,0.35); pointer-events: none; }
.sp-amount-input {
  width: 100%; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(245,166,35,0.2); border-radius: 10px;
  padding: 13px 14px 13px 30px;
  font-size: 22px; font-weight: 700; color: #fff;
  font-family: 'DM Sans', sans-serif; outline: none;
  transition: border-color 0.2s;
}
.sp-amount-input:focus { border-color: rgba(245,166,35,0.5); }
.sp-amount-input::placeholder { color: rgba(255,255,255,0.15); }

.sp-quick { display: flex; gap: 6px; margin-bottom: 12px; }
.sp-quick-btn {
  flex: 1; padding: 7px 4px; text-align: center;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px; font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.5); font-family: 'DM Sans', sans-serif;
  cursor: pointer; transition: all 0.15s;
}
.sp-quick-btn:hover { border-color: #f5a623; color: #f5a623; }
.sp-quick-btn.active { background: rgba(245,166,35,0.15); border-color: #f5a623; color: #f5a623; }

.sp-receive-box {
  background: rgba(245,166,35,0.05); border: 1px solid rgba(245,166,35,0.1);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 12px;
}
.sp-receive-row { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.sp-receive-row:last-child { margin-bottom: 0; }
.sp-receive-label { color: rgba(255,255,255,0.4); }
.sp-receive-val   { color: #fff; font-weight: 600; }
.sp-receive-highlight { color: #f5a623; font-weight: 700; font-size: 13px; }

/* Bottom buy/sell buttons */
.sp-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(245,166,35,0.1);
  display: flex; gap: 10px; flex-shrink: 0;
}
.sp-sell-btn, .sp-buy-btn {
  flex: 1; padding: 14px;
  border: none; border-radius: 999px;
  font-size: 15px; font-weight: 700;
  font-family: 'DM Sans', sans-serif; cursor: pointer;
  transition: all 0.15s;
}
.sp-sell-btn {
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.3);
  color: #f87171;
}
.sp-sell-btn:hover { background: #f87171; color: #fff; }
.sp-buy-btn {
  background: linear-gradient(135deg, #f5a623, #d4891a);
  color: #000;
  box-shadow: 0 4px 16px rgba(245,166,35,0.2);
}
.sp-buy-btn:hover { background: linear-gradient(135deg, #fbbf24, #f5a623); transform: translateY(-1px); }

@media (max-width: 480px) {
  .side-panel { width: 100vw; }
}

/* ══════════════════════════════
   ONLINE COUNTER
══════════════════════════════ */
.online-counter {
  position: absolute;
  top: 18px;
  right: 24px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(18,14,4,0.75);
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  user-select: none;
  transition: border-color 0.3s;
}
.online-counter:hover { border-color: rgba(245,166,35,0.4); }

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  animation: onlinePulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(74,222,128,0.6);
}

@keyframes onlinePulse {
  0%, 100% { opacity: 1;   transform: scale(1);    box-shadow: 0 0 6px rgba(74,222,128,0.6); }
  50%       { opacity: 0.5; transform: scale(0.75); box-shadow: 0 0 2px rgba(74,222,128,0.2); }
}

.online-count {
  color: #4ade80;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.2s;
  letter-spacing: -0.01em;
}

@media (max-width: 480px) {
  .online-counter { top: 12px; right: 14px; font-size: 12px; padding: 5px 10px 5px 8px; }
}

/* CVT token placeholder image fallback */
img[src*="cvt.png"] {
  background: linear-gradient(135deg, #f5a623, #d4891a);
}

/* ══════════════════════════════
   CVT TOKEN INFO BAR
══════════════════════════════ */
.token-info-bar {
  max-width: 1280px;
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.token-info-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(18,14,4,0.82);
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: 999px;
  padding: 7px 16px 7px 10px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  transition: border-color 0.2s;
  cursor: default;
}
.token-info-pill:hover { border-color: rgba(245,166,35,0.4); }

.tip-img {
  width: 22px; height: 22px;
  border-radius: 50%; object-fit: cover;
  border: 1px solid rgba(245,166,35,0.2);
  flex-shrink: 0;
}

.tip-label { color: rgba(255,255,255,0.4); font-size: 11px; margin-right: 2px; }
.tip-value { color: #f5a623; font-weight: 700; }
.tip-divider {
  width: 1px; height: 14px;
  background: rgba(255,255,255,0.12);
  margin: 0 4px;
}

@media (max-width: 600px) {
  .token-info-bar { gap: 8px; }
  .token-info-pill { font-size: 12px; padding: 6px 12px 6px 8px; }
}