/* Theme variables are now controlled by config.js (applied in boot.js). */

/* Skeleton shimmer */
.skeleton { position: relative; overflow: hidden; }
.skeleton .shimmer { position: relative; background: rgba(255,255,255,0.06); border-radius: 8px; }
.skeleton .shimmer::after {
  content: '';
  position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent);
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer {
  100% { transform: translateX(100%); }
}
.skeleton .line { height: 12px; margin: 6px 0; }
.skeleton .line.sm { height: 10px; width: 50%; }
.skeleton .circle { width: 18px; height: 18px; border-radius: 50%; }
.skeleton .pill { height: 24px; width: 90px; border-radius: 999px; }
.skeleton .tile { height: 56px; border-radius: 10px; }

/* Native price badge inside chain-badge */
.native-price {
    line-height: 1;
}

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

body {
  font-family: var(--font-body, 'Manrope', 'Manrope Placeholder', sans-serif);
  /*background: var(--bg-dark);*/
  color: var(--text);
  padding: 16px;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  background-color: var(--bg-dark);
}

/* Background layers */
.solid-background,
.overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
}
.solid-background { background: var(--bg-solid); z-index: -2; }
.overlay { background: rgba(14,22,33,0.85); z-index: -1; }

/* Touch devices: reduce hover-driven animations/effects for stability and perf */
@media (pointer: coarse) {
  .chart-toggle-btn:hover,
  .metrics-toggle-btn:hover,
  .market-logo-link:hover {
    transform: none;
    box-shadow: 0 0 12px rgba(42,171,238,0.12);
  }
  .stats-card:hover {
    transform: none;
    box-shadow: 0 0 18px rgba(42,171,238,0.16);
  }
}

/* Optional video background */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.6; /* can be overridden inline */
  filter: brightness(1) contrast(0.9); /* can be overridden inline */
  pointer-events: none;
  
}

.container { max-width: 100%; margin: 0 auto; position: relative; z-index: 1; }
@media (min-width: 500px) { .container { max-width: 450px; } }

/* Header */
header { text-align: center; margin-bottom: 24px; padding-top: 8px; }
.logo-container { display: flex; justify-content: center; margin-bottom: 12px; }
.logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px rgba(14, 180, 102, 0.3);
    transition: transform 0.5s 
ease;
    background: var(--bg-card);
}
.logo:hover { transform: scale(1.05); }
h1 { font-size: 1.6rem; margin-bottom: 4px; color: var(--text); }
.project-name {
    color: var(--primary);
    font-weight: bolder;
    /* font-family: var(--font-project-name); */
    font-size: 1.6rem;
}.subtitle {
  color: var(--text-muted); font-size: 0.85rem; line-height: 1.4; margin-bottom: 4px;
}
.mission-text {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(14, 180, 102, 0.05);
    border-left: 3px solid var(--primary);
    line-height: 1.3;
}
/* Stats card */
.stats-card {
  border: 1px solid var(--border);
  box-shadow: 0 0 20px rgba(42,171,238,0.1);
  padding: 16px;
  border-radius: 14px;
  margin-bottom: 20px;
  position: relative;
  backdrop-filter: blur(10px);
  content-visibility: auto;
  contain-intrinsic-size: 320px 280px;
  transition: box-shadow .3s ease, transform .2s ease;
  backdrop-filter: blur(6px);
    background: var(--bg-card);
}
.stats-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent);
}
.stats-card:hover {
  box-shadow: 0 0 28px rgba(42,171,238,0.18);
  transform: translateY(-1px);
}
.stats-header {
  align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.stats-title {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Manrope', 'Manrope Placeholder', sans-serif !important;
}
.stats-title i { font-size: 1.1rem; color: var(--primary); }

/* Make each card/tile its own stacking context */
.stats-card, .stat { isolation: isolate; }

/* Ensure bars and their containers sit below tooltips */
.metrics-bars, .bar-container, .bar { position: relative; z-index: 0; }

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 12px;
}
.stat {
  background: var(--bg-card-light);
  padding: 10px 8px; border-radius: 10px; text-align: center;
  position: relative;
  backdrop-filter: blur(5px);
  min-height: 65px; display: flex; flex-direction: column; justify-content: center;
  border: 1px solid var(--border);
  overflow: visible;
  content-visibility: auto;
  contain-intrinsic-size: 140px 80px;
  transition: border-color .2s ease, background .2s ease;
}
.stat:hover { border-color: rgba(42,171,238,0.35); background: rgba(255,255,255,0.04); }
.stat-value {
  font-family: var(--font-stats, 'Manrope', 'Manrope Placeholder', sans-serif);
  font-size: 0.95rem; font-weight: bold; color: var(--primary);
  margin-bottom: 4px; line-height: 1.2; word-break: break-word;
}
.stat-label {
  font-family: var(--font-stats, 'Manrope', 'Manrope Placeholder', sans-serif);
  font-size: 0.75rem; color: var(--text-muted); line-height: 1.2;
  display: flex; justify-content: center; align-items: center; gap: 4px; text-align: center;
}
.stat.up .stat-value { color: var(--up, #0EB466); }
.stat.down .stat-value { color: var(--down, #E63946); }

/* Consolidated surface buttons */
.chart-toggle-btn,
.metrics-toggle-btn {
  width: 100%;
  background: rgba(42,171,238,0.15);
  border: 1px solid rgba(42,171,238,0.3);
  color: var(--primary);
  padding: 10px 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.25s ease;
  margin-bottom: 12px;
  will-change: transform, background;
}
.chart-toggle-btn:hover,
.metrics-toggle-btn:hover { background: rgba(42,171,238,0.25); transform: translateY(-2px); }

/* Chart panel */
.chart-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.4s ease;
  margin-top: 0;
}
.chart-panel.open {
  max-height: 900px;
  opacity: 1;
  margin-top: 16px;
  overflow: visible;
}

/* Chart container and toolbar */
.chart-wrap {
  background: transparent;
  /* border: 1px solid var(--border); */
  border-radius: 10px;
  padding: 10px;
}
.chart-toolbar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px;
}
.chart-toolbar .btn {
  background: rgba(42,171,238,0.12);
  border: 1px solid rgba(42,171,238,0.3);
  color: var(--text);
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: .2s ease;
}
.chart-toolbar .btn:hover { background: rgba(42,171,238,0.22); }
.chart-toolbar .btn.active {
  background: var(--primary);
  color: #0E1621;
  border-color: var(--primary);
}
#candlesContainer {
  width: 100%;
  height: 320px;
  will-change: opacity, transform;
}
@media (min-width: 500px) { #candlesContainer { height: 380px; } }

/* Metrics toggle + panel */
/* metrics-toggle-btn now shares styles with chart-toggle-btn */
.metrics-panel {
  max-height: 0; opacity: 0; overflow: hidden; transition: all 0.4s ease; margin-top: 0;
}
.metrics-panel.open { max-height: 800px; opacity: 1; margin-top: 16px; overflow: visible; }

.metrics-bars {
    /* margin-bottom: 20px; */
    padding: 8px;
    /* background: rgba(255, 255, 255, 0.03); */
    /* border-radius: 10px; */
    /* border: 1px solid var(--border); */
}
.metrics-panel .stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 0;
}
.metrics-panel .stat {
  background: rgba(255,255,255,0.03);
  padding: 10px 8px;
  border-radius: 10px;
  text-align: center;
  backdrop-filter: blur(5px);
  min-height: 65px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--border);
}
.metrics-panel .stats-grid { overflow: visible; position: relative; z-index: 1; }

/* Keep tooltip above any bars/backgrounds */
.stat .info-popup { z-index: 10000; }

/* Buy/Sell bars */
.metric-labels {
  display: flex; justify-content: space-between;
  font-size: 0.8rem; color: var(--text-muted);
  margin-bottom: 6px;
}
.bar-container {
  position: relative; height: 12px; border-radius: 6px; overflow: hidden;
  background: rgba(255,255,255,0.05); margin-bottom: 12px;
}
.bar {
  position: absolute; top: 0; height: 100%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar-buy { left: 0; background: linear-gradient(90deg, var(--up, #0EB466), var(--up-strong, #17D77E)); border-radius: 6px 0 0 6px; z-index: 2; transition: width 0.6s ease; }
.bar-sell { right: 0; background: linear-gradient(90deg, var(--down, #E63946), var(--down-strong, #FF4B5C)); border-radius: 0 6px 6px 0; z-index: 1; transition: width 0.6s ease; }
.bar-buy, .bar-sell { width: 0%; }

/* Chain badge */
.chain-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(42, 171, 238, 0.12);
    border: 1px solid rgba(42, 171, 238, 0.3);
    color: var(--primary);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s 
ease;
    backdrop-filter: blur(8px);
    z-index: 2;
}
.chain-badge:hover { background: rgba(42,171,238,0.25); transform: translateY(-1px); box-shadow: 0 0 10px rgba(42,171,238,0.3); }
.chain-icon { width: 16px; height: 16px; background: var(--primary); display: inline-block; -webkit-mask: no-repeat center/contain; mask: no-repeat center/contain; }
.chain-icon[data-chain="solana"] { -webkit-mask-image: url('https://unpkg.com/simple-icons@latest/icons/solana.svg'); mask-image: url('https://unpkg.com/simple-icons@latest/icons/solana.svg'); background: var(--chain-solana-color, var(--primary)); }
.chain-icon[data-chain="ethereum"] { -webkit-mask-image: url('https://unpkg.com/simple-icons@latest/icons/ethereum.svg'); mask-image: url('https://unpkg.com/simple-icons@latest/icons/ethereum.svg'); background: var(--chain-ethereum-color, var(--primary)); }
.chain-icon[data-chain="bsc"] { -webkit-mask-image: url('https://unpkg.com/simple-icons@latest/icons/binance.svg'); mask-image: url('https://unpkg.com/simple-icons@latest/icons/binance.svg'); background: var(--chain-bsc-color, var(--primary)); }
.chain-icon[data-chain="base"] { background: var(--chain-base-color, #0052FF); border-radius: 50%; }
.chain-icon[data-chain="arbitrum"] { background: var(--chain-arbitrum-color, linear-gradient(135deg, #28A0F0, #1A5AFF)); border-radius: 50%; }
.chain-icon[data-chain="polygon"] { background: var(--chain-polygon-color, #8247E5); border-radius: 50%; }
.chain-icon[data-chain="optimism"] { background: var(--chain-optimism-color, #FF0420); border-radius: 50%; }
.chain-icon[data-chain="avalanche"] { background: var(--chain-avalanche-color, #E84142); border-radius: 50%; }
.chain-icon[data-chain="sui"] { -webkit-mask-image: url('https://unpkg.com/simple-icons@latest/icons/sui.svg'); mask-image: url('https://unpkg.com/simple-icons@latest/icons/sui.svg'); background: var(--chain-sui-color, var(--primary)); }

/* Buttons */
.refresh-container {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; flex-wrap: wrap; gap: 6px;
}
.refresh-container .last-updated {
  flex: 1; text-align: left; font-size: 0.65rem; color: var(--text-muted);
}
.refresh-btn {
  background: rgba(42,171,238,0.1);
  border: 1px solid rgba(42,171,238,0.3);
  color: var(--primary);
  padding: 6px 10px; border-radius: 6px;
  font-size: 0.75rem; cursor: pointer; transition: .3s;
  backdrop-filter: blur(5px);
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.refresh-btn:hover { background: rgba(42,171,238,0.2); }
.market-logos { display:flex; justify-content:center; align-items:center; gap:14px; }
.market-logo-link {
  background: rgba(42,171,238,0.1);
  border: 1px solid rgba(42,171,238,0.3);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .3s;
  backdrop-filter: blur(5px);
  text-decoration: none; /* prevent blue underline on anchor */
  color: inherit; /* avoid default link blue */
}
.market-logo-link:hover { background: rgba(42,171,238,0.2); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(42,171,238,0.3); }
.market-logo { width: 18px; height: 18px; opacity: .9; }
.trade-btn {
  background: var(--primary-dark); color: #000000; border: none; padding: 12px 16px; font-size: 0.9rem;
  border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: .3s; font-weight: 600; text-decoration: none; text-align: center; margin-bottom: 16px; width: 100%;
  box-shadow: 0 2px 8px rgba(42,171,238,0.3);
}
.trade-btn:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(42,171,238,0.4); transform: translateY(-2px); }
.trade-btn i { margin-right: 6px; font-size: 1rem; }

.action-buttons { display: flex; justify-content: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.action-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  padding: 12px 16px; font-size: 0.9rem; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .3s; font-weight: 500; text-decoration: none; text-align: center; min-width: 120px;
}
.action-btn i { margin-right: 6px; font-size: 1rem; }
.action-btn:hover { background: rgba(42,171,238,0.1); border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* Footer + social */
.footer {
  text-align: center; margin-top: 24px; color: var(--text-muted);
  font-size: 0.75rem; position: relative;
}
.footer::before {
  content: ''; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  width: 80%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(42,171,238,0.3), transparent);
}
.version { display: block; margin-top: 4px; font-size: 0.7rem; opacity: 0.7; }

.social-links { display: flex; justify-content: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.social-link {
  color: var(--text-muted); font-size: 1.1rem; transition: .3s;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(42,171,238,0.1); text-decoration: none;
}
.social-link:hover { color: var(--primary); background: rgba(42,171,238,0.2); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(42,171,238,0.2); }

/* Copy CA button + highlight link */
.copy-ca-btn {
    /* margin-left: 8px; */
    /* padding: 4px 8px; */
    font-size: 0.75rem;
    border-radius: 5px;
    background: #2291d900;
    border: 0px solid rgb(42 171 238);
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s 
ease;
    vertical-align: -3px;
}
.copy-ca-btn:hover { border-color: var(--primary); transform: translateY(-1px); }

.telegram-highlight {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, #2AABEE, #2291D9);
  border: 1px solid rgba(34, 158, 217, 0.5);
  color: #fff; padding: 3px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; text-decoration: none;
  transition: all 0.3s ease; box-shadow: 0 0 10px rgba(34, 158, 217, 0.3);
}
.telegram-highlight:hover { background: linear-gradient(135deg, #2291D9, #2AABEE); box-shadow: 0 0 14px rgba(34, 158, 217, 0.5); transform: translateY(-1px); }

/* Tooltips */
.info-icon { font-size: 0.7rem; color: var(--text-muted); margin-left: 4px; cursor: pointer; transition: color 0.2s ease; }
.info-icon:hover { color: var(--primary); }
.info-popup {
  position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%);
  background: #17212B; color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; font-size: 0.7rem; line-height: 1.3; width: 180px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35); opacity: 0; pointer-events: none; transition: all 0.25s ease; z-index: 9999;
  white-space: pre-line;
}
.info-popup.visible { opacity: 1; pointer-events: auto; bottom: 120%; }
.info-popup.floating {
  position: absolute; top: auto; left: auto; bottom: auto; transform: none;
  z-index: 10000; background: #17212B; box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  width: auto; max-width: 240px; white-space: pre-line;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Avoid backdrop cost when unsupported */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .stats-card, .stat, .metrics-bars, .refresh-btn { backdrop-filter: none; }
}

/* Accessibility: when users prefer higher contrast, reduce transparency/backdrop cost */
@media (prefers-contrast: more) {
  .stat,
  .metrics-bars,
  .stats-card {
    backdrop-filter: none;
    background: rgba(245, 12, 12, 0.04);
    border-color: rgba(255,255,255,0.12);
  }
}

/* Mobile tweaks */
@media (max-width: 380px) {
  body { padding: 12px; }
  .stats-grid { grid-template-columns: 1fr; gap: 10px; }
  .action-buttons { flex-direction: column; align-items: center; }
  .action-btn { width: 100%; max-width: 200px; }
  .stat { padding: 8px 6px; min-height: 60px; }
  .stat-value { font-size: 0.9rem; }
  .stat-label { font-size: 0.7rem; }
  h1 { font-size: 1.4rem; }
  .mission-text { font-size: 0.75rem; padding: 6px 10px; }
  .refresh-container { flex-direction: column; gap: 8px; align-items: stretch; }
  .last-updated { text-align: center; }
  .social-links { gap: 8px; }
  .social-link { width: 40px; height: 40px; font-size: 1.05rem; }
  /* Increase tap targets for market links */
  .market-logo-link { width: 40px; height: 40px; }
  /* Slightly reduce heavy effects for perf */
  .stats-card { box-shadow: 0 0 14px rgba(42,171,238,0.14); }
  .stats-card:hover { box-shadow: 0 0 18px rgba(42,171,238,0.16); }
  .stat { backdrop-filter: blur(3px); }
  /* Ensure buttons are easy to tap */
  .refresh-btn { min-height: 44px; }
}
.stats-title {
  max-width: 30ch;           /* roughly 10 characters wide */
  white-space: nowrap;       /* prevent wrapping */
  overflow: hidden;          /* hide overflow */
  text-overflow: ellipsis;   /* add … when truncated */
  display: inline-block;     /* ensures ellipsis works properly */
  vertical-align: middle;    /* keeps alignment neat */
}

/* Contact form */
.contact-btn {
  background: transparent;
  border: 1px solid var(--cf-border, rgba(255, 255, 255, 0.2));
  color: var(--cf-text-muted, var(--text-muted));
  padding: 12px 20px;
  font-size: 0.9rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  font-weight: 500;
}
.contact-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--cf-primary, rgba(255, 255, 255, 0.3));
  color: var(--cf-text, var(--text));
  transform: translateY(-1px);
}
.contact-btn i { margin-right: 8px; font-size: 1rem; }

.contact-section {
  background: linear-gradient(145deg, var(--bg-card), var(--bg-card-light));
  background: linear-gradient(145deg, var(--cf-bg, var(--bg-card)), var(--cf-bg-light, var(--bg-card-light)));
  border: 1px solid var(--cf-border, rgba(14, 180, 102, 0.2));
  box-shadow: 0 0 20px rgba(14, 180, 102, 0.1);
  padding: 20px;
  border-radius: 14px;
  margin-top: 16px;
  display: none;
  animation: slideDown 0.5s ease-out;
  backdrop-filter: blur(10px);
  /* Layout (enabled when open) */
  gap: 14px;
  grid-template-columns: 1fr;
  position: relative;
}

.contact-section.open {
  display: grid;
}
.contact-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cf-primary, var(--primary)), transparent);
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }

.contact-header { display: inline-flex; align-items: center; margin-bottom: 6px; gap: 8px; grid-column: 1 / -1; padding: 6px 10px; border-radius: 999px; background: linear-gradient(135deg, color-mix(in srgb, var(--cf-primary, var(--primary)) 26%, transparent), color-mix(in srgb, var(--cf-accent, #17D77E) 22%, transparent)); border: 1px solid color-mix(in srgb, var(--cf-primary, var(--primary)) 45%, transparent); box-shadow: 0 4px 14px rgba(0,0,0,0.15); width: max-content; }
.contact-header i { font-size: 1rem; color: var(--cf-accent, #0EB466); background: color-mix(in srgb, var(--cf-accent, #0EB466) 22%, transparent); border: 1px solid color-mix(in srgb, var(--cf-accent, #0EB466) 35%, transparent); width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.contact-header h2 { font-size: 0.95rem; background: linear-gradient(135deg, var(--cf-primary, var(--primary)), var(--cf-primary-dark, var(--primary-light))); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: 0.2px;}

.form-group { margin-bottom: 12px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--cf-text-muted, var(--text-muted));
  font-size: 0.9rem;
}
.contact-section select,
.contact-section textarea,
.contact-section input[type="text"],
.contact-section input[type="email"] {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--cf-border, rgba(255, 255, 255, 0.1));
  background: #2291d921;
  color: var(--cf-text, var(--text));
  font-size: 0.95rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}
.contact-section input[type="text"]:focus,
.contact-section input[type="email"]:focus,
.contact-section select:focus,
.contact-section textarea:focus {
  outline: none;
  border-color: var(--cf-primary, var(--primary));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--cf-primary, var(--primary)) 24%, transparent);
  background: #536a7921;
}
.contact-section select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230EB466' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 34px; /* space for custom arrow */
}
.contact-section select::-ms-expand { display: none; }
.contact-section select option { background: var(--cf-bg-light, var(--bg-card-light)); color: var(--cf-text, var(--text)); padding: 10px; }
.contact-section textarea { resize: vertical; min-height: 100px; }
.field-meta { display: flex; justify-content: flex-end; margin-top: 6px; }
.char-counter { font-size: 0.75rem; color: var(--cf-text-muted, var(--text-muted)); }

/* Inline error states */
.error-msg { display: block; margin-top: 6px; font-size: 0.75rem; color: #FF6B6B; min-height: 0.9em; }
.contact-section [aria-invalid="true"] {
  border-color: rgba(230,57,70,0.7) !important;
  box-shadow: 0 0 0 2px rgba(230,57,70,0.25) !important;
}
.contact-section [aria-invalid="true"]::placeholder { color: rgba(255,107,107,0.9); }

/* Input adornments (icons) */
#name {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238EA1B4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M4 21v-2a4 4 0 0 1 3-3.87'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center; background-size: 18px;
  padding-left: 42px;
}
#telegramId {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='%232AABEE'%3E%3Cpath d='M21.944 3.143c-.395-.337-.99-.342-1.47-.127L2.34 11.11c-.59.27-.963.82-.935 1.41.03.592.455 1.104 1.07 1.286l4.33 1.29 1.7 5.37c.2.64.75 1.06 1.4 1.06.58 0 1.1-.35 1.34-.9l2.05-4.6 5.1 3.8c.23.17.5.26.77.26.2 0 .4-.05.58-.14.39-.2.66-.57.74-1l2.96-15.5c.11-.61-.12-1.23-.54-1.6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center; background-size: 18px;
  padding-left: 42px;
}
#email {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238EA1B4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='m22 6-10 7L2 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center; background-size: 18px;
  padding-left: 42px;
}
#topic { padding-left: 12px; background-image: none; }

/* Placeholder */
.contact-section ::placeholder { color: color-mix(in srgb, var(--cf-text, var(--text)) 55%, transparent); }

/* Elevated focus ring + subtle inner border */
.contact-section select,
.contact-section textarea,
.contact-section input[type="text"],
.contact-section input[type="email"] {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 2px 10px rgba(0,0,0,0.12);
}

.submit-btn { position: relative; grid-column: 1 / -1; min-height: 44px; }
.submit-btn:active { transform: translateY(0); }

/* Responsive two-column layout */
@media (min-width: 520px) {
  .contact-section {
    grid-template-columns: 1fr 1fr;
  }
  /* Make message and header span both columns */
  .contact-section .form-group:has(textarea) { grid-column: 1 / -1; }
  .contact-header { grid-column: 1 / -1; }
  .submit-btn { grid-column: 1 / -1; }
}

.submit-btn {
  background: var(--cf-primary, var(--primary));
  color: var(--bg-dark);
  border: none;
  padding: 14px;
  font-size: 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.submit-btn:hover { background: var(--primary-dark, var(--primary-dark)); box-shadow: 0 0 20px color-mix(in srgb, var(--cf-primary, var(--primary)) 35%, transparent); transform: translateY(-2px); }

/* Notification toast */
.notification {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(23, 33, 43, 0.95);
  color: var(--text);
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  opacity: 0;
  transition: all .3s ease;
  z-index: 99999;
  pointer-events: none;
}
.notification.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.notification p { margin: 0; font-size: 0.9rem; text-align: center; }

/*zERA FONT*/

/* Verified badge and corner stamp */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #0E1116;
  background: linear-gradient(135deg, #17D77E, #4FB7F3);
  box-shadow: 0 4px 14px rgba(23, 215, 126, 0.25), 0 2px 8px rgba(79, 183, 243, 0.18);
}
.verified-badge i { color: #0E1116; }
.verified-badge .badge-link { color: inherit; text-decoration: none; }
.verified-badge .badge-link:hover { text-decoration: underline; }
@keyframes verifiedGlow {
  0% { box-shadow: 0 0 0 0 rgba(23, 215, 126, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(23, 215, 126, 0); }
  100% { box-shadow: 0 0 0 0 rgba(23, 215, 126, 0); }
}
.verified-badge.pulsing { animation: verifiedGlow 2.2s ease-out infinite; }

.verified-corner {
  position: absolute;
  top: 10px;
  right: 10px;
  background: radial-gradient(circle at 30% 30%, rgba(23,215,126,0.95), rgba(79,183,243,0.95));
  color: #0E1116;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  z-index: 5;
}
.verified-corner i { color: #0E1116; }
  .articles-section {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-card-light));
    border: 1px solid rgba(14, 180, 102, 0.2);
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(14, 180, 102, 0.1);
    padding: 16px;
    margin-bottom: 16px;
    display: block;
    animation: slideDown 0.4s ease-out;
    backdrop-filter: blur(10px);
  }

  .articles-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
  }

  .article-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    background: rgba(14, 180, 102, 0.05);
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(14, 180, 102, 0.1);
    transition: all 0.3s ease;
    font-size: 0.9rem;
  }

  .article-link i {
    color: var(--primary);
    font-size: 1rem;
  }

  .article-link:hover {
    background: rgba(14, 180, 102, 0.15);
    border-color: rgba(14, 180, 102, 0.3);
    transform: translateY(-2px);
    color: var(--primary);
  }

/* ===== Trades Panel (Recent Transactions) ===== */
.trades-wrap {
  background: linear-gradient(145deg, var(--bg-card-light), var(--bg-card));
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
    /* padding: 10px; */}

.trades-scroll {
  max-height: 420px;
  overflow: auto;
  border-radius: 10px;
}

/* Fancy scrollbar */
.trades-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.trades-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 10px; }
.trades-scroll::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--primary), #4FB7F3); border-radius: 10px; border: 2px solid rgba(0,0,0,0.25); }

.trades-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
}
.trades-table thead th {
position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg-card-light); 
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.78rem;
    padding: 8px 10px;
    /* border-bottom: 1px solid rgba(255, 255, 255, 0.08); */
}
.trades-table tbody tr {
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.trades-table tbody tr:hover {
  background: rgba(79,183,243,0.04);
  transform: none;
  box-shadow: none;
}

/* Buy/Sell: color the text instead of row background */
.trades-table tbody tr.trade-buy {
  background: rgba(255,255,255,0.03);
  border-left: 0;
}
.trades-table tbody tr.trade-sell {
  background: rgba(255,255,255,0.03);
  border-left: 0;
}
.trades-table tbody tr.trade-buy td {
    color: #0EB466 !important;
    background: #0eb4660f;
}
.trades-table tbody tr.trade-sell td {
    color: #E63946 !important;
    background: #e639460f;
}

/* Clock emoji cell */
.tx-time {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    /* border-radius: 8px; */
    /* background: rgba(255, 255, 255, 0.06); */
    /* border: 1px solid rgba(255, 255, 255, 0.08); */
    transition: background .15s 
ease, transform .15s 
ease, color .15s 
ease;
}

.trades-table td {
  padding: 6px 8px;
  color: var(--text);
  vertical-align: middle;
}
.trades-table td:nth-child(1) {
  color: var(--text);
  white-space: nowrap;
  font-weight: 700;
}
.trades-table td:nth-child(2),
.trades-table td:nth-child(3),
.trades-table td:nth-child(4),
.trades-table td:nth-child(5) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  text-align: right;
}

/* Reduce gap between Time and USD */
.trades-table th:first-child,
.trades-table td:first-child { text-align: left;}
.trades-table td:first-child { padding-right: 2px; white-space: nowrap; }
.trades-table td:nth-child(2) { padding-left: 2px; }

/* Solscan link row styling */
.trades-table tr.trade-link-row td {
  padding: 4px 10px 10px 10px;
  font-size: 0.76rem;
}
.tx-link { color: var(--text-muted); text-decoration: none; }
.tx-link:hover { color: var(--primary); text-decoration: underline; }

/* Time cell icon next to text */
.tx-icon {
  margin-left: 0;
  margin-right: 6px;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
}
.tx-icon:hover { color: var(--primary); }

/* Buy/Sell pill styling using existing .up / .down classes */
.trades-table td.up,
.trades-table td.down {
  text-align: left;
}
.trades-table td.up > *,
.trades-table td.down > * { pointer-events: none; }
.trades-table td.up::before,
.trades-table td.down::before {
  content: attr(data-label);
}
.trades-table td.up,
.trades-table td.down {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.trades-table td.up {
  color: #0EB466;
  background: linear-gradient(135deg, rgba(14,180,102,0.18), rgba(14,180,102,0.08));
  border: 1px solid rgba(14,180,102,0.35);
}
.trades-table td.down {
  color: #E63946;
  background: linear-gradient(135deg, rgba(230,57,70,0.18), rgba(230,57,70,0.08));
  border: 1px solid rgba(230,57,70,0.35);
}

.trades-table .loading {
  text-align: center;
  color: var(--text-muted);
  padding: 18px 0;
}

.trades-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

@media (max-width: 480px) {
  .trades-table thead th { font-size: 0.64rem; }
  .trades-table td { padding: 6px 8px; font-size: 0.82rem; }
}

@media (max-width: 720px) {
  /* Keep as table on mobile */
  .trades-table thead { display: table-header-group; }
  .trades-table, .trades-table tbody, .trades-table tr, .trades-table td { width: auto; }
  .trades-table { width: 100%; table-layout: auto; }
  .trades-scroll { max-height: 60vh; overflow-y: auto; overflow-x: hidden; }
}