/* ═══════════════════════════════════════════════════════════════════════════
   Visualiseur Galactique 3D — orbit-metrics.com
   Responsive Optimisé : Desktop, iPad / Tablettes et iPhone / Mobiles
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #030408;
  --ink: #f8fafc;
  --ink-dim: #94a3b8;
  --accent: #ff7a18;
  --accent-dark: #e05a0a;
  --accent-light: #ff9d42;
  --glass: rgba(12, 10, 16, 0.76);
  --glass-border: rgba(224, 90, 10, 0.24);
  --glass-border-hover: rgba(255, 122, 24, 0.5);
  --buy: #19ffb0;
  --sell: #ff2d6f;
  --p2p: #ffd36b;
  --radius: 18px;
  --gap: clamp(10px, 2vw, 22px);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body { font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }

/* ── Scène ────────────────────────────────────────────────────────────────── */
.galaxy-root {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 75% 55% at 50% 50%, rgba(224, 90, 10, 0.15), transparent 65%),
    radial-gradient(circle at 50% 45%, rgba(184, 64, 0, 0.09), transparent 45%),
    var(--bg);
}
.galaxy-canvas { position: absolute; inset: 0; }

/* ── HUD ─────────────────────────────────────────────────────────────────── */
.hud { position: absolute; pointer-events: auto; z-index: 2; }

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 1px rgba(224, 90, 10, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hud-title { top: var(--gap); left: var(--gap); padding: 14px 18px; max-width: min(340px, calc(100% - 2 * var(--gap))); }
.hud-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hud-title h1 { margin: 0; font-size: clamp(1.2rem, 2.4vw, 1.75rem); font-weight: 600; letter-spacing: 0.01em; }
.hud-lang-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(224, 90, 10, 0.32);
  border-radius: 9999px; padding: 3px 9px;
  color: var(--ink); font-family: inherit; font-size: 0.72rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
  pointer-events: auto; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.hud-lang-btn:hover {
  background: rgba(224, 90, 10, 0.25);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(224, 90, 10, 0.45);
}
.hud-title p { margin: 4px 0 10px; font-size: 0.82rem; font-weight: 300; color: var(--ink-dim); line-height: 1.35; }
.accent {
  background: linear-gradient(90deg, #ff7a18, #ff9d42);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 8px rgba(224, 90, 10, 0.35));
}

/* ── Boîte de recherche / suivi ─────────────────────────────────────────── */
.search-box { display: flex; gap: 6px; margin: 6px 0 10px; pointer-events: auto; }
.search-box input {
  flex: 1; min-width: 0; background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 8px;
  padding: 6px 10px; color: #fff; font-family: inherit; font-size: 0.78rem;
  outline: none; transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  pointer-events: auto; cursor: text; user-select: text; -webkit-user-select: text;
}
.search-box input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 14px rgba(224, 90, 10, 0.35);
}
.search-box button {
  background: linear-gradient(135deg, #e05a0a, #ff7a18);
  color: #fff; border: none; border-radius: 8px;
  padding: 6px 14px; font-family: inherit; font-size: 0.76rem; font-weight: 600;
  cursor: pointer; transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap; pointer-events: auto;
  box-shadow: 0 2px 10px rgba(224, 90, 10, 0.4);
}
.search-box button:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(255, 122, 24, 0.6);
}
.search-box button:active { transform: translateY(0); }

.search-feedback {
  margin: -4px 0 8px; padding: 5px 9px; border-radius: 8px;
  font-size: 0.7rem; line-height: 1.35;
  background: rgba(224, 90, 10, 0.14);
  border: 1px solid rgba(224, 90, 10, 0.35);
  color: #ffedd5;
  animation: feed-in 0.25s ease-out;
}
.search-feedback.is-error {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.search-feedback.is-success {
  background: rgba(25, 255, 176, 0.14);
  border-color: rgba(25, 255, 176, 0.4);
  color: #6ee7b7;
}

/* ── Statut de connexion ─────────────────────────────────────────────────── */
.status { --s: #ffb84d; display: inline-flex; align-items: center; gap: 7px; font-size: 0.76rem; font-weight: 500; color: var(--s); }
.status[data-status='live'] { --s: var(--buy); }
.status[data-status='closed'] { --s: var(--sell); }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--s); box-shadow: 0 0 8px var(--s); }
.status[data-status='live'] .dot { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.6); opacity: 0.5; } }

/* ── Stats ───────────────────────────────────────────────────────────────── */
.hud-stats { top: var(--gap); right: var(--gap); display: flex; gap: 20px; padding: 12px 18px; }
.hud-stats div { display: flex; flex-direction: column; align-items: flex-end; }
.stat-value { font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.68rem; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-dim); }

/* ── Flux en direct ──────────────────────────────────────────────────────── */
.hud-feed {
  right: var(--gap); bottom: var(--gap);
  width: min(340px, calc(100% - 2 * var(--gap)));
  padding: 12px 15px;
  pointer-events: auto;
}
.feed-header-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px;
}
.feed-header-bar h2 {
  margin: 0; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.feed-hint { margin: 0 0 8px; font-size: 0.66rem; color: var(--ink-dim); opacity: 0.85; }
.feed {
  list-style: none; margin: 0; padding: 2px 4px 2px 0;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 2.5em; max-height: 240px;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
  pointer-events: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(224, 90, 10, 0.45) rgba(255, 255, 255, 0.05);
}
.feed::-webkit-scrollbar { width: 5px; }
.feed::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 4px; }
.feed::-webkit-scrollbar-thumb { background: rgba(224, 90, 10, 0.4); border-radius: 4px; }
.feed::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.feed:empty::after { content: 'En attente de transactions…'; font-size: 0.8rem; font-weight: 300; color: var(--ink-dim); }

.feed-item {
  --c: var(--p2p);
  display: flex; flex-direction: column; gap: 4px;
  padding: 7px 9px; border-radius: 9px; font-size: 0.82rem;
  background: color-mix(in srgb, var(--c) 8%, transparent);
  border-left: 2px solid var(--c);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  animation: feed-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.feed-item:hover {
  transform: translateX(-3px);
  background: color-mix(in srgb, var(--c) 18%, transparent);
}
.feed-item.is-replaying, .feed-item:active {
  transform: translateX(-4px) scale(1.02);
  background: color-mix(in srgb, var(--c) 28%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--c) 45%, transparent);
}
.feed-item.tx-BUY { --c: var(--buy); }
.feed-item.tx-SELL { --c: var(--sell); }

.feed-header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.feed-badge { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c); }
.feed-item strong { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.feed-details {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.feed-route { flex: 1; min-width: 0; font-size: 0.68rem; color: var(--ink-dim); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-hashscan-link {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px; font-size: 0.62rem; font-weight: 500;
  color: var(--ink-dim); text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  transition: all 0.18s ease;
  line-height: 1.2;
}
.feed-hashscan-link svg { opacity: 0.8; transition: transform 0.18s ease; }
.feed-hashscan-link:hover {
  color: #fff;
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}
.feed-hashscan-link:hover svg { opacity: 1; transform: translate(1px, -1px); }
@keyframes feed-in { from { opacity: 0; transform: translateY(-8px); } }

/* ── Légende & Classification Stellaire (Bureau) ─────────────────────────── */
.hud-legend {
  left: var(--gap); bottom: var(--gap);
  width: min(340px, calc(100% - 2 * var(--gap)));
  padding: 12px 14px;
}
.stellar-panel { display: flex; flex-direction: column; gap: 6px; }
.stellar-header {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.stellar-title-wrap {
  display: flex; align-items: center; gap: 6px; min-width: 0;
}
.stellar-header h2 {
  margin: 0; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stellar-icon { font-size: 0.8rem; }
.stellar-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 3px;
}
.stellar-item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 8px; padding: 4px 8px; border-radius: 8px;
  cursor: pointer;
  background: transparent;
  transition: background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
  user-select: none;
}
.stellar-item:hover, .stellar-item:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
  outline: none;
}
.stellar-item.is-active, .stellar-item:active {
  background: color-mix(in srgb, var(--c, #38bdf8) 20%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--c, #38bdf8) 35%, transparent);
  transform: scale(1.02);
}
.stellar-orb {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
  display: inline-block;
  flex-shrink: 0;
}
.stellar-meta {
  display: flex; flex-direction: column; min-width: 0;
  line-height: 1.25;
}
.stellar-name {
  font-size: 0.75rem; font-weight: 500; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stellar-archetype, .stellar-tier-label {
  font-size: 0.65rem; font-weight: 300; color: var(--ink-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stellar-badge {
  font-size: 0.7rem; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--ink); background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}
.stellar-badge span { font-weight: 700; color: var(--accent); }

.legend-tx {
  margin-top: 8px; padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.tx-list {
  list-style: none; display: flex; flex-wrap: wrap; gap: 4px 12px;
  margin: 0; padding: 0; font-size: 0.72rem; color: var(--ink-dim);
}
.tx-list li { display: flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 3px; border-radius: 2px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.legend-help { margin: 6px 0 0; font-size: 0.64rem; font-weight: 300; color: var(--ink-dim); opacity: 0.85; }

/* ── Carte d'information d'une étoile ────────────────────────────────────── */
.star-card {
  position: absolute; top: 0; left: 0; z-index: 3;
  --x: 50%; --y: 50%;
  translate: calc(var(--x) + 20px) calc(var(--y) - 28px);
  width: 260px; padding: 15px 17px;
  pointer-events: auto;
  animation: card-in 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.star-card[hidden] { display: none; }
.star-card.is-flipped { translate: calc(var(--x) - 100% - 20px) calc(var(--y) - 28px); }
.star-card.is-offscreen { opacity: 0; pointer-events: none; }
@keyframes card-in { from { opacity: 0; scale: 0.92; } }

.card-close {
  position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-dim); font: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.card-close:hover, .card-close:focus-visible { background: rgba(255, 255, 255, 0.1); color: var(--ink); }

.card-avatar {
  display: block; width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 10px auto; border: 2px solid var(--accent);
  box-shadow: 0 0 18px rgba(224, 90, 10, 0.55);
}
.card-tier { margin: 0 0 4px; font-size: 0.68rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.card-account { display: block; margin-bottom: 12px; font-size: 1.15rem; font-weight: 600; color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; }
.card-account:hover { text-decoration: underline; }
.star-card dl { display: grid; gap: 8px; margin: 0 0 14px; }
.star-card dl div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.star-card dt { font-size: 0.76rem; font-weight: 300; color: var(--ink-dim); }
.star-card dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.card-link {
  display: block; padding: 8px 12px; border-radius: 10px; text-align: center; font-size: 0.8rem; font-weight: 500;
  color: #fff; text-decoration: none; background: linear-gradient(90deg, #e05a0a, #ff7a18);
  box-shadow: 0 2px 10px rgba(224, 90, 10, 0.35);
  transition: filter 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card-link:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 0 16px rgba(255, 122, 24, 0.6); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.drawer-close-btn { display: none; }
.hud-mobile-nav { display: none; }
.noscript { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   OPTIMISATION RESPONSIVE : iPad / Tablettes & iPhone / Mobiles (<= 920px)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 920px) {
  :root {
    --gap: 10px;
    --radius: 14px;
  }

  /* 1. En-tête supérieur compact (laisse 80% du haut dégagé) */
  .hud-title {
    top: var(--gap);
    left: var(--gap);
    right: auto;
    max-width: min(300px, calc(100vw - 140px));
    padding: 8px 12px;
  }
  .hud-title h1 {
    font-size: 1.05rem;
  }
  .hud-title p {
    display: none;
  }
  .search-box {
    margin: 4px 0 6px;
    gap: 4px;
  }
  .search-box input {
    padding: 5px 8px;
    font-size: 0.72rem;
  }
  .search-box button {
    padding: 5px 10px;
    font-size: 0.72rem;
  }
  .status {
    font-size: 0.72rem;
    gap: 5px;
  }
  .status .dot {
    width: 6px;
    height: 6px;
  }

  /* 2. Statistiques compactes en haut à droite */
  .hud-stats {
    top: var(--gap);
    right: var(--gap);
    left: auto;
    bottom: auto;
    padding: 8px 12px;
    gap: 12px;
  }
  .stat-value {
    font-size: 1.15rem;
  }
  .stat-label {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
  }

  /* 3. Barre d'action mobile élégante centrée au bas de l'écran */
  .hud-mobile-nav {
    display: flex;
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    gap: 8px;
    z-index: 10;
    pointer-events: auto;
  }
  .mobile-hud-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    background: rgba(12, 10, 16, 0.85);
    border: 1px solid rgba(224, 90, 10, 0.28);
    border-radius: 9999px;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    color: var(--ink);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    transition: all 0.2s ease;
    white-space: nowrap;
  }
  .mobile-hud-btn:hover, .mobile-hud-btn.is-active {
    background: rgba(224, 90, 10, 0.26);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 16px rgba(224, 90, 10, 0.55);
    transform: translateY(-2px);
  }

  /* 4. Légende & Flux masqués par défaut -> Tiroirs coulissants au clic */
  .hud-legend, .hud-feed {
    display: none;
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 58px;
    width: auto;
    max-width: 440px;
    margin: 0 auto;
    max-height: min(380px, 62vh);
    overflow-y: auto;
    z-index: 15;
    padding: 12px 14px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.85);
  }
  .hud-legend.is-open, .hud-feed.is-open {
    display: flex;
    flex-direction: column;
    animation: drawer-slide-up 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* Bouton de fermeture dans l'en-tête du tiroir */
  .drawer-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: var(--ink);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    margin-left: auto;
    transition: background 0.15s;
    flex-shrink: 0;
  }
  .drawer-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
  }

  /* 5. Carte d'étoile en bottom sheet sur mobile & tablette */
  .star-card, .star-card.is-flipped {
    translate: none;
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 58px;
    width: auto;
    max-width: 400px;
    margin: 0 auto;
    z-index: 20;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.85);
  }
  .star-card.is-offscreen {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Écrans très étroits (< 480px, ex. iPhone SE, iPhone standard) */
@media (max-width: 480px) {
  .hud-title {
    max-width: calc(100vw - 110px);
    padding: 6px 10px;
  }
  .hud-title h1 {
    font-size: 0.95rem;
  }
  .hud-stats {
    padding: 6px 10px;
    gap: 8px;
  }
  .stat-value {
    font-size: 1.05rem;
  }
  .mobile-hud-btn {
    padding: 7px 12px;
    font-size: 0.72rem;
  }
  .hud-legend, .hud-feed, .star-card, .star-card.is-flipped {
    left: 6px;
    right: 6px;
    bottom: 54px;
    max-height: 60vh;
  }
}

@keyframes drawer-slide-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   WHALE ALERT BANNER (Direct 3D)
   ═══════════════════════════════════════════════════════════════════════════ */
.whale-alert-banner[hidden] {
  display: none !important;
}

.whale-alert-banner {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 183, 3, 0.65);
  background: rgba(15, 12, 5, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 28px rgba(255, 183, 3, 0.45), inset 0 0 12px rgba(255, 183, 3, 0.2);
  animation: whale-glow-pulse 2s infinite ease-in-out;
  max-width: 90vw;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whale-alert-banner:hover {
  transform: translateX(-50%) scale(1.02);
  box-shadow: 0 0 36px rgba(255, 183, 3, 0.6), inset 0 0 16px rgba(255, 183, 3, 0.3);
}

@keyframes whale-glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 183, 3, 0.35); }
  50% { box-shadow: 0 0 35px rgba(255, 183, 3, 0.65); }
}

.whale-alert-icon {
  font-size: 1.4rem;
  animation: whale-icon-bounce 0.8s infinite alternate ease-in-out;
}

@keyframes whale-icon-bounce {
  from { transform: scale(1); }
  to { transform: scale(1.18); }
}

.whale-alert-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.whale-alert-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffb703;
  text-transform: uppercase;
}

.whale-alert-text {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 480px;
}

.whale-alert-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.whale-alert-focus-btn {
  padding: 4px 10px;
  background: rgba(255, 183, 3, 0.15);
  border: 1px solid rgba(255, 183, 3, 0.5);
  color: #ffb703;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.whale-alert-focus-btn:hover {
  background: rgba(255, 183, 3, 0.3);
  color: #fff;
  transform: scale(1.05);
}

.whale-alert-btn {
  padding: 4px 10px;
  background: #ffb703;
  color: #0b090a;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s;
}

.whale-alert-btn:hover {
  transform: scale(1.05);
}

.whale-alert-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARD EXTENSIONS (Profil On-Chain & Transactions)
   ═══════════════════════════════════════════════════════════════════════════ */
.card-section-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 10px 0;
}

.card-extra-section {
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-extra-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.65);
}

.card-extra-row strong {
  color: #fff;
  font-family: var(--font-mono, monospace);
  font-weight: 600;
}

.card-cross-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.cross-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  color: #38bdf8;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cross-badge:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
}

.card-tx-section {
  margin-top: 6px;
  font-size: 0.76rem;
}

.card-tx-header {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-tx-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 110px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.card-tx-row {
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-tx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.card-tx-item:hover {
  background: rgba(255, 255, 255, 0.10);
  transform: translateX(2px);
}

.card-tx-item.is-buy { border-left: 2px solid #19ffb0; }
.card-tx-item.is-sell { border-left: 2px solid #ff2d6f; }
.card-tx-item.is-p2p { border-left: 2px solid #ffd36b; }

.card-tx-cat { font-weight: 600; }
.card-tx-cat.is-buy { color: #19ffb0; }
.card-tx-cat.is-sell { color: #ff2d6f; }
.card-tx-cat.is-p2p { color: #ffd36b; }

.card-tx-amt {
  font-family: var(--font-mono, monospace);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 3px;
}

.card-tx-arrow {
  font-size: 10px;
  color: #ff7a18;
  opacity: 0.5;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.card-tx-item:hover .card-tx-arrow {
  opacity: 1;
  transform: translate(1px, -1px);
}
