/* === STRUTTURA GENERALE === */
body {
  background-color: #121212;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  overflow: hidden; /* blocca lo scroll della pagina */
}

/* === LOGO "BUBBLE" FISSA === */
.logo-bubble {
  position: fixed;
  top: 10px;
  left: 15px;
  z-index: 100;
  transition: transform 0.3s ease;
}
.logo-bubble:hover { transform: scale(1.05); }
.logo-bubble img {
  height: 120px;
  width: auto;
  display: block;
}

/* === CONTENITORE PRINCIPALE === */
main {
  width: 340px;
  min-height: 400px;
  background: #2c2c2c;
  padding: 47px 47px 57px;
  border-radius: 17px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  text-align: center;
  animation: fade-in 0.8s ease;
}

/* === TITOLI === */
h2 {
  font-size: 1.4em;
  margin-bottom: 20px;
  font-weight: bold;
  background: -webkit-linear-gradient(#B563FF, #535EFC, #0EC8EE);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* === CAMPI DI INPUT === */
input[type="email"],
input[type="password"],
input[type="text"],
textarea {
  width: 100%;
  border: none;
  outline: none;
  border-radius: 100px;
  padding: 13px 18px;
  margin-top: 20px;
  background: #3c3c3c;
  color: #fff;
  font-size: 0.9em;
  animation: bounce-in 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
main input:nth-of-type(1) { animation-delay: 0s; }
main input:nth-of-type(2) { animation-delay: 0.1s; }

/* === PULSANTI === */
button {
  width: 100%;
  padding: 13px;
  margin-top: 40px;
  border-radius: 500px;
  border: none;
  outline: none;
  font-weight: 600;
  background: linear-gradient(144deg, #af40ff, #5b42f3 50%, #00ddeb);
  color: #fff;
  cursor: pointer;
  transition: background 0.4s ease;
}
button:hover {
  background: linear-gradient(144deg, #1e1e1e, #1e1e1e 50%, #1e1e1e);
}

/* === LINK E MESSAGGI === */
.link {
  color: #8ab4f8;
  cursor: pointer;
  display: block;
  margin-top: 10px;
  font-size: 0.9em;
}
.msg {
  margin-top: 15px;
  color: #ccc;
  font-size: 0.9em;
  white-space: pre-line;
}

/* === ANIMAZIONI === */
@keyframes bounce-in {
  0% { transform: translateY(-60px); opacity: 0; }
  60% { transform: translateY(10px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes fade-in {
  0% { opacity: 0; transform: scale(0.98); }
  100% { opacity: 1; transform: scale(1); }
}

/* === RESPONSIVITÀ === */
@media (max-width: 600px) {
  main {
    width: 80%;
    padding: 2.5em;
  }
  .logo-bubble {
    top: 15px;
    left: 15px;
    padding: 10px 15px;
    border-radius: 15px;
  }
  .logo-bubble img { height: 30px; }
  .logo-bubble h1 { font-size: 0.9em; }
}

/* ========================================================= */
/* === SEZIONE DASHBOARD (NUOVA) === */
/* ========================================================= */


/* === Modalità dashboard: il body può scrollare, niente centratura === */
body.dashboard-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100vh;       /* blocca a viewport */
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

/* Il contenitore <main> in dashboard non è una “bolla”: è trasparente e largo */
main.is-dashboard {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  width: 100%;
  max-width: 1100px;     /* larghezza comoda per le bubble */
  margin: 0 auto;        /* centrato orizzontalmente nello sfondo */
  text-align: left;      /* niente center-text globale */
}

/* Titolo dashboard coerente col gradiente già usato */
main.is-dashboard h2 {
  text-align: left;
  margin: 0 0 12px 5%;
  font-size: 1.6em;
  background: -webkit-linear-gradient(#B563FF, #535EFC, #0EC8EE);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Pulsante New Link sullo sfondo (non full width) */
main.is-dashboard .new-link-btn {
  display: inline-block;
  margin-left: 5%;
  margin-bottom: 28px;
  padding: 10px 22px;
  border: none;
  border-radius: 100px;
  font-weight: 600;
  background: linear-gradient(144deg, #af40ff, #5b42f3 50%, #00ddeb);
  color: #fff;
  cursor: pointer;
  transition: opacity .3s;
}
main.is-dashboard .new-link-btn:hover { opacity: .85; }

/* ====== LE TUE “BUBBLE ORIZZONTALI” ====== */

/* wrapper verticale delle due sezioni */
main.is-dashboard .dashboard {
  width: 100%;
}

/* rettangoloni orizzontali sullo sfondo scuro */
main.is-dashboard .bubble-wide {
  margin: 0 auto 34px auto;     /* spazio verticale fra le due bubble */
  background: #2c2c2c;
  border-radius: 17px;
  padding: 24px 30px;
  box-shadow: 0 0 20px rgba(0,0,0,.45);
  animation: fade-in .8s ease;
}

/* titolino dentro ciascuna bubble */
main.is-dashboard .bubble-wide h3 {
  margin: 0 0 14px 0;
  font-size: 1.15em;
  font-weight: 600;
  background: -webkit-linear-gradient(#B563FF, #535EFC, #0EC8EE);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Bubble: LISTA LINKS (scrollabile) ---- */
main.is-dashboard .links-bubble {
  margin-top: 40px;
  max-height: 380px;    /* spazio fisso come volevi */
  position: relative;
}
main.is-dashboard .links-bubble .scroll-container {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: clip;       /* <-- nasconde la scrollbar orizzontale */
  overscroll-behavior-x: none; /* <-- blocca la reazione del browser */
  padding: 8px
}
main.is-dashboard .links-bubble .scroll-container::-webkit-scrollbar { width: 6px; }
main.is-dashboard .links-bubble .scroll-container::-webkit-scrollbar-thumb {
  background: #555; border-radius: 10px;
}

/* === LINK CARD CON ANIMAZIONE LATERALE === */
main.is-dashboard .link-card {
  position: relative;
  background: #3a3a3a;
  border-radius: 14px;
  padding: 14px 20px;
  margin-bottom: 12px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.35s ease;
  display: flex;
  align-items: center;
}

main.is-dashboard .link-card:hover {
  background: #4a4a4a;
}

main.is-dashboard .link-card.selected {
  border: 2px solid #5b42f3;
  box-shadow: 0 0 12px rgba(91,66,243,0.6);
  margin-right: 120px; /* lascia spazio per i bottoni */
  overflow: visible;
  background: linear-gradient(to top right, rgba(0,0,0,0.6), rgba(0,0,0,0.4)); /* nero come i pulsanti */
  transition: background 0.4s ease, margin-right 0.35s ease, box-shadow 0.3s ease;
}

/* struttura a 3 colonne per allineamento perfetto */
main.is-dashboard .link-inner {
  display: grid;
  grid-template-columns: 1fr 120px 140px; /* testo | clicks | expiry */
  align-items: center;
  width: 100%;
  transition: transform 0.35s ease, width 0.35s ease;
}

/* blocco testo */
main.is-dashboard .link-text {
  overflow: hidden;
}

/* clicks in colonna fissa */
main.is-dashboard .clicks {
  text-align: right;
  min-width: 120px;
}

/* expiry in colonna fissa */
main.is-dashboard .expiry {
  text-align: right;
  min-width: 140px;
}

/* il contenuto interno diventa relativo (per ancorare il blocco destro) */
main.is-dashboard .link-inner {
  position: relative;
  width: 100%;
}

/* il testo a sinistra lascia spazio “interno” al blocco destro fisso */
main.is-dashboard .link-text {
  overflow: hidden;
  padding-right: 280px; /* 260 di blocco destro + 20 di aria */
}

/* BLOCCO DESTRO ANCORATO AL BORDO DELLA CARD */
main.is-dashboard .link-info {
  position: absolute;
  right: 16px;             /* distanza dal bordo della card (resta identica) */
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  grid-template-columns: 120px 140px;  /* clicks | expiry */
  column-gap: 24px;
  width: 260px;            /* fisso -> colonne perfettamente incolonnate */
  text-align: right;
}

/* --- Contenuti testuali --- */
main.is-dashboard .link-text {
  flex: 1;
  overflow: hidden;
}
main.is-dashboard .link-text .short {
  font-weight: 700;
  font-size: 1.1em;
  color: #00ddeb;
}






/* === INLINE COPY BUTTON accanto al link short (fix completo) === */
.short-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
  margin-bottom: 2px;
}

.short-row .short {
  color: #00ddeb;
  font-weight: 700;
  font-size: 1.05em;
}

/* === Bottone copia accanto al link corto === */
.copy-inline {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #bcd3ff;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  margin: 0;
  margin-top: 0.2px;
}

.copy-inline:hover {
  background: rgba(0, 221, 235, 0.15);
  color: #00ddeb;
  transform: scale(1.04);
}

/* SVG icons inside */
.copy-inline svg {
  position: absolute;
  width: 14px;
  height: 14px;
  color: inherit;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

/* Default states */
.copy-inline .checkmark {
  opacity: 0;
  transform: scale(0.8);
}
.copy-inline .clipboard {
  opacity: 1;
  transform: scale(1);
}

/* Stati default */
.copy-inline svg {
  position: absolute;
  width: 14px;
  height: 14px;
  color: inherit;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.copy-inline .clipboard { opacity: 1; transform: scale(1); }
.copy-inline .checkmark { opacity: 0; transform: scale(0.8); }

/* Quando è copiato */
.copy-inline.copied .clipboard { opacity: 0; transform: scale(0.8); }
.copy-inline.copied .checkmark { opacity: 1; transform: scale(1); }














main.is-dashboard .link-text .original {
  font-size: 0.85em;
  color: #bbb;
  margin-top: 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Clicks e Data allineati a destra --- */
main.is-dashboard .link-info {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 40px;
  min-width: 250px;
}
main.is-dashboard .clicks,
main.is-dashboard .expiry {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
main.is-dashboard .clicks .count {
  font-size: 1.5em;
  font-weight: 700;
  color: #B563FF;
}
main.is-dashboard .clicks .label,
main.is-dashboard .expiry .label {
  font-size: 0.75em;
  color: #aaa;
}
main.is-dashboard .expiry .date {
  color: #00ddeb;
  font-weight: 600;
  font-size: 1em;
}

/* --- Bottoni laterali (compaiono sulla destra) --- */
main.is-dashboard .link-actions {
  position: absolute;
  right: -115px; /* spostati fuori dalla card */
  top: 50%;
  transform: translateY(-72%);
  display: flex;
  flex-direction: row; /* ORIZZONTALE */
  gap: 10px;
}

/* === Pulsanti QR e DELETE (stile glass con scia colorata + bounce) === */
main.is-dashboard .circle-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  background: linear-gradient(to top right, rgba(0,0,0,0.6), rgba(0,0,0,0.4));
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform: scale(0);
  opacity: 0;
  animation: bounce-in 0.5s forwards; /* mantiene animazione d'entrata */
  transition: all 0.3s ease-out;
}

/* --- effetto scia luminosa base --- */
main.is-dashboard .circle-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.12), transparent);
  transform: translateX(-100%);
  transition: transform 0.7s ease-out;
}
main.is-dashboard .circle-btn:hover::before {
  transform: translateX(100%);
}

/* --- Hover generale (tilt + zoom) --- */
main.is-dashboard .circle-btn:hover {
  transform: scale(1.1) rotate(3deg);
  border-color: rgba(255,255,255,0.3);
  box-shadow: 0 0 18px rgba(255,255,255,0.25);
}

/* --- Pulsante QR (azzurro) --- */
main.is-dashboard .circle-btn.qr {
  border-color: rgba(0, 180, 255, 0.25);
}
main.is-dashboard .circle-btn.qr::before {
  background: linear-gradient(to right, transparent, rgba(0,180,255,0.25), transparent);
}
main.is-dashboard .circle-btn.qr:hover {
  box-shadow: 0 0 25px rgba(0,180,255,0.4);
  transform: scale(1.12) rotate(-3deg);
}

/* --- Pulsante DELETE (rosso) --- */
main.is-dashboard .circle-btn.delete {
  border-color: rgba(255, 60, 60, 0.25);
}
main.is-dashboard .circle-btn.delete::before {
  background: linear-gradient(to right, transparent, rgba(255,60,60,0.25), transparent);
}
main.is-dashboard .circle-btn.delete:hover {
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.45);
  background: linear-gradient(to top right, rgba(60,0,0,0.8), rgba(0,0,0,0.5));
  transform: scale(1.12) rotate(3deg);
}


main.is-dashboard .circle-btn.clip {
  width: 70px;
  height: 70px;
  border-width: 2px;
}

main.is-dashboard .circle-btn.clip img {
  width: 32px;
  height: 32px;
}



/* --- Icone interne --- */
main.is-dashboard .circle-btn img {
  width: 22px;
  height: 22px;
  position: relative;
  z-index: 2;
  transition: transform 0.25s ease, filter 0.25s ease;
}
main.is-dashboard .circle-btn:hover img {
  transform: scale(1.15);
  filter: brightness(1.1);
}

/* --- Animazione bounce-in (già presente ma riaffermata) --- */
@keyframes bounce-in {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}


/* ---- Bubble: ANALYTICS ---- */
main.is-dashboard .stats-bubble { text-align: center; margin-top: 40px;}
main.is-dashboard .period-buttons {
  display: flex; justify-content: center; gap: 10px; margin: 6px 0 16px 0;
}
main.is-dashboard .period-buttons button {
  padding: 8px 16px; border: none; border-radius: 50px; background: #3c3c3c; color: #fff; cursor: pointer; font-size: .85em;
}
main.is-dashboard .period-buttons button.active {
  background: linear-gradient(144deg, #af40ff, #5b42f3 50%, #00ddeb);
}

/* Logout sullo sfondo (non full width) */
main.is-dashboard .logout-btn {
  background: #444; padding: 10px 22px; border-radius: 100px; color: #fff; border: none; cursor: pointer;
}
main.is-dashboard .logout-btn:hover { opacity: .8; }

/* responsive */
@media (max-width: 900px) {
  main.is-dashboard { padding: 28px 14px 60px; }
  main.is-dashboard h2, main.is-dashboard .new-link-btn, main.is-dashboard .logout-btn { margin-left: 2.5%; }
}

/* === ANIMAZIONE DISSOLVENZA PER RIMOZIONE CARD === */
.fade-enter-active,
.fade-leave-active {
  transition: all 0.35s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
  transform: scale(0.97);
  filter: blur(2px);
}

/* opzionale: piccola animazione di “contrazione verticale” */
.fade-leave-active {
  transition: all 0.2s cubic-bezier(0.45, 0, 0.55, 1.2);
}
.fade-leave-to {
  opacity: 0;
  transform: scale(0.9) translateY(10px);
  height: 0;
  margin: 0;
  padding: 0;
}

/* === ANIMAZIONE FADE PER ANALYTICS === */
.analytics-fade-enter-active,
.analytics-fade-leave-active {
  transition: all 0.22s cubic-bezier(0.45, 0, 0.55, 1);
}

.analytics-fade-enter-from,
.analytics-fade-leave-to {
  opacity: 0;
  transform: translateY(25px) scale(0.97);
  filter: blur(2px);
}

.analytics-fade-enter-to,
.analytics-fade-leave-from {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

















/* === FIX FINALE DASHBOARD (centro perfetto + dimensioni corrette) === */

main.is-dashboard {
  width: 100%;
  max-width: 1600px; /* limite massimo, per evitare stretching */
  margin: 0 auto;
  padding: 40px 40px 80px;
  box-sizing: border-box;
  background: transparent;
}

/* centra titolo e pulsanti sopra */
main.is-dashboard h2,
main.is-dashboard .new-link-btn,
main.is-dashboard .logout-btn {
  margin-left: 0 !important;
  text-align: center;
  width: 100%;
}

/* le due bubble accanto (links + analytics) */
.dashboard-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 30px;       /* spazio centrale tra le due bubble */
  width: 100%;            /* occupa tutta la larghezza di main */
  margin: 0 auto;         /* centrata orizzontalmente */
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
}

/* evita che le bubble sforino o si allarghino troppo */
main.is-dashboard {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 40px 5% 80px;   /* 5% sinistra e destra → margini equilibrati */
  box-sizing: border-box;
  background: transparent;
}

/* blocca la crescita infinita dell'analytics */
main.is-dashboard .side-analytics {
  height: auto !important;
  max-height: none !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

main.is-dashboard .side-analytics canvas {
  width: 100% !important;
  height: 320px !important; /* altezza stabile del grafico */
}

/* versione mobile */
@media (max-width: 1100px) {
  .dashboard-columns {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

























/* === BASE PULSANTE NEW LINK / CANCEL === */
.plus-button {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .5em;
  cursor: pointer;
  border: none;
  border-radius: 100px;
  padding: 1em 1.4em;
  max-width: 180px;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;

  /* Variabili dinamiche */
  --hue: 250;     /* tono blu-viola */
  --sat: 100%;
  --light: 65%;
  --active: 0;
  --transition: 0.45s cubic-bezier(0.25, 1, 0.5, 1);

  /* Gradiente base */
  --bg: linear-gradient(
      144deg,
      hsl(var(--hue) calc(100% - var(--active) * 25%) calc(var(--light) - var(--active) * 10%)),
      hsl(250 calc(95% - var(--active) * 15%) calc(var(--light) - var(--active) * 10%)) 50%,
      hsl(185 calc(95% - var(--active) * 20%) calc(var(--light) - var(--active) * 10%))
  );

  background: var(--bg);
  box-shadow:
    0 0 calc(var(--active) * 3em) calc(var(--active) * 1em) hsl(var(--hue) 100% 65% / 0.7),
    0 0 0 0 hsl(var(--hue) calc(var(--active) * 100%) calc((var(--active) * 50%) + 30%)) inset,
    0 -0.05em 0 0 hsl(var(--hue) calc(var(--active) * 100%) calc(var(--active) * 60%)) inset;

  scale: calc(1 + (var(--active) * 0.07));
  transition:
    background var(--transition),
    box-shadow var(--transition),
    scale var(--transition);
}

/* Effetto glow quando hover o focus */
@supports(selector(:has(:is(+ *)))) {
  body:has(.plus-button:is(:hover, :focus-visible)) {
    --active: 1;
  }
}

/* Fallback hover */
.plus-button:is(:hover, :focus-visible) {
  --active: 1;
}

/* Effetto click */
.plus-button:active {
  scale: 0.98;
  transition: scale 0.2s ease;
}

/* Bagliore esterno */
.plus-button::before {
  content: "";
  position: absolute;
  inset: -0.2em;
  border-radius: 100px;
  border: 0.25em solid hsl(var(--hue) 97% 60% / 0.4);
  opacity: var(--active, 0);
  transition: opacity .4s ease;
}

/* Simbolo + / × */
.plus-icon {
  font-size: 1.6em;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Rotazione in hover */
.plus-button:hover .plus-icon {
  transform: rotate(90deg) scale(1.08);
}

/* === VARIANTE ROSSA (× CANCEL) === */
.plus-button.cancel {
  --hue: 0;      /* tono rosso */
  --sat: 100%;
  --light: 60%;

  --bg: linear-gradient(
      144deg,
      hsl(var(--hue) calc(100% - var(--active) * 25%) calc(var(--light) - var(--active) * 10%)),
      hsl(350 calc(95% - var(--active) * 15%) calc(var(--light) - var(--active) * 10%)) 50%,
      hsl(15 calc(95% - var(--active) * 20%) calc(var(--light) - var(--active) * 10%))
  );

  background: var(--bg);
}

/* Hover scuro + glow coerente (usa var(--hue)) */
.plus-button.cancel:hover,
.plus-button:not(.cancel):hover {
  background: linear-gradient(144deg, #1e1e1e, #1e1e1e 50%, #1e1e1e);
  box-shadow:
    0 0 calc(var(--active) * 3em) calc(var(--active) * 1em) hsl(var(--hue) 100% 65% / 0.7),
    0 0 0 0 hsl(var(--hue) calc(var(--active) * 100%) calc((var(--active) * 50%) + 30%)) inset,
    0 -0.05em 0 0 hsl(var(--hue) calc(var(--active) * 100%) calc(var(--active) * 60%)) inset;
}

/* Bordo luminoso coerente con il tono */
.plus-button.cancel::before,
.plus-button:not(.cancel)::before {
  border: 0.25em solid hsl(var(--hue) 97% 60% / 0.4);
}





/* === animazione comparsa search === */
.search-wrapper {
  position: relative;
  transform: translate(0%, 28%);
}


.button-grid-container {
  display: flex;
  align-items: flex-end;
  gap: 45px; /* distanza fra Cancel e grid */
}

.white,
.border,
.darkBorderBg,
.glow {
  max-height: 70px;
  max-width: 314px;
  height: 100%;
  width: 100%;
  position: absolute;
  overflow: hidden;
  z-index: -1;
  /* Border Radius */
  border-radius: 12px;
  filter: blur(3px);
}
.input {
  /* padding:7px; */
  width: 301px;
  height: 56px;
  border-radius: 10px;
  color: white;
  padding-inline: 59px;
  font-size: 18px;
  animation: none !important;
}
#poda {
  display: flex;
  align-items: center;
  justify-content: center;
}
.input::placeholder {
  color: #c0b9c0;
}

.input:focus {
  outline: none;
}

#main:focus-within > #input-mask {
  display: none;
}

#input-mask {
  pointer-events: none;
  width: 100px;
  height: 20px;
  position: absolute;
  background: linear-gradient(90deg, transparent, #ffffff);
  top: 18px;
  left: 70px;
}
#pink-mask {
  pointer-events: none;
  width: 30px;
  height: 20px;
  position: absolute;
  background: #cf30aa;
  top: 10px;
  left: 5px;
  filter: blur(20px);
  opacity: 0.8;
  // animation: leftright 4s ease-in infinite;
  transition: all 2s;
}

#main:hover > #pink-mask {
  //animation: rotate 4s linear infinite;
  opacity: 0;
}

.white {
  max-height: 63px;
  max-width: 307px;
  border-radius: 10px;
  filter: blur(2px);
}

.white::before {
  content: "";
  z-index: -2;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(83deg);
  position: absolute;
  width: 600px;
  height: 600px;
  background-repeat: no-repeat;
  background-position: 0 0;
  filter: brightness(1.4);
  background-image: conic-gradient(
    rgba(0, 0, 0, 0) 0%,
    #a099d8,
    rgba(0, 0, 0, 0) 8%,
    rgba(0, 0, 0, 0) 50%,
    #dfa2da,
    rgba(0, 0, 0, 0) 58%
  );
  //  animation: rotate 4s linear infinite;
  transition: all 2s;
}
.border {
  max-height: 59px;
  max-width: 303px;
  border-radius: 11px;
  filter: blur(0.5px);
}
.border::before {
  content: "";
  z-index: -2;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(70deg);
  position: absolute;
  width: 600px;
  height: 600px;
  filter: brightness(1.3);
  background-repeat: no-repeat;
  background-position: 0 0;
  background-image: conic-gradient(
    #1c191c,
    #402fb5 5%,
    #1c191c 14%,
    #1c191c 50%,
    #cf30aa 60%,
    #1c191c 64%
  );
  // animation: rotate 4s 0.1s linear infinite;
  transition: all 2s;
}
.darkBorderBg {
  max-height: 65px;
  max-width: 312px;
}
.darkBorderBg::before {
  content: "";
  z-index: -2;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(82deg);
  position: absolute;
  width: 600px;
  height: 600px;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-image: conic-gradient(
    rgba(0, 0, 0, 0),
    #18116a,
    rgba(0, 0, 0, 0) 10%,
    rgba(0, 0, 0, 0) 50%,
    #6e1b60,
    rgba(0, 0, 0, 0) 60%
  );
  transition: all 2s;
}
#poda:hover > .darkBorderBg::before {
  transform: translate(-50%, -50%) rotate(262deg);
}
#poda:hover > .glow::before {
  transform: translate(-50%, -50%) rotate(240deg);
}
#poda:hover > .white::before {
  transform: translate(-50%, -50%) rotate(263deg);
}
#poda:hover > .border::before {
  transform: translate(-50%, -50%) rotate(250deg);
}

#poda:hover > .darkBorderBg::before {
  transform: translate(-50%, -50%) rotate(-98deg);
}
#poda:hover > .glow::before {
  transform: translate(-50%, -50%) rotate(-120deg);
}
#poda:hover > .white::before {
  transform: translate(-50%, -50%) rotate(-97deg);
}
#poda:hover > .border::before {
  transform: translate(-50%, -50%) rotate(-110deg);
}

#poda:focus-within > .darkBorderBg::before {
  transform: translate(-50%, -50%) rotate(442deg);
  transition: all 4s;
}
#poda:focus-within > .glow::before {
  transform: translate(-50%, -50%) rotate(420deg);
  transition: all 4s;
}
#poda:focus-within > .white::before {
  transform: translate(-50%, -50%) rotate(443deg);
  transition: all 4s;
}
#poda:focus-within > .border::before {
  transform: translate(-50%, -50%) rotate(430deg);
  transition: all 4s;
}

.glow {
  overflow: hidden;
  filter: blur(30px);
  opacity: 0.4;
  max-height: 130px;
  max-width: 354px;
}
.glow:before {
  content: "";
  z-index: -2;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(60deg);
  position: absolute;
  width: 999px;
  height: 999px;
  background-repeat: no-repeat;
  background-position: 0 0;
  /*border color, change middle color*/
  background-image: conic-gradient(
    #000,
    #402fb5 5%,
    #000 38%,
    #000 50%,
    #cf30aa 60%,
    #000 87%
  );
  /* change speed here */
  animation: rotate 4s 0.3s linear infinite;
  transition: all 2s;
}

@keyframes rotate {
  100% {
    transform: translate(-50%, -50%) rotate(450deg);
  }
}
@keyframes leftright {
  0% {
    transform: translate(0px, 0px);
    opacity: 1;
  }

  49% {
    transform: translate(250px, 0px);
    opacity: 0;
  }
  80% {
    transform: translate(-40px, 0px);
    opacity: 0;
  }

  100% {
    transform: translate(0px, 0px);
    opacity: 1;
  }
}


#new-link-form {
  position: absolute;
  transform: translate(-50%, -61%);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

#new-link-form .input {
  width: var(--box-w);
  height: var(--box-h);
  border-radius: 10px;
  background: #010201;
  color: white;
  font-size: 17px;
  text-align: left;  
  padding-left: 18px;   /* 👈 margine interno a sinistra */
  box-sizing: border-box; /* evita di alterare la dimensione totale */
}

/* === Dimensioni uniche del box glow === */
#poda {
  --box-w: 600px;
  --box-h: 70px;
  --box-r: 12px;

  position: relative;
  width: var(--box-w);
  height: var(--box-h);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tutti i layer del glow prendono ESATTAMENTE la stessa misura */
.white,
.border,
.darkBorderBg,
.glow {
  position: absolute;
  inset: 0;                    /* = top/right/bottom/left: 0 */
  width: var(--box-w);
  height: var(--box-h);
  max-width: none;
  max-height: none;
  border-radius: var(--box-r);
  z-index: 1;                  /* sotto l’input che mettiamo a 2 */
  filter: blur(3px);
}












/* === FORM SECTION SOTTO IL BOX DI INPUT === */

.form-section {
  display: flex;
  justify-content: center; /* centra orizzontalmente */
  align-items: flex-start;
  gap: 40px; /* spazio fra Personalized Code e Expiring Date */
  margin-top: 40px; /* distanza dal box Enter your link */
}


.form-control {
  position: relative;
  transform: translateY(-20px); /* fine tuning */
  width: 190px;
  z-index: 1;
}

.form-control input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 2px solid #fff;
  border-radius: 0;
  font-size: 18px;
  color: #fff;
  padding: 5px 0;
  animation: none;
  transition: border-color .3s;
}

.form-control input:focus {
  outline: none;
  border-bottom-color: lightblue;
}

.form-control label {
  position: absolute;
  top: 15px;
  left: 0;
  pointer-events: none;
}

.form-control label span {
  display: inline-block;
  font-size: 17px;
  min-width: 5px;
  color: #fff;
  opacity: .6;
  transform: translateY(0);
  transition: transform .3s cubic-bezier(.68,-.55,.265,1.55), color .3s, opacity .3s;
}

.form-control input:focus + label span,
.form-control input:not(:placeholder-shown) + label span {
  color: lightblue;
  transform: translateY(-15px);
  opacity: 1;
}

.form-control input::placeholder {
  color: transparent;
  transition: color .25s ease;            /* uscita rapida (blur) */
}

.form-control input:focus::placeholder {
  color: #aaa;
  transition: color 2s ease .7s;           /* durata 2s + 1s di delay */
}


/* === ENTRATA DA SINISTRA FLUIDA === */
@keyframes slide-from-left {
  0% {
    opacity: 0;
    transform: translateX(-70px);
  }
  60% {
    opacity: 1;
    transform: translateX(8px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* stato iniziale */
.button-grid-container > *:not(.plus-button) {
  opacity: 0;
  transform: translateX(-60px);
}

/* animazione di ingresso */
.button-grid-container.new-active > *:not(.plus-button) {
  animation: slide-from-left 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* piccoli ritardi progressivi */
.button-grid-container.new-active .search-wrapper { animation-delay: 0s; }
.button-grid-container.new-active .form-section   { animation-delay: .08s; }
.button-grid-container.new-active .circle-btn.clip { animation-delay: .16s; }


/* === USCITA FLUIDA VERSO SINISTRA === */
@keyframes slide-to-left {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  80% {
    opacity: 1;
    transform: translateX(-25px);
  }
  100% {
    opacity: 0;
    transform: translateX(-60px);
  }
}

/* animazione di uscita */
.button-grid-container.closing > *:not(.plus-button) {
  animation: slide-to-left 0.5s cubic-bezier(0.55, 0, 0.45, 1) forwards;
  opacity: 1;
  transform: translateX(0);
}

/* ritardi coerenti */
.button-grid-container.closing .form-section   { animation-delay: .02s; }
.button-grid-container.closing .circle-btn.clip { animation-delay: .10s; }
.button-grid-container.new-active .circle-btn.clip { animation-delay: .18s; }
