/* =====================================================================
   Cash Devlock - Identidade Visual (Neon / LED)
   Paleta extraida da logo:
     - Fundo profundo:  #070b16 / #0a0e1a / #0d1422
     - Verde neon:      #7CFC00 / #5BE35B  (seta de alta / "$")
     - Ciano neon:      #1FB6FF / #2BB8F0  (escudo / "G")
     - Gradiente marca: verde -> ciano (diagonal)
   ===================================================================== */

:root {
  --bg-900: #070b16;
  --bg-800: #0a0e1a;
  --bg-700: #0d1422;
  --bg-600: #111a2e;
  --surface: rgba(17, 26, 46, 0.72);
  --border: rgba(43, 184, 240, 0.18);

  --neon-green: #7CFC00;
  --neon-green-soft: #5be35b;
  --neon-cyan: #1fb6ff;
  --neon-cyan-soft: #2bb8f0;

  --text: #e8f0fb;
  --text-dim: #8aa0bd;

  --grad-brand: linear-gradient(120deg, var(--neon-green) 0%, var(--neon-cyan) 100%);
  --glow-green: 0 0 8px rgba(124, 252, 0, 0.55), 0 0 22px rgba(124, 252, 0, 0.35);
  --glow-cyan: 0 0 8px rgba(31, 182, 255, 0.55), 0 0 22px rgba(31, 182, 255, 0.35);
}

* { box-sizing: border-box; }

body {
  background: var(--bg-900);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  position: relative;
  overflow-x: hidden;
}

/* Fundo animado: gradiente radial + grade neon sutil ------------------ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(124, 252, 0, 0.10), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(31, 182, 255, 0.12), transparent 55%),
    var(--bg-900);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(31, 182, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 182, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 35%, black 0%, transparent 80%);
  animation: gridpulse 8s ease-in-out infinite;
}
@keyframes gridpulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 0.9; }
}

/* ---------------------------------------------------------------------
   Marca / Logo
   --------------------------------------------------------------------- */
.brand-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.logo-glow {
  filter: drop-shadow(0 0 10px rgba(31, 182, 255, 0.45))
          drop-shadow(0 0 18px rgba(124, 252, 0, 0.30));
  animation: logofloat 6s ease-in-out infinite;
}
@keyframes logofloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ---------------------------------------------------------------------
   Cards / superficies com borda neon
   --------------------------------------------------------------------- */
.neon-card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 1rem;
  position: relative;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
/* moldura LED animada (conic gradient girando) */
.neon-frame {
  position: relative;
  border-radius: 1rem;
  padding: 1px;
  background: var(--bg-700);
}
.neon-frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--ang, 0deg),
              transparent 0deg,
              var(--neon-green) 90deg,
              var(--neon-cyan) 180deg,
              transparent 300deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: borderspin 6s linear infinite;
  opacity: 0.85;
}
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes borderspin { to { --ang: 360deg; } }

/* ---------------------------------------------------------------------
   Botoes neon
   --------------------------------------------------------------------- */
.btn-neon {
  position: relative;
  font-weight: 700;
  color: #02110a;
  background: var(--grad-brand);
  border-radius: 0.7rem;
  box-shadow: var(--glow-green);
  transition: transform 0.15s ease, box-shadow 0.25s ease, filter 0.2s ease;
}
.btn-neon:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 0 12px rgba(124, 252, 0, 0.7), 0 0 30px rgba(31, 182, 255, 0.55);
}
.btn-neon:active { transform: translateY(0); }

.btn-danger-neon {
  font-weight: 700;
  color: #1a0008;
  background: linear-gradient(120deg, #ff4d6d, #ff7849);
  border-radius: 0.7rem;
  box-shadow: 0 0 8px rgba(255, 77, 109, 0.5), 0 0 22px rgba(255, 120, 73, 0.35);
  transition: transform 0.15s ease, filter 0.2s ease;
}
.btn-danger-neon:hover { transform: translateY(-1px); filter: brightness(1.08); }

.btn-ghost-neon {
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 0.7rem;
  background: rgba(31, 182, 255, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn-ghost-neon:hover {
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}

/* Inputs */
.input-neon {
  background: rgba(7, 11, 22, 0.7);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 0.6rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-neon:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 1px var(--neon-cyan), 0 0 14px rgba(31, 182, 255, 0.35);
}

/* Texto neon (titulos) */
.neon-title {
  text-shadow: 0 0 6px rgba(31, 182, 255, 0.45), 0 0 18px rgba(124, 252, 0, 0.18);
}

/* ---------------------------------------------------------------------
   Status do robo (pílulas com LED pulsante)
   --------------------------------------------------------------------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.status-pill::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: ledblink 1.4s ease-in-out infinite;
}
@keyframes ledblink { 0%,100%{opacity:1;} 50%{opacity:0.35;} }

.status-running { color: var(--neon-green); background: rgba(124,252,0,0.10); border-color: rgba(124,252,0,0.35); }
.status-stopped { color: var(--text-dim); background: rgba(138,160,189,0.08); border-color: rgba(138,160,189,0.25); }
.status-stopped::before { animation: none; }
.status-error   { color: #ff5d73; background: rgba(255,93,115,0.10); border-color: rgba(255,93,115,0.35); }
.status-paused  { color: #ffd166; background: rgba(255,209,102,0.10); border-color: rgba(255,209,102,0.35); }

/* ---------------------------------------------------------------------
   Logs (scrollbar e cores por acao)
   --------------------------------------------------------------------- */
#log-container::-webkit-scrollbar { width: 8px; }
#log-container::-webkit-scrollbar-track { background: var(--bg-800); }
#log-container::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--neon-cyan), var(--neon-green));
  border-radius: 4px;
}
.log-row { animation: logslide 0.35s ease; }
@keyframes logslide { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.log-buy { color: var(--neon-green); }
.log-sell { color: #ff5d73; }
.log-error { color: #ff7849; }
.log-signal { color: #ffd166; }

/* ---------------------------------------------------------------------
   Splash screen (video intro pos-login)
   --------------------------------------------------------------------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}
.splash video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.splash::after {
  /* vinheta neon nas bordas */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 160px 40px rgba(31, 182, 255, 0.25),
              inset 0 0 80px 10px rgba(124, 252, 0, 0.12);
}
.splash-skip {
  position: absolute;
  bottom: 28px; right: 32px;
  z-index: 2;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(7, 11, 22, 0.55);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.splash-skip:hover { border-color: var(--neon-cyan); box-shadow: var(--glow-cyan); }

.splash-fade-out { animation: splashfade 0.6s ease forwards; }
@keyframes splashfade { to { opacity: 0; visibility: hidden; } }

/* Scan line LED sobre o video */
.splash-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(31, 182, 255, 0.05) 0px,
    rgba(31, 182, 255, 0.05) 1px,
    transparent 2px,
    transparent 4px
  );
  mix-blend-mode: screen;
}
