/* =========================================================
   NF-CASH — GLOBAL VISUAL LAYER (v4)
   - Multi-layer luminous background (blue/green/mauve/yellow)
   - More visible, still slow & soft
   - Header glow restored
   - Uniform buttons: rounded-rectangle (not pill)
========================================================= */

:root{
  --nf-blue:#60a5fa;
  --nf-green:#22c55e;
  --nf-mauve:#a78bfa;
  --nf-yellow:#facc15;
  --nf-turq:#22d3ee;
  --nf-pink:#fb7185;

  --nf-ink:#e6edf3;
  --nf-bg0:#070a0f;
  --nf-bg1:#0b0f14;

  --nf-radius: 14px;
  --nf-radius-sm: 12px;
}

/* Ensure backgrounds can render behind everything */
html, body{ min-height:100%; }
body{
  background: linear-gradient(180deg, var(--nf-bg0), var(--nf-bg1));
  color: var(--nf-ink);
  position:relative;
  overflow-x:hidden;
}

/* ===============================
   Multi-layer aurora (behind)
=============================== */
html::before{
  content:"";
  position:fixed;
  inset:-18%;
  z-index:-2;
  pointer-events:none;

  background:
    radial-gradient(900px 520px at 10% -10%, rgba(96,165,250,.34), transparent 62%),
    radial-gradient(520px 170px at 75% 35%, rgba(167,139,250,.22), transparent 62%),    
    radial-gradient(880px 520px at 92% 8%, rgba(167,139,250,.32), transparent 62%),
    radial-gradient(980px 560px at 50% 112%, rgba(250,204,21,.26), transparent 64%),
    radial-gradient(860px 520px at 4% 86%, rgba(34,197,94,.20), transparent 64%),
    radial-gradient(860px 520px at 96% 92%, rgba(250,204,21,.18), transparent 64%),
    radial-gradient(760px 460px at 88% 78%, rgba(167,139,250,.18), transparent 64%),
    linear-gradient(180deg, var(--nf-bg0), var(--nf-bg1));

  filter: saturate(1.10) contrast(1.05);
  animation: nfAurora 10.5s ease-in-out infinite;
  will-change: transform, opacity, filter;
}

@keyframes nfAurora{
  0%{
    transform: translate3d(0,0,0) scale(1.00);
    opacity: .92;
    filter: saturate(1.08) contrast(1.05) hue-rotate(0deg);
  }
  50%{
    transform: translate3d(-2.2%, -1.6%, 0) scale(1.05);
    opacity: 1;
    filter: saturate(1.22) contrast(1.07) hue-rotate(10deg);
  }
  100%{
    transform: translate3d(0,0,0) scale(1.00);
    opacity: .92;
    filter: saturate(1.08) contrast(1.05) hue-rotate(0deg);
  }
}

/* Light noise */
html::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
  opacity:.03;
  mix-blend-mode: overlay;
}

/* ===============================
   Header glow (restored)
=============================== */
.nf-header{
  position:relative;
}
.nf-header::before{
  content:"";
  position:absolute;
  inset:-10px -8px -14px -8px;
  border-radius: 18px;
  pointer-events:none;
  background:
    radial-gradient(500px 160px at 20% 20%, rgba(34,211,238,.22), transparent 60%),
    radial-gradient(520px 170px at 75% 35%, rgba(167,139,250,.18), transparent 62%),
    radial-gradient(600px 180px at 55% 120%, rgba(250,204,21,.14), transparent 64%);
  filter: blur(0px);
  opacity:.9;
  animation: nfHeaderGlow 5.8s ease-in-out infinite;
}
@keyframes nfHeaderGlow{
  0%{ opacity:.62; filter: brightness(1.02) saturate(1.08); }
  50%{ opacity:1;   filter: brightness(1.12) saturate(1.22); }
  100%{ opacity:.62; filter: brightness(1.02) saturate(1.08); }
}
.nf-header-img{
  filter: drop-shadow(0 0 16px rgba(34,211,238,.12))
          drop-shadow(0 0 18px rgba(250,204,21,.08));
}





/* ==================================================
   BACK TO HOME — GREEN / DARK / ORANGE / YELLOW
   ================================================== */

.btn.back.back-home{
  font-family: "JetBrains Mono", monospace;
  font-size: 22px;
  padding: 8px 18px;

  border-radius: 6px;

  /* cadre turquoise */
  border: 2px solid rgba(250,204,21,.55);

  /* dégradé : vert → sombre → orange → mauve pâle → jaune */
  background: linear-gradient(
    135deg,
    #00a88f 0%,      /* vert profond */
    #0aa6ff 2%,     /* bleu nuit */
    #07151f 40%,     /* pétrole */    
    #07151f 78%,     /* pétrole */

    /* zone orange plus large */
    #ffe600 90%,     /* orange chaud */
    #ff8f00 93%,     /* transition orange → mauve */


    #2bff5a 100%     /* jaune */
  );

  color: #fff6d0;
  font-weight: 600;
  letter-spacing: 0.4px;

  cursor: pointer;
  transition:
    box-shadow 0.25s ease,
    transform 0.15s ease,
    filter 0.2s ease;

  /* glow mauve pâle permanent (soft) */
  box-shadow:
    0 0 0 2px rgba(185,130,255,0.45),
    0 0 12px rgba(185,130,255,0.35),
    0 0 26px rgba(185,130,255,0.22),
    inset 0 0 6px rgba(255,255,255,0.08);
}

/* HOVER — plus fort */
.btn.back.back-home:hover{
  transform: translateY(-1px) scale(1.04);

  box-shadow:
    0 0 12px rgba(255,255,255,1),
    0 0 30px rgba(255,230,0,0.95),
    0 0 58px rgba(255,160,0,0.9),
    0 0 90px rgba(185,130,255,0.9);

  filter: saturate(1.5) brightness(1.25);
}

/* CLICK */
.btn.back.back-home:active{
  transform: scale(0.96);
  box-shadow:
    0 0 10px rgba(255,190,0,0.85),
    inset 0 0 18px rgba(0,0,0,0.55);
}

@media (max-width: 900px){
  .btn.back.back-home{
    font-size: 18px;
    padding: 6px 14px;
  }
}






/* ===============================
   Rounded-rectangle everywhere
=============================== */
.btn, button.btn, a.btn, input.btn,
.box, .terminal, .wallet-input, .nf-box, .nf-card, .send-box,
.wallet-box-header, .wallet-actions, .cookie-banner{
  border-radius: var(--nf-radius) !important;
}

/* kill pill styles */
*[style*="border-radius:999"],
*[style*="border-radius: 999"]{
  border-radius: var(--nf-radius) !important;
}

/* ===============================
   HOMEPAGE: wallet connect box highlight
=============================== */
#walletBox.wallet-box-header{
  border: 3px solid rgba(250,204,21,.55) !important;
  background: linear-gradient(180deg, rgba(17,24,39,.85), rgba(11,15,20,.92)) !important;
  /* glow mauve pâle permanent (soft) */
  box-shadow:
    0 0 0 02px rgba(185,130,255,0.45),
    0 0 12px rgba(26,255,106,0.85),
    0 0 47px rgba(185,130,255,0.45),
    inset 0 0 6px rgba(255,255,255,0.08);
  position:relative;
  overflow:hidden;
}

#walletBox.wallet-box-header::before{
  content:"";
  position:absolute;
  inset:-2px;
  pointer-events:none;
  background:
    radial-gradient(520px 220px at 18% 18%, rgba(250,204,21,.22), transparent 62%),
    radial-gradient(520px 220px at 88% 12%, rgba(167,139,250,.14), transparent 62%),
    radial-gradient(520px 220px at 72% 92%, rgba(34,211,238,.12), transparent 62%);
  opacity:.35;
  animation: nfWalletBoxPulse 2.1s ease-in-out infinite;

}
@keyframes nfWalletBoxPulse{
  0%{ opacity:.62; filter: brightness(1.0) saturate(1.10); }
  45%{ opacity:1;  filter: brightness(1.18) saturate(1.35); }
  100%{ opacity:.62; filter: brightness(1.0) saturate(1.10); }
}
#walletBox.wallet-box-header > *{ position:relative; z-index:1; }

/* Connect Wallet button: vivid yellow + faster turquoise shimmer */
.btn.connect-wallet, button.connect-wallet{
  border:2px solid rgba(250,204,21,.85) !important;
  background: linear-gradient(90deg, rgba(250,204,21,.28), rgba(34,211,238,.22), rgba(250,204,21,.28)) !important;
  background-size: 220% 220% !important;
  color: rgba(255,248,220,.98) !important;
  font-weight: 950 !important;
  box-shadow:
    0 0 0 02px rgba(127, 220, 255, 0.75),
    0 0 12px rgba(127, 220, 255, 0.75),
    0 0 20px rgba(127, 220, 255, 0.75),
    inset 0 0 6px rgba(255,255,255,0.08);      
  animation: nfCtaShimmer .95s ease-in-out infinite;
}
@keyframes nfCtaShimmer{
  0%{ background-position:0% 50%; filter:brightness(1.02); }
  50%{ background-position:100% 50%; filter:brightness(1.18); }
  100%{ background-position:0% 50%; filter:brightness(1.02); }
}
.btn.connect-wallet:hover, button.connect-wallet:hover{
  transform: translateY(-1px);
  filter: brightness(1.10) saturate(1.15);
}

/* Generic hover preserve text color */
.btn:hover{ color: inherit; }

/* Small utility */
.nf-error{ color: rgba(255,120,120,.98) !important; font-weight: 950; }


/* ===============================
   Create Wallet: obvious copy buttons + attention effects
=============================== */
.nf-copy-btn{
  border:2px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(230,237,243,.92);
  padding:8px 10px;
  border-radius: 12px !important;
  font-weight: 950;
  cursor:pointer;
  transition: transform .12s ease, filter .12s ease;
}
.nf-copy-btn:hover{ transform: translateY(-1px); filter: brightness(1.12); }

.nf-attn-mauve{
  border: 2px solid rgba(167,139,250,.55) !important;
  background: linear-gradient(90deg, rgba(167,139,250,.18), rgba(34,211,238,.14), rgba(167,139,250,.18)) !important;
  background-size: 220% 220% !important;
  animation: nfMauvePing 1.2s ease-in-out infinite;
  box-shadow: 0 0 28px rgba(167,139,250,.14);
}
@keyframes nfMauvePing{
  0%{ background-position:0% 50%; filter:brightness(1.02) saturate(1.05); }
  50%{ background-position:100% 50%; filter:brightness(1.22) saturate(1.25); }
  100%{ background-position:0% 50%; filter:brightness(1.02) saturate(1.05); }
}

.nf-connect-slot{
  display:flex;
  justify-content:center;
  align-items:center;
  margin:10px 0 12px;
}
.nf-connect-slot .btn{
  border:2px solid rgba(250,204,21,.55) !important;
  background: linear-gradient(90deg, rgba(250,204,21,.14), rgba(34,211,238,.12), rgba(250,204,21,.14)) !important;
  background-size: 240% 240% !important;
  animation: nfConnectBtnPulse 1.35s ease-in-out infinite;
  color: rgba(255,236,170,.98) !important;
}
@keyframes nfConnectBtnPulse{
  0%{ background-position:0% 50%; filter:brightness(1.05); }
  50%{ background-position:100% 50%; filter:brightness(1.20) saturate(1.15); }
  100%{ background-position:0% 50%; filter:brightness(1.05); }
}
.nf-connect-slot .btn:hover{
  filter: brightness(1.25) saturate(1.25) !important;
  color: rgba(255,236,170,.98) !important;
}


/* === SEND NF$ tweaks (v2) === */

/* Top row: flashy balance + Back to Home on same line */
.nf-top-row{
  display:flex;
  align-items:stretch;
  gap:12px;
  width:100%;
  margin: 0 0 12px;
}
.nf-top-row .back-home{ margin-bottom:0 !important; }

@media (max-width:720px){
  .nf-top-row{ flex-direction:column; }
}

/* Flashy new box (yellow/mauve) */
@keyframes nfTopBoxFlash{
  0%{ box-shadow:0 0 18px rgba(250,204,21,.35), 0 0 22px rgba(167,139,250,.25); filter: brightness(1.02); }
  50%{ box-shadow:0 0 44px rgba(250,204,21,.95), 0 0 52px rgba(167,139,250,.85); filter: brightness(1.18); }
  100%{ box-shadow:0 0 18px rgba(250,204,21,.35), 0 0 22px rgba(167,139,250,.25); filter: brightness(1.02); }
}
.nf-top-balance-box{
  /* smaller + pinned to the right */
  flex: 0 0 auto;
  margin-left: auto;
  width: 290px;
  max-width: 45vw;
  border-radius: 16px;
  /* pale mauve 2px */
  border: 2px solid rgba(167,139,250,.55);
  background: linear-gradient(180deg, rgba(34,211,238,.16), rgba(34,211,238,.06));
  padding: 12px 14px;
  /* base yellow backlight, flash handled conditionally in send-nf.html */
  box-shadow: 0 0 22px rgba(250,204,21,.24);
  animation: nfTopBoxFlash .85s ease-in-out infinite;
}
.nf-top-balance-box .t{ font-size: 12px; font-weight: 950; opacity:.9; }
.nf-top-balance-box .v{
  margin-top: 4px;
  font-weight: 950;
  font-size: 22px;
  color:#7df7ff;
  text-shadow: 0 0 18px rgba(34,211,238,.14);
  white-space: nowrap;
}

/* Sender Total Available: white, no flash */
.nf-available-box{
  border-color: rgba(255,255,255,.28) !important;
  background: rgba(255,255,255,.08) !important;
  box-shadow: 0 0 18px rgba(255,255,255,.10) !important;
}
.nf-available-box .v{
  color: rgba(255,255,255,.95) !important;
  text-shadow: 0 0 14px rgba(255,255,255,.10) !important;
}

/* Recipient input width to 2/3 */
.nf-recipient-23{ width:55%; }
@media (max-width:720px){ .nf-recipient-23{ width:100%; } }



/* Slightly bigger avatars */
#recvAvatar{
  width:170px !important;
  height:170px !important;
  max-width:170px !important;
}

/* Sender avatar larger */
#sendAvatar{
  width:320px !important;
  height:320px !important;
  max-width:320px !important;
}

/* Private key: strong blue/mauve flash while empty */
@keyframes nfPkBlueMauve{
  0%{
    box-shadow: 0 0 22px rgba(34,211,238,.25), 0 0 28px rgba(167,139,250,.22);
    border-color: rgba(34,211,238,.55);
    filter: brightness(1.05) saturate(1.10);
  }
  50%{
    box-shadow: 0 0 58px rgba(34,211,238,.85), 0 0 64px rgba(167,139,250,.85);
    border-color: rgba(167,139,250,.75);
    filter: brightness(1.25) saturate(1.35);
  }
  100%{
    box-shadow: 0 0 22px rgba(34,211,238,.25), 0 0 28px rgba(167,139,250,.22);
    border-color: rgba(34,211,238,.55);
    filter: brightness(1.05) saturate(1.10);
  }
}
#privateKeyInput:placeholder-shown{
  animation: nfPkBlueMauve .75s ease-in-out infinite !important;
}

/* Keep legacy lock flash off when typing starts */
#privateKeyInput:not(:placeholder-shown){
  animation: none !important;
}

@media (max-width: 768px) {
  #walletAddress {
    font-size: 12px;
  }

  .wallet-box-header {
    font-size: 14px;	
  }
}


@media (max-width: 480px) {
  #walletAddress {
    font-size: 10px;     /* ðŸ‘ˆ rÃ©duit fortement */
    line-height: 1.4;
  }

  .wallet-box-header {
    font-size: 14px;
    padding: 12px 14px;
  }
}






/* =========================================================
   MINI CLAIM COUNTER + LOCK (Claim / Quest buttons)
   - Does NOT change existing palette; uses icy-blue already in your theme
========================================================= */
.nf-claim-mini{
  margin: 0 0 2px 0; /* closer to button */
  padding: 0;        /* no extra pad */
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  line-height: 1.05;
  letter-spacing: .2px;
  color: rgba(186, 235, 255, .92); /* bleu givre */
  text-shadow: 0 0 10px rgba(120, 220, 255, .25);
  user-select: none;
}
.nf-claim-mini-label{
  opacity: .92;
  display:inline-block;
}
.nf-claim-mini-numwrap{
  margin-top: 0;
  opacity: .98;
  display:inline-block;
}
#nf-claim-mini-num{
  display:inline-block;
  padding: 0 2px;
  border-radius: 4px;
}

/* Flash once on every new block */
@keyframes nfMiniFlashOnce{
  0%{ filter: brightness(1.0); transform: scale(1); }
  45%{ filter: brightness(1.9); transform: scale(1.10); }
  100%{ filter: brightness(1.0); transform: scale(1); }
}
#nf-claim-mini-num.nf-mini-flash{
  animation: nfMiniFlashOnce .45s ease-out 1;
}

/* Locked (hashed) state for the 2 buttons */
.btn.nf-locked{
  position: relative;
  opacity: .65;
  filter: grayscale(.15);
}
.btn.nf-locked::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  pointer-events:none;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255,255,255,.10) 0px,
      rgba(255,255,255,.10) 6px,
      rgba(0,0,0,.10) 6px,
      rgba(0,0,0,.10) 12px
    );
  mix-blend-mode: overlay;
  opacity: .55;
}

/* 5s warning toast under the buttons row */
.nf-claim-toast{
  margin-top: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: rgba(255, 214, 40, .98); /* yellow warning */
  text-shadow: 0 0 12px rgba(255, 214, 40, .22);
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .18s ease, transform .18s ease;
  user-select: none;
  pointer-events: none;
}
.nf-claim-toast.show{
  opacity: 1;
  transform: translateY(0);
}


/* Strong red blink (one shot) for locked click feedback */
@keyframes nfClaimRedPulse{
  0%{ color: rgba(255, 60, 60, 1); text-shadow: 0 0 22px rgba(255,60,60,.95), 0 0 42px rgba(255,60,60,.55); filter: brightness(1.35); }
  60%{ color: rgba(255, 60, 60, 1); text-shadow: 0 0 26px rgba(255,60,60,1), 0 0 54px rgba(255,60,60,.75); filter: brightness(1.55); }
  100%{ color: rgba(255, 214, 40, .98); text-shadow: 0 0 12px rgba(255, 214, 40, .22); filter: brightness(1.0); }
}
.nf-claim-redpulse{
  animation: nfClaimRedPulse .38s ease-out 1;
}

/* Button red blink (one shot) */
@keyframes nfClaimBtnRedPulse{
  0%{ filter: brightness(1.0); box-shadow:none; }
  25%{ filter: brightness(1.7) saturate(1.35); box-shadow: 0 0 0 2px rgba(255,60,60,.55), 0 0 34px rgba(255,60,60,.55); }
  100%{ filter: brightness(1.0); box-shadow:none; }
}
.nf-claim-btn-redpulse{
  animation: nfClaimBtnRedPulse .32s ease-out 1;
}
