/**
 * trading-dashboard.css - Full market overview, AI Engine central, trading animations.
 * Dark theme, red/crimson glow, glassmorphism, neon. No manual selection UI.
 */

/* Link to How it works + disclaimer */
.trading-dashboard-howit-note {
  margin: -0.25rem 0 1rem;
  font-size: 0.88rem;
}

.trading-dashboard-howit-note .howit-inline-link {
  color: rgba(233, 30, 99, 0.95);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.trading-dashboard-howit-note .howit-inline-link:hover {
  color: #fff;
}

.trading-ai-howit-note {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  text-align: center;
}

.trading-ai-howit-note .howit-inline-link {
  color: rgba(233, 30, 99, 0.95);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.trading-ai-howit-note .howit-inline-link:hover {
  color: #fff;
}

.trading-bots-howit-note {
  margin: 0 0 1rem;
}

.staking-howit-note {
  margin: 0 0 1.25rem;
}

/* -------------------------------------------------------------------------
   Market overview container
   ------------------------------------------------------------------------- */
.trading-market-overview {
  padding: 0 0 1.5rem;
  position: relative;
}

.trading-market-overview h3 {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 1rem;
  font-weight: 600;
}

.trading-market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

/* -------------------------------------------------------------------------
   Exchange block: title + pair cards
   ------------------------------------------------------------------------- */
.trading-exchange-block {
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid rgba(220, 20, 60, 0.2);
  border-radius: 14px;
  padding: 0.9rem;
  backdrop-filter: blur(12px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.trading-exchange-block.active-node {
  border-color: rgba(233, 30, 99, 0.6);
  box-shadow: 0 0 28px rgba(233, 30, 99, 0.25), inset 0 0 20px rgba(233, 30, 99, 0.05);
  animation: trading-node-pulse 1.5s ease-in-out infinite;
}

@keyframes trading-node-pulse {
  0%, 100% { box-shadow: 0 0 28px rgba(233, 30, 99, 0.25), inset 0 0 20px rgba(233, 30, 99, 0.05); }
  50%      { box-shadow: 0 0 40px rgba(233, 30, 99, 0.4), inset 0 0 24px rgba(233, 30, 99, 0.08); }
}

.trading-exchange-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(220, 20, 60, 0.2);
  letter-spacing: 0.02em;
}

.trading-pair-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* -------------------------------------------------------------------------
   Pair card: price, volume, spread, liquidity
   ------------------------------------------------------------------------- */
.trading-pair-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.trading-pair-card.pair-active {
  border-color: rgba(233, 30, 99, 0.6);
  box-shadow: 0 0 20px rgba(233, 30, 99, 0.3);
  transform: scale(1.02);
  animation: trading-pair-glow 0.8s ease-out;
}

@keyframes trading-pair-glow {
  0%   { filter: brightness(1.3); }
  100% { filter: brightness(1); }
}

.trading-pair-card .pair-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 0.35rem;
}

.trading-pair-card .pair-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e91e63;
  transition: opacity 0.2s ease;
}

.trading-pair-card .pair-price.updated {
  animation: trading-price-flash 0.5s ease-out;
}

@keyframes trading-price-flash {
  0%   { opacity: 0.5; }
  50%  { opacity: 1; }
  100% { opacity: 1; }
}

.trading-pair-card .pair-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
}

.trading-pair-card .pair-meta span {
  display: inline-block;
}

/* -------------------------------------------------------------------------
   Auronix AI Engine central (when trading active)
   ------------------------------------------------------------------------- */
.auronix-ai-engine-wrap {
  position: relative;
  margin: 1.5rem 0;
  padding: 1.5rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.95), rgba(20, 5, 10, 0.9));
  border: 1px solid rgba(220, 20, 60, 0.35);
  overflow: hidden;
  display: none;
}

.auronix-ai-engine-wrap.visible {
  display: block;
  animation: trading-engine-in 0.5s ease-out;
}

@keyframes trading-engine-in {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}

.auronix-ai-engine-core {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
}

.auronix-ai-engine-core .core-inner {
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, #e91e63 0%, #8b0000 100%);
  box-shadow: 0 0 30px #e91e63, 0 0 60px rgba(233, 30, 99, 0.4);
  animation: trading-core-pulse 2s ease-in-out infinite;
}

.auronix-ai-engine-core .core-ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(233, 30, 99, 0.4);
  border-radius: 50%;
  animation: trading-ring-rotate 8s linear infinite;
}

.auronix-ai-engine-core .core-ring:nth-child(3) {
  inset: 10px;
  animation-duration: 6s;
  animation-direction: reverse;
}

.auronix-ai-engine-core .core-ring:nth-child(4) {
  inset: 25px;
  animation-duration: 10s;
}

@keyframes trading-core-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50%      { transform: translate(-50%, -50%) scale(1.1); opacity: 0.9; }
}

@keyframes trading-ring-rotate {
  to { transform: rotate(360deg); }
}

.auronix-ai-engine-title {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.5rem;
  letter-spacing: 0.03em;
}

.auronix-ai-engine-status {
  text-align: center;
  font-size: 1rem;
  color: rgba(233, 30, 99, 0.95);
  font-weight: 600;
  min-height: 1.5em;
  transition: opacity 0.3s ease;
}

/* -------------------------------------------------------------------------
   Flow line (between exchanges - drawn via element or pseudo)
   ------------------------------------------------------------------------- */
.trading-flow-line {
  position: fixed;
  pointer-events: none;
  z-index: 5;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(233, 30, 99, 0.8), transparent);
  transform-origin: left center;
  animation: trading-flow-dash 0.8s linear infinite;
}

@keyframes trading-flow-dash {
  to { background-position: 20px 0; }
}

/* -------------------------------------------------------------------------
   Floating labels: BUY / SELL
   ------------------------------------------------------------------------- */
.trading-floating-label {
  position: fixed;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  animation: trading-float-in 0.4s ease-out;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.trading-floating-label.buy {
  background: rgba(34, 197, 94, 0.9);
  color: #fff;
  border: 1px solid rgba(34, 197, 94, 1);
}

.trading-floating-label.sell {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border: 1px solid rgba(239, 68, 68, 1);
}

@keyframes trading-float-in {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* -------------------------------------------------------------------------
   Profit popup: +$23.54 floating up + glow
   ------------------------------------------------------------------------- */
.trading-profit-popup {
  position: fixed;
  z-index: 101;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 1rem 1.5rem;
  border-radius: 14px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #4ade80;
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid rgba(74, 222, 128, 0.6);
  box-shadow: 0 0 40px rgba(74, 222, 128, 0.4);
  pointer-events: none;
  animation: trading-profit-float 1.2s ease-out forwards;
}

@keyframes trading-profit-float {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  20%  { opacity: 1; transform: translate(-50%, -60%) scale(1.1); }
  80%  { opacity: 1; transform: translate(-50%, -80%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -100%) scale(1); }
}

/* -------------------------------------------------------------------------
   Data flow / matrix style background
   ------------------------------------------------------------------------- */
.trading-matrix-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(233, 30, 99, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 30, 99, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  border-radius: inherit;
}

/* -------------------------------------------------------------------------
   Auronix AI layout: TOP = amount + buttons, MIDDLE = engine, BOTTOM = data + history
   ------------------------------------------------------------------------- */
.auronix-ai-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

/* Wide cinematic grid must not inherit the start-form max width */
.auronix-ai-layout.cinematic-control-center.cinematic-active {
  max-width: 1200px;
}

.auronix-ai-top.controls-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.auronix-ai-top .auronix-ai-form.glass {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
}

.auronix-ai-top .auronix-ai-locked.glass {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  flex: 1;
  min-width: 120px;
}

.auronix-ai-locked-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auronix-ai-locked-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #e91e63;
}

.auronix-ai-middle.engine-wrap {
  position: relative;
  padding: 1.25rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.95), rgba(20, 5, 10, 0.9));
  border: 1px solid rgba(220, 20, 60, 0.35);
  overflow: hidden;
}

.auronix-ai-middle .auronix-ai-engine-core-wrap.glass {
  padding: 1.5rem;
  margin-top: 0.5rem;
  position: relative;
  overflow: hidden;
}

.auronix-ai-bottom.data-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auronix-ai-bottom .auronix-ai-grid.glass {
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.auronix-ai-bottom .auronix-ai-grid .cell-timer {
  order: 1;
}

.auronix-ai-bottom .auronix-ai-grid .cell-profit {
  order: 2;
}

.auronix-ai-bottom .auronix-ai-grid .cell-exchange {
  order: 3;
}

.auronix-ai-bottom .auronix-ai-grid .cell-pair {
  order: 4;
}

/* -------------------------------------------------------------------------
   Hide old selectors when using new dashboard
   ------------------------------------------------------------------------- */
.trading-dashboard .trading-selectors.hidden,
.trading-dashboard .trading-live-row.hidden,
.trading-dashboard .trading-chart-row.hidden,
.trading-dashboard .arbitrage-section.hidden {
  display: none !important;
}

/* -------------------------------------------------------------------------
   Auronix PREMIUM battery system (.battery-system)
   ------------------------------------------------------------------------- */
.battery-system.auronix-battery-strip {
  margin: 0 0 1.1rem;
  padding: 1rem 1.15rem 1.1rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 255, 156, 0.18);
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(0, 255, 156, 0.12), transparent 50%),
    linear-gradient(155deg, rgba(6, 14, 12, 0.96), rgba(10, 8, 18, 0.94));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 32px rgba(0, 255, 156, 0.06);
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
  position: relative;
  overflow: hidden;
}

.battery-system.auronix-battery-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.015) 2px,
    rgba(255, 255, 255, 0.015) 4px
  );
  pointer-events: none;
  opacity: 0.5;
}

.battery-system-head.auronix-battery-strip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.auronix-battery-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0, 255, 156, 0.92);
  font-weight: 700;
  text-shadow: 0 0 20px rgba(0, 255, 156, 0.35);
}

.auronix-battery-timer {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.04em;
}

.battery-system-cells.auronix-battery-cells {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 1;
}

.battery-premium-cell.auronix-battery-cell {
  position: relative;
  width: 44px;
  flex: 0 0 auto;
  cursor: default;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
  -webkit-tap-highlight-color: transparent;
}

.battery-premium-cell__halo {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 140%;
  height: 45%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0, 255, 156, 0.22), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 0;
}

@media (hover: hover) and (pointer: fine) {
  .battery-premium-cell.auronix-battery-cell:not(.auronix-battery-cell--off):not(.auronix-battery-cell--spent):hover {
    transform: scale(1.08) translateY(-2px);
    filter: drop-shadow(0 8px 20px rgba(0, 255, 156, 0.25));
  }

  .battery-premium-cell.auronix-battery-cell:not(.auronix-battery-cell--off):not(.auronix-battery-cell--spent):hover .battery-premium-cell__halo {
    opacity: 1;
  }
}

.battery-premium-cell.auronix-battery-cell:not(.auronix-battery-cell--off):not(.auronix-battery-cell--spent):active {
  animation: battery-click-pulse 0.45s ease;
}

@keyframes battery-click-pulse {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(0.94);
  }
  100% {
    transform: scale(1);
  }
}

.battery-svg-premium.auronix-battery-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.battery-tip-premium.auronix-battery-tip {
  fill: rgba(200, 210, 220, 0.45);
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 0.5;
}

.battery-chassis.auronix-battery-shell {
  fill: rgba(18, 20, 26, 0.92);
  stroke: rgba(0, 255, 156, 0.28);
  stroke-width: 1.15;
}

.battery-chassis-inner {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
  pointer-events: none;
}

.battery-glass-back {
  fill: #0a0c10;
}

.battery-frame-highlight {
  pointer-events: none;
}

.battery-fill-stack.auronix-battery-fill-wrap {
  transform-origin: center bottom;
  transform-box: fill-box;
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.auronix-battery-cell--draining .battery-fill-stack.auronix-battery-fill-wrap {
  transform: scaleY(var(--bat-fill, 1));
}

.battery-liquid.auronix-battery-fill {
  filter: drop-shadow(0 0 8px rgba(0, 255, 156, 0.45));
  transition: filter 0.35s ease, opacity 0.35s ease;
}

.auronix-battery-cell--full .battery-liquid {
  filter: drop-shadow(0 0 10px rgba(0, 255, 156, 0.65));
  animation: battery-breathe-glow 2.8s ease-in-out infinite;
}

.auronix-battery-cell--full .battery-chassis {
  stroke: rgba(0, 255, 156, 0.42);
}

.auronix-battery-cell--full .battery-premium-cell__halo {
  opacity: 0.35;
  animation: battery-halo-breathe 3s ease-in-out infinite;
}

@keyframes battery-breathe-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(0, 255, 156, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(0, 255, 156, 0.85));
  }
}

@keyframes battery-halo-breathe {
  0%,
  100% {
    opacity: 0.28;
  }
  50% {
    opacity: 0.55;
  }
}

.auronix-battery-cell--draining:not(.auronix-battery-cell--low) .battery-liquid {
  animation: battery-energy-shift 2.2s ease-in-out infinite;
}

@keyframes battery-energy-shift {
  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(0, 255, 156, 0.5)) hue-rotate(0deg);
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(255, 235, 59, 0.45)) hue-rotate(12deg);
  }
}

.battery-energy-streak {
  mix-blend-mode: overlay;
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: battery-streak-flow 2.5s ease-in-out infinite;
}

@keyframes battery-streak-flow {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  50% {
    opacity: 0.65;
    transform: translateY(-4px);
  }
}

.battery-particle {
  transform-box: fill-box;
  transform-origin: center;
  animation: battery-particle-drift 3.2s ease-in-out infinite;
}

.battery-particle:nth-child(2) {
  animation-delay: 0.4s;
}
.battery-particle:nth-child(3) {
  animation-delay: 0.8s;
}
.battery-particle:nth-child(4) {
  animation-delay: 1.1s;
}
.battery-particle:nth-child(5) {
  animation-delay: 1.5s;
}

@keyframes battery-particle-drift {
  0%,
  100% {
    opacity: 0.35;
    transform: translate(0, 0);
  }
  33% {
    opacity: 0.75;
    transform: translate(1px, -3px);
  }
  66% {
    opacity: 0.45;
    transform: translate(-1px, 2px);
  }
}

.battery-scanline {
  mix-blend-mode: soft-light;
  transform-box: fill-box;
  transform-origin: top center;
  animation: battery-scan-sweep 4s linear infinite;
}

@keyframes battery-scan-sweep {
  0% {
    transform: translateY(-8px);
    opacity: 0.15;
  }
  30% {
    opacity: 0.35;
  }
  100% {
    transform: translateY(52px);
    opacity: 0.12;
  }
}

.auronix-battery-cell--low .battery-liquid,
.battery-liquid--low {
  filter: drop-shadow(0 0 12px rgba(255, 87, 34, 0.75)) !important;
  animation: battery-low-flicker 0.9s ease-in-out infinite !important;
}

.auronix-battery-cell--low .battery-chassis {
  stroke: rgba(255, 152, 0, 0.55);
}

@keyframes battery-low-flicker {
  0%,
  100% {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.65));
  }
  50% {
    opacity: 0.88;
    filter: drop-shadow(0 0 18px rgba(255, 61, 0, 0.9));
  }
}

.auronix-battery-cell--off .battery-fill-stack .battery-liquid,
.auronix-battery-cell--off .battery-particles,
.auronix-battery-cell--off .battery-energy-streak,
.auronix-battery-cell--off .battery-scanline {
  opacity: 0 !important;
  animation: none !important;
}

.auronix-battery-cell--off .battery-chassis {
  fill: #2a2a2a;
  stroke: rgba(255, 255, 255, 0.06);
  filter: none;
}

.auronix-battery-cell--off .battery-tip-premium {
  fill: #3a3a3a;
}

.auronix-battery-cell--off .battery-glass-back {
  fill: #1a1a1a;
}

.auronix-battery-cell--off .battery-frame-highlight {
  opacity: 0.25;
}

.auronix-battery-cell--off.battery-premium-cell {
  opacity: 0.38;
  transform: scale(0.88);
}

/* Уже израсходованная ячейка в паре 2×3h — пустой корпус, но того же размера что соседняя */
.auronix-battery-cell--spent .battery-fill-stack .battery-liquid,
.auronix-battery-cell--spent .battery-particles,
.auronix-battery-cell--spent .battery-energy-streak,
.auronix-battery-cell--spent .battery-scanline {
  opacity: 0 !important;
  animation: none !important;
}

.auronix-battery-cell--spent .battery-chassis {
  fill: #252528;
  stroke: rgba(255, 99, 99, 0.22);
  filter: none;
}

.auronix-battery-cell--spent .battery-tip-premium {
  fill: #3a3a3e;
}

.auronix-battery-cell--spent .battery-glass-back {
  fill: #121214;
}

.auronix-battery-cell--spent .battery-frame-highlight {
  opacity: 0.4;
  stroke: rgba(255, 255, 255, 0.08);
}

.auronix-battery-cell--lost-flash {
  animation: battery-lost-burst 0.9s ease forwards;
}

@keyframes battery-lost-burst {
  0% {
    opacity: 1;
    filter: brightness(1.5) saturate(1.3);
  }
  35% {
    opacity: 0.4;
    filter: brightness(2.2);
  }
  100% {
    opacity: 1;
    filter: brightness(1);
  }
}

.auronix-battery-strip--recharge .battery-liquid {
  animation: battery-recharge-burst 1.2s ease forwards !important;
}

@keyframes battery-recharge-burst {
  0% {
    filter: drop-shadow(0 0 6px rgba(0, 255, 156, 0.4));
    opacity: 0.85;
  }
  40% {
    filter: drop-shadow(0 0 28px rgba(0, 255, 156, 1));
    opacity: 1;
  }
  100% {
    filter: drop-shadow(0 0 10px rgba(0, 255, 156, 0.55));
    opacity: 1;
  }
}

.auronix-battery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.auronix-battery-btn.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
}

.auronix-battery-warning {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: #ffab40;
  animation: auronix-bat-warn-pulse 1.5s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

.auronix-battery-warning.hidden {
  display: none;
}

@keyframes auronix-bat-warn-pulse {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 1;
  }
}

.auronix-battery-strip--warning {
  border-color: rgba(255, 171, 64, 0.42);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 0 28px rgba(255, 152, 0, 0.12);
}

.auronix-battery-strip--stopped {
  border-color: rgba(255, 59, 92, 0.55);
  animation: auronix-strip-danger 1.25s ease-in-out infinite;
}

.auronix-battery-strip--recharge {
  animation: auronix-strip-recharge 1.4s ease forwards;
}

@keyframes auronix-strip-danger {
  0%,
  100% {
    box-shadow: 0 0 12px rgba(255, 59, 92, 0.2);
  }
  50% {
    box-shadow: 0 0 28px rgba(255, 59, 92, 0.45);
  }
}

@keyframes auronix-strip-recharge {
  0% {
    border-color: rgba(0, 255, 156, 0.25);
    box-shadow: 0 0 8px rgba(0, 201, 255, 0.12);
  }
  50% {
    border-color: rgba(0, 255, 156, 0.9);
    box-shadow: 0 0 40px rgba(0, 255, 156, 0.35);
  }
  100% {
    border-color: rgba(0, 255, 156, 0.18);
    box-shadow: 0 0 32px rgba(0, 255, 156, 0.06);
  }
}

#cinematic-wrap.auronix-trading-stopped-pulse {
  animation: auronix-trading-stop-pulse 1.1s ease-in-out 3;
}

@keyframes auronix-trading-stop-pulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 0 rgba(255, 59, 92, 0);
  }
  50% {
    box-shadow: inset 0 0 40px 2px rgba(255, 59, 92, 0.22);
  }
}

.auronix-ai-active-wrap--battery-paused .auronix-ai-engine-core-wrap {
  filter: grayscale(0.35) saturate(0.85);
  opacity: 0.92;
}

.modal.auronix-battery-modal .auronix-battery-modal-text {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
  margin: 0;
}

.cinematic-start .auronix-battery-strip {
  margin-top: 0;
}

@media (max-width: 640px) {
  .battery-premium-cell.auronix-battery-cell {
    width: 52px;
  }

  .battery-system-cells.auronix-battery-cells {
    gap: 0.75rem 1.15rem;
  }

  .battery-svg-premium.auronix-battery-svg {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
  }

  .battery-scanline {
    animation-duration: 5s !important;
  }

  .battery-particle {
    animation-duration: 4.5s !important;
  }

  .auronix-battery-cell--full .battery-liquid {
    animation-duration: 3.5s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .battery-premium-cell.auronix-battery-cell,
  .battery-liquid,
  .battery-particle,
  .battery-scanline,
  .battery-energy-streak,
  .auronix-battery-cell--lost-flash,
  .auronix-battery-strip--recharge,
  .auronix-battery-strip--stopped {
    animation: none !important;
    transition: transform 0.2s ease, opacity 0.2s ease !important;
  }

  .auronix-battery-cell--draining .battery-fill-stack.auronix-battery-fill-wrap {
    transition: transform 0.6s linear;
  }
}

/* -------------------------------------------------------------------------
   Arbitrage verification code (12h cycles) modal animations
   ------------------------------------------------------------------------- */
.auronix-arb-code-modal .modal-title {
  letter-spacing: 0.2px;
}

.auronix-arb-modal-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auronix-arb-code-box {
  user-select: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  padding: 0.85rem 0.65rem;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(0, 255, 156, 0.25);
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 0 14px rgba(0, 255, 156, 0.35);
}

.auronix-arb-code-glitch {
  position: relative;
  animation: auronix-arb-matrix-glitch 1.4s steps(2, end) infinite;
}

@keyframes auronix-arb-matrix-glitch {
  0% {
    filter: brightness(1.25);
    transform: translateY(0);
  }
  12% {
    transform: translateY(-1px);
    filter: brightness(1.55);
  }
  36% {
    transform: translateY(1px);
    filter: brightness(1.2);
  }
  62% {
    filter: brightness(1.65) saturate(1.2);
  }
  100% {
    filter: brightness(1.25);
    transform: translateY(0);
  }
}

.auronix-arb-code-remaining-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.82);
}

.auronix-arb-code-remaining-label {
  opacity: 0.9;
}

.auronix-arb-code-remaining {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: rgba(0, 255, 156, 0.95);
  text-shadow: 0 0 10px rgba(0, 255, 156, 0.18);
}

.auronix-arb-code-hint {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
}

.auronix-arb-code-input-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
}

.auronix-arb-code-input {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 14, 0.55);
  color: rgba(255, 255, 255, 0.92);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(0, 255, 156, 0.06);
}

.auronix-arb-code-input:focus {
  border-color: rgba(0, 255, 156, 0.35);
  box-shadow: 0 0 0 4px rgba(0, 255, 156, 0.14);
}

.auronix-arb-code-actions {
  display: flex;
  justify-content: center;
}

.auronix-arb-code-error {
  color: rgba(255, 99, 132, 0.98);
  font-size: 0.92rem;
}

.auronix-arb-code-error.hidden {
  display: none;
}

.auronix-arb-code-fail {
  animation: auronix-arb-shake 0.55s ease-in-out 1;
  border-radius: 12px;
}

@keyframes auronix-arb-shake {
  0%,
  100% {
    transform: translateX(0);
    filter: brightness(1);
  }
  18% {
    transform: translateX(-7px);
    filter: brightness(1.35);
  }
  36% {
    transform: translateX(6px);
    filter: brightness(1.25);
  }
  54% {
    transform: translateX(-4px);
    filter: brightness(1.3);
  }
  72% {
    transform: translateX(3px);
    filter: brightness(1.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auronix-arb-code-glitch {
    animation: none !important;
  }
  .auronix-arb-code-fail {
    animation: none !important;
  }
}
