@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Cormorant+Garamond:wght@500;600;700&display=swap");

:root {
  --bg-main: #050816;
  --font-display: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --font-body: "Cormorant Garamond", "Times New Roman", serif;
  --accent-blue: #29abe2;
  --accent-green: #4ade80;
  --accent-orange: #ffb347;
  --accent-burn: #ff4b6b;
  --metal-dark: #222738;
  --metal-mid: #434a63;
  --metal-light: #aab3d8;
  --glass-highlight: rgba(255, 255, 255, 0.6);
  --text-soft: #c8d2ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #202a4f 0, #050816 55%, #02030a 100%);
  font-family: var(--font-body);
  color: #f9f9ff;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 32px 16px;
}

.hub-root {
  width: 1200px;
  max-width: 100%;
  margin: 0 auto;
}

/* Header -------------------------------------------------- */

.hub-header {
  text-align: center;
  margin-bottom: 24px;
}

.hub-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fdfcff;
  margin-bottom: 10px;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.hub-subtitle {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  opacity: 0.95;
}

/* Pannello centrale ---------------------------------------- */

.hub-panel {
  position: relative;
  margin-top: 24px;
  padding: 44px 54px 38px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 0, rgba(58, 119, 255, 0.25), transparent 55%),
    radial-gradient(circle at 80% 0, rgba(255, 140, 80, 0.22), transparent 55%),
    linear-gradient(145deg, #050818, #050818 25%, #060b18 60%, #040516);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  overflow: visible;
}

/* Griglia macchine ---------------------------------------- */

.machines-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 88px;
  align-items: flex-end;
  position: relative;
  padding: 30px 10px 0;
}

.machine {
  position: relative;
  height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: visible;
}

.machine-header {
  position: absolute;
  top: -30px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  opacity: 0.95;
}

.machine-header span {
  display: block;
  margin-top: 4px;
  font-size: 0.7rem;
  opacity: 0.75;
}

.machine-base {
  position: relative;
  width: 230px;
  height: 60px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--metal-mid), #141722);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.9),
    inset 0 2px 3px rgba(255, 255, 255, 0.2),
    inset 0 -4px 6px rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
}

.machine-base::before {
  content: "";
  position: absolute;
  inset: 6px 26px;
  border-radius: 16px;
  background: linear-gradient(180deg, #252c42, #101321);
}

.base-label {
  appearance: none;
  border: none;
  background: transparent;
  position: relative;
  z-index: 1;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #e2e7ff;
  opacity: 0.9;
  cursor: default;
  pointer-events: none;
  padding: 6px 10px;
}

.base-label:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

.machine-tank {
  position: absolute;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%);
  width: 180px;
  height: 260px;
  border-radius: 90px;
  background: linear-gradient(180deg, #111829, #060915);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.85),
    0 0 0 3px rgba(255, 255, 255, 0.08),
    inset 0 0 0 2px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  z-index: 1;
}

.machine-tank-inner {
  position: absolute;
  inset: 16px;
  border-radius: 80px;
  background:
    radial-gradient(circle at 30% 0, rgba(255, 255, 255, 0.45), transparent 55%),
    linear-gradient(180deg, rgba(90, 240, 255, 0.08), rgba(0, 130, 255, 0.08));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 0 34px rgba(0, 204, 255, 0.18);
}

.machine-liquid {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 6%;
  width: 86%;
  height: 34%;
  border-radius: 36px 36px 28px 28px;
  background: radial-gradient(circle at 50% 0, var(--glass-highlight), transparent 55%),
    linear-gradient(180deg, rgba(0, 190, 255, 0.94), rgba(0, 95, 155, 0.98));
  box-shadow:
    0 -6px 14px rgba(255, 255, 255, 0.32),
    0 10px 20px rgba(0, 0, 0, 0.85);
}

.machine-liquid--green {
  background: radial-gradient(circle at 50% 0, var(--glass-highlight), transparent 55%),
    linear-gradient(180deg, rgba(138, 255, 200, 0.9), rgba(0, 170, 105, 0.98));
}

/* sinistra: cupola un po' più aperta */
.machine-left .machine-tank {
  border-radius: 90px 90px 44px 44px;
  z-index: 10;
}
.machine-left .machine-tank-inner {
  border-radius: 82px 82px 38px 38px;
}

/* bocca di ingresso per lo swap (buco) */
.machine-left .swap-mouth {
  position: absolute;
  left: 50%;
  top: -8px;
  transform: translateX(-50%);
  width: 86px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 0, rgba(255,255,255,0.3), transparent 60%),
    linear-gradient(180deg, #191e2a, #050811);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.85),
    inset 0 2px 3px rgba(255,255,255,0.35),
    inset 0 -2px 4px rgba(0,0,0,0.9);
  z-index: 6;
}

/* centro: completamente giallo + glow + badge BTC -------- */

.machine-center .machine-tank {
  border-radius: 52px 52px 18px 18px;
  background: radial-gradient(120% 90% at 50% 10%, rgba(255, 255, 255, 0.45), transparent 55%),
    linear-gradient(180deg, #fce5a0, #e8b04d 58%, #b47321 100%);
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.9),
    0 0 0 4px rgba(255, 255, 255, 0.15),
    0 0 36px rgba(255, 210, 90, 0.8);
  animation: vaultGlow 2.4s ease-in-out infinite alternate;
}

.machine-center .machine-tank-inner {
  inset: 18px;
  border-radius: 42px 42px 12px 12px;
  background:
    radial-gradient(circle at 30% 0, rgba(255, 255, 255, 0.85), transparent 55%),
    linear-gradient(180deg, rgba(255, 235, 170, 0.86), rgba(255, 185, 35, 0.95));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.38),
    inset 0 0 40px rgba(255, 215, 120, 0.9);
}

.machine-center .vault-details-trigger {
  color: #0c0c0c;
  border-color: rgba(0, 0, 0, 0.25);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.16));
}

.machine-right .machine-tank {
  border-radius: 90px 90px 44px 44px;
}
.machine-right .machine-tank-inner {
  border-radius: 80px 80px 36px 36px;
}

@keyframes vaultGlow {
  0% { box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.9),
        0 0 0 4px rgba(255, 255, 255, 0.15),
        0 0 20px rgba(255, 210, 90, 0.65); }
  100% { box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.9),
        0 0 0 4px rgba(255, 255, 255, 0.25),
        0 0 46px rgba(255, 230, 140, 1); }
}

.vault-btc-badge {
  position: absolute;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-image: url("../img/tbtc.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow:
    0 0 18px rgba(255, 205, 110, 0.9),
    0 8px 16px rgba(0, 0, 0, 0.85),
    0 0 32px rgba(255, 210, 80, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: transparent;
  text-indent: -9999px;
  font-weight: 700;
}

.vault-emblem {
  position: absolute;
  left: 50%;
  top: 32px;
  transform: translateX(-50%);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background-image: url("../img/tbtc.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow:
    0 0 0 2px rgba(184, 90, 0, 0.9),
    0 0 18px rgba(0, 0, 0, 0.28),
    0 0 28px rgba(184, 90, 0, 0.65);
  border: 2px solid rgba(120, 50, 0, 0.9);
  overflow: visible;
  z-index: 3;
  animation: emblemFlash 2.2s ease-in-out infinite;
}

.vault-emblem::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  box-shadow:
    0 0 22px rgba(184, 90, 0, 0.85),
    0 0 36px rgba(140, 60, 0, 0.55);
  animation: vaultEmblemGlow 1.8s ease-in-out infinite;
  pointer-events: none;
}

.vault-emblem-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid rgba(184, 90, 0, 0.9);
  box-shadow:
    0 0 16px rgba(184, 90, 0, 0.65),
    0 0 26px rgba(140, 60, 0, 0.4);
  animation: vaultEmblemPulse 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes vaultEmblemPulse {
  0%   { transform: scale(0.94); opacity: 0.7;  box-shadow: 0 0 16px rgba(184, 90, 0, 0.5), 0 0 26px rgba(120, 50, 0, 0.3); }
  50%  { transform: scale(1.06); opacity: 1;    box-shadow: 0 0 22px rgba(230, 120, 20, 0.95), 0 0 38px rgba(184, 90, 0, 0.6); }
  100% { transform: scale(0.97); opacity: 0.8;  box-shadow: 0 0 16px rgba(184, 90, 0, 0.5), 0 0 26px rgba(120, 50, 0, 0.3); }
}

@keyframes vaultEmblemGlow {
  0%   { transform: scale(0.96); opacity: 0.7; }
  50%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(0.98); opacity: 0.8; }
}

@keyframes emblemFlash {
  0%   { box-shadow:
          0 0 14px rgba(230, 120, 20, 0.85),
          0 0 0 2px rgba(184, 90, 0, 0.9),
          0 0 24px rgba(184, 90, 0, 0.55); }
  50%  { box-shadow:
          0 0 22px rgba(255, 150, 40, 1),
          0 0 0 2px rgba(220, 110, 10, 0.95),
          0 0 40px rgba(184, 90, 0, 0.8); }
  100% { box-shadow:
          0 0 16px rgba(230, 120, 20, 0.85),
          0 0 0 2px rgba(184, 90, 0, 0.9),
          0 0 30px rgba(184, 90, 0, 0.6); }
}

@keyframes vaultStatPulse {
  0%   { text-shadow:
          0 2px 0 rgba(255, 255, 255, 0.35),
          0 0 8px rgba(255, 180, 60, 0.35); }
  50%  { text-shadow:
          0 3px 0 rgba(255, 255, 255, 0.5),
          0 0 16px rgba(255, 200, 80, 0.7); }
  100% { text-shadow:
          0 2px 0 rgba(255, 255, 255, 0.35),
          0 0 12px rgba(255, 180, 60, 0.5); }
}

@keyframes vaultValueGlow {
  0%   { text-shadow:
          0 2px 0 rgba(255, 255, 255, 0.46),
          0 0 18px rgba(184, 90, 0, 0.8),
          0 0 32px rgba(184, 90, 0, 0.65); }
  50%  { text-shadow:
          0 3px 0 rgba(255, 255, 255, 0.54),
          0 0 29px rgba(184, 90, 0, 1),
          0 0 47px rgba(220, 120, 20, 0.85); }
  100% { text-shadow:
          0 2px 0 rgba(255, 255, 255, 0.46),
          0 0 21px rgba(184, 90, 0, 0.82),
          0 0 36px rgba(184, 90, 0, 0.68); }
}

.vault-stats {
  position: absolute;
  left: 50%;
  top: 18px;
  bottom: 32px;
  transform: translateX(-50%);
  width: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  border: none;
  box-shadow: none;
  text-align: center;
  color: #0a0a0a;
  z-index: 4;
}

.vault-stat {
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 14px;
  font-size: 0.9rem;
  margin-bottom: 2px;
  color: #1c0f04;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 8px rgba(255, 180, 60, 0.4);
}

.vault-stat-label {
  display: inline-block;
  color: inherit;
  font-weight: 700;
}

.vault-stat strong {
  font-size: 1.26rem;
  color: #120800;
  font-weight: 800;
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.4),
    0 0 16px rgba(184, 90, 0, 0.85),
    0 0 28px rgba(184, 90, 0, 0.65);
  animation: vaultValueGlow 2.3s ease-in-out infinite;
}

.vault-details-trigger {
  margin: 10px auto 0;
  width: 132px;
  padding: 9px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease, outline 0.1s ease;
  outline: none;
}

.vault-details-trigger:focus-visible {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.25),
    0 0 18px rgba(255, 220, 120, 0.55);
}

.vault-details-trigger:active {
  transform: translateY(1px);
  box-shadow: 0 0 10px rgba(255, 220, 120, 0.38);
}

.swap-stats {
  position: absolute;
  left: 50%;
  top: 18px;
  bottom: 32px;
  transform: translateX(-50%);
  width: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  background: transparent;
  border-radius: 0;
  border: none;
  box-shadow: none;
  padding: 0;
  text-align: center;
  color: #111;
  z-index: 16;
}

.burn-stats {
  position: absolute;
  left: 50%;
  top: 18px;
  bottom: 32px;
  transform: translateX(-50%);
  width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  z-index: 18;
}

  .burn-metrics {
    width: 100%;
    padding: 0 4px;
    display: flex;
    flex-direction: column;
  align-items: center;
  gap: 6px;
}

  .burn-metrics .vault-stat {
    color: #fefefe;
    font-size: 0.88rem;
    margin-bottom: 0;
    column-gap: 14px;
  width: 100%;
  max-width: 200px;
  justify-content: center;
  text-align: center;
  letter-spacing: 0.03em;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.4),
    0 0 10px rgba(255, 200, 180, 0.4);
}

  .burn-metrics .vault-stat strong {
    color: #fffaf3;
    font-size: 1rem;
    font-weight: 800;
    text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.35),
    0 0 14px rgba(255, 180, 140, 0.7),
    0 0 22px rgba(255, 150, 100, 0.6);
  animation: burnValueGlow 2.5s ease-in-out infinite;
}

  .burn-stats .vault-details-trigger {
    width: 120px;
    font-size: 0.62rem;
    margin-top: 8px;
  }

.burn-stats .vault-details-panel {
  inset: 2px 6px;
}

.burn-stats .vault-details-card {
  width: 90%;
  max-width: 220px;
}

@keyframes burnValueGlow {
  0%   { text-shadow:
          0 1px 0 rgba(0, 0, 0, 0.35),
          0 0 10px rgba(255, 200, 170, 0.45),
          0 0 18px rgba(255, 170, 120, 0.35); }
  50%  { text-shadow:
          0 2px 0 rgba(0, 0, 0, 0.35),
          0 0 16px rgba(255, 220, 190, 0.9),
          0 0 28px rgba(255, 170, 120, 0.7); }
  100% { text-shadow:
          0 1px 0 rgba(0, 0, 0, 0.35),
          0 0 12px rgba(255, 200, 170, 0.55),
          0 0 20px rgba(255, 170, 120, 0.45); }
}

.vault-details-trigger:hover {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 14px rgba(255, 220, 120, 0.48);
}

.vault-details-panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 14px 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 20;
}

.vault-details-panel.active {
  opacity: 1;
  pointer-events: auto;
}

.vault-details-card {
  width: 94%;
  max-height: 100%;
  background: linear-gradient(180deg, rgba(18, 22, 36, 0.95), rgba(10, 12, 22, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 22px;
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.6),
    0 0 18px rgba(255, 210, 120, 0.25);
  padding: 16px 18px;
  margin-top: 4px;
  color: #eef3ff;
  font-size: 0.74rem;
  line-height: 1.6;
  overflow: hidden;
}

.vault-details-title {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffd45c;
  margin-bottom: 10px;
}

.vault-transfers {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 54vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.vault-transfers li {
  margin-bottom: 5px;
  padding: 6px 0 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vault-transfer-type {
  font-weight: 700;
  color: #fdfcff;
  margin-bottom: 2px;
  font-size: 0.66rem;
  letter-spacing: 0.05em;
}

.vault-transfer-type:empty {
  display: none;
}

.vault-transfer-amount {
  font-weight: 800;
  color: #8fffa0;
  display: inline-block;
  margin-bottom: 2px;
  font-size: 0.68rem;
}

.vault-transfer-amount.out {
  color: #ff6b6b;
}

.vault-transfer-link {
  color: #8fd4ff;
  text-decoration: underline;
  font-size: 0.6rem;
  display: inline-block;
  margin-top: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* destra: niente liquido blu */
.machine-right .machine-liquid {
  display: none;
}

.machine-cap {
  position: absolute;
  left: 50%;
  bottom: 60px;
  transform: translate(-50%, 60%);
  width: 190px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--metal-light), #171a25);
  box-shadow:
    0 14px 26px rgba(0, 0, 0, 0.8),
    inset 0 2px 3px rgba(255, 255, 255, 0.35),
    inset 0 -3px 6px rgba(0, 0, 0, 0.8);
}

.machine-cap::before {
  content: "";
  position: absolute;
  inset: 4px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5d6683, #262b3a);
}

/* tubi orizzontali --------------------------------------- */

.pipe-horizontal {
  position: absolute;
  height: 26px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f5f7ff, #cbd3f0);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.85),
    inset 0 0 6px rgba(255, 255, 255, 0.6),
    0 10px 20px rgba(0, 0, 0, 0.75);
}

.pipe-horizontal::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 14px;
  background: linear-gradient(90deg, #d5dbf6, #b5bee8);
  opacity: 0.9;
}

.pipe-horizontal.pipe-left-center {
  width: 420px;
  left: 50%;
  top: 40%;
  transform: translateX(-320px);
  overflow: hidden;
}

.pipe-horizontal.pipe-center-right {
  width: 420px;
  left: 50%;
  top: 40%;
  transform: translateX(-20px);
  opacity: 0.92;
}

.pipe-vertical {
  display: none;
  position: absolute;
  left: 50%;
  width: 24px;
  height: 160px;
  border-radius: 16px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #f5f7ff, #cbd3f0);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.85),
    inset 0 0 6px rgba(255, 255, 255, 0.6),
    0 10px 20px rgba(0, 0, 0, 0.75);
}

.pipe-vertical::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 14px;
  background: linear-gradient(90deg, #d5dbf6, #b5bee8);
  opacity: 0.9;
}

.pipe-vertical.pipe-vertical-top { top: 260px; }
.pipe-vertical.pipe-vertical-bottom { top: 640px; }

.btc-flow {
  position: absolute;
  top: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-image: url("../img/tbtc.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid rgba(184, 90, 0, 0.95);
  box-shadow:
    0 0 10px rgba(255, 188, 80, 0.9),
    0 3px 6px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: transparent;
  text-indent: -9999px;
  font-weight: 700;
  animation: btcMove 3.9s linear infinite;
}
.btc-flow:nth-child(1) { animation-delay: 0s; }
.btc-flow:nth-child(2) { animation-delay: 1.95s; }

@keyframes btcMove {
  0%   { transform: translateX(-40px); opacity: 0; }
  10%  { opacity: 1; }
  90%  { transform: translateX(370px); opacity: 1; }
  100% { transform: translateX(390px); opacity: 0; }
}

/* SWAP: monete Nummus che ENTRANO nel tank --------------- */

.swap-stream {
  position: absolute;
  left: 10%;
  top: 18px;
  width: 150px;
  height: 150px;
  border-radius: 120px 120px 40px 100px;
  background: linear-gradient(120deg, rgba(160, 220, 255, 0.3), transparent 70%);
  box-shadow:
    0 0 18px rgba(120, 220, 255, 0.35);
  overflow: visible;
  z-index: 12;
  pointer-events: none;
}

.swap-coin,
.burn-coin,
.dao-coin {
  position: absolute;
  border-radius: 50%;
  background-image: url("../img/nummus.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow:
    0 0 10px rgba(150, 210, 255, 0.9),
    0 4px 10px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

.swap-coin {
  width: 34px;
  height: 34px;
  animation: swapFlow 3s ease-in-out infinite;
}

.swap-coin:nth-child(1) { left: 0px;   top: -10px; animation-delay: 0s; }
.swap-coin:nth-child(2) { left: 32px;  top: -26px; animation-delay: 0.5s; }
.swap-coin:nth-child(3) { left: 68px;  top: -40px; animation-delay: 1.0s; }

@keyframes swapFlow {
  0%   { transform: translate(0, 0) scale(0.8); opacity: 0; }
  15%  { opacity: 1; }
  65%  { transform: translate(52px, 110px) scale(1); opacity: 1; }
  85%  { transform: translate(62px, 140px) scale(0.75); opacity: 0.5; }
  100% { transform: translate(70px, 160px) scale(0.45); opacity: 0; }
}

.swap-btc {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-image: url("../img/tbtc.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid rgba(184, 90, 0, 0.95);
  box-shadow:
    0 0 14px rgba(255, 210, 120, 0.8),
    0 6px 10px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: transparent;
  text-indent: -9999px;
  font-weight: 700;
  bottom: 17%;
  left: 36%;
  animation: btcSwapSink 3s ease-in-out infinite;
  transform: translate(-50%, -10px) scale(0);
  will-change: transform, opacity;
  z-index: 12;
  pointer-events: none;
}

.swap-btc--2 {
  left: 54%;
  animation-delay: 1s;
}

.swap-btc:nth-child(1) { animation-delay: 0.55s; }
.swap-btc:nth-child(2) { animation-delay: 1.05s; }

@keyframes btcSwapSink {
  0%   { transform: translate(-50%, -40px) scale(0);   opacity: 0; }
  18%  { transform: translate(-50%, -22px) scale(1);  opacity: 1; }
  70%  { transform: translate(-50%, 10px) scale(1);   opacity: 1; }
  100% { transform: translate(-50%, 28px) scale(0.65); opacity: 0; }
}

/* BURN: fiamma + monete Nummus che cadono ---------------- */

.burn-fire {
  position: absolute;
  left: 50%;
  bottom: 22%;
  transform: translateX(-50%);
  width: 140px;
  height: 180px;
  background:
    radial-gradient(ellipse at 50% 94%, rgba(255, 80, 40, 0.95), transparent 62%),
    radial-gradient(ellipse at 50% 72%, rgba(255, 140, 50, 0.95), transparent 56%),
    radial-gradient(ellipse at 45% 42%, rgba(255, 230, 160, 0.98), transparent 48%);
  filter: blur(0.8px);
  opacity: 0.96;
  animation: burnPulse 1.4s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}

.burn-fire::before,
.burn-fire::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 78px;
  height: 140px;
  transform: translateX(-50%);
  border-radius: 50% 50% 45% 45%;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(255, 90, 30, 0.9), transparent 55%),
    radial-gradient(ellipse at 50% 40%, rgba(255, 210, 140, 0.98), transparent 50%);
  filter: blur(3px);
  mix-blend-mode: screen;
  opacity: 0.95;
  animation: burnFlicker 0.85s ease-in-out infinite alternate;
}

.burn-fire::after {
  width: 52px;
  height: 105px;
  bottom: 20px;
  opacity: 0.82;
  filter: blur(2px);
  animation-duration: 0.65s;
  animation-delay: 0.18s;
}

@keyframes burnPulse {
  0% { transform: translateX(-50%) scale(0.93, 0.9); opacity: 0.78; }
  100% { transform: translateX(-50%) scale(1.08, 1.12); opacity: 1; }
}

@keyframes burnFlicker {
  0% { transform: translateX(-50%) scale(0.92, 0.9) skewX(-2deg); opacity: 0.82; }
  50% { transform: translateX(-50%) scale(1.06, 1.07) skewX(2deg); opacity: 0.98; }
  100% { transform: translateX(-50%) scale(0.96, 1.1) skewX(-1deg); opacity: 0.86; }
}

.burn-coin {
  width: 28px;
  height: 28px;
  left: 50%;
  transform: translateX(-50%);
  animation: burnDrop 2.1s linear infinite;
}
.burn-coin:nth-child(1) { animation-delay: 0s; }
.burn-coin:nth-child(2) { animation-delay: 1.0s; }

@keyframes burnDrop {
  0%   { top: 6%; opacity: 1.5; }
  10%  { opacity: 1.5; }
  70%  { top: 54%; opacity: 1; }
  100% { top: 62%; opacity: 0; }
}

.burn-supply-tag {
  position: absolute;
  left: 50%;
  bottom: 105px;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.7), rgba(40, 40, 60, 0.9));
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fefefe;
  box-shadow:
    0 0 10px rgba(0, 0, 0, 0.8),
    0 0 14px rgba(255, 120, 120, 0.5);
}

/* Torrino DAO: logo bianco su sfondo scuro, attaccato al Burn Engine */

.dao-badge {
  position: absolute;
  /* agganciato al lato sinistro del Burn Engine */
  left: -88px;
  top: -180px;
  width: 80px;
  height: 80px;
  border-radius: 50%;

  /* glow più netto per contrastare lo sfondo scuro */
  background:
    radial-gradient(circle at 50% 50%, rgba(140, 255, 230, 0.18), rgba(7, 12, 18, 0.92) 70%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18), transparent 75%);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.12),
    0 0 14px rgba(120, 255, 230, 0.35),
    0 0 28px rgba(0, 0, 0, 0.8);

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  z-index: 20;
  position: relative;
}

.dao-badge-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #000000 40%, #080b0f 90%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 1;
}

.dao-badge-inner img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.95));
}

/* contorno extra per rendere il logo leggibile su sfondo scuro */
.dao-badge::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 0 10px rgba(140, 255, 230, 0.35),
    inset 0 0 8px rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 0;
}

.machines-descriptions {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(203, 213, 255, 0.95);
}

.machines-descriptions p {
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.6;
}

.machines-descriptions a {
  color: #7ee0ff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(126, 224, 255, 0.5);
  font-weight: 600;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.machines-descriptions a:hover {
  color: #e6f3ff;
  border-bottom-color: #e6f3ff;
}

/* CTA avanzate */

.advanced-cta {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 30;
}

.advanced-cta--vault {
  left: 34%;
  bottom: 413px;
  transform: translateX(-50%);
}

.advanced-cta--burn {
  right: 23%;
  bottom: 429px;
}

.advanced-button {
  min-width: 140px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  color: #fdfcff;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.45),
    0 0 12px rgba(255, 255, 255, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.advanced-button:hover,
.advanced-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.5),
    0 0 18px rgba(255, 255, 255, 0.26);
  outline: none;
}

.advanced-button:active {
  transform: translateY(1px);
}

.advanced-panel {
  min-width: 240px;
  max-width: 280px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(12, 16, 30, 0.92), rgba(5, 7, 14, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.65),
    0 0 18px rgba(100, 160, 255, 0.25);
  color: #e8eeff;
  font-size: 0.7rem;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.advanced-panel a {
  color: #7ee0ff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(126, 224, 255, 0.55);
  font-weight: 700;
}

.advanced-panel a:hover {
  color: #b9ecff;
  border-bottom-color: #b9ecff;
}

.hub-links {
  margin-top: 28px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hub-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  color: #f7fbff;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  text-decoration: none;
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.45),
    0 0 10px rgba(255, 255, 255, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hub-link:hover,
.hub-link:focus-visible {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.5),
    0 0 14px rgba(255, 255, 255, 0.2);
  outline: none;
  transform: translateY(-1px);
}

.hub-link--discord {
  position: relative;
  min-width: 240px;
  padding: 12px 18px;
  text-align: center;
  cursor: default;
  z-index: 140;
}

.hub-link--discord::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 18px;
  background: transparent;
}

.hub-link--discord .hub-link-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hub-link-panel {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translate(-50%, -6px);
  width: 320px;
  max-width: 78vw;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(150deg, rgba(25, 34, 60, 0.95), rgba(10, 14, 30, 0.95));
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.7),
    0 0 18px rgba(72, 130, 255, 0.2);
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.5;
  color: #eef3ff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 160;
}

.hub-link-panel p {
  margin-bottom: 10px;
}

.hub-link-panel p:last-child {
  margin-bottom: 0;
}

.hub-link-panel a {
  color: #7ee0ff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(126, 224, 255, 0.55);
  font-weight: 700;
}

.hub-link-panel a:hover {
  color: #b9ecff;
  border-bottom-color: #b9ecff;
}

.hub-link--discord:hover .hub-link-panel,
.hub-link--discord:focus-within .hub-link-panel,
.hub-link--discord:focus .hub-link-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.hub-link--nummus {
  width: 54px;
  height: 54px;
  padding: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.2), rgba(5, 7, 14, 0.9));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 12px 18px rgba(0, 0, 0, 0.55),
    0 0 14px rgba(255, 220, 120, 0.35);
}

.hub-link--nummus img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hub-link--pill {
  min-width: 150px;
}

.advanced-panel-combined {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.advanced-cta--mobile {
  display: none;
}

.advanced-cta:hover .advanced-panel,
.advanced-cta:focus-within .advanced-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-backbone {
  display: none;
}

.base-info-panel {
  position: absolute;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%) translateY(8px);
  width: min(520px, 82vw);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 40;
}

.base-info-panel.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.base-info-card {
  background: linear-gradient(180deg, rgba(12, 16, 30, 0.96), rgba(5, 7, 14, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 16px;
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.65),
    0 0 14px rgba(126, 224, 255, 0.25);
  color: #e8eeff;
  padding: 14px 16px;
  font-size: 0.82rem;
  line-height: 1.55;
}

.base-info-card a {
  color: #7ee0ff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(126, 224, 255, 0.55);
  font-weight: 700;
}

.base-info-card a:hover {
  color: #b9ecff;
  border-bottom-color: #b9ecff;
}

@media (max-width: 1180px) {
  body {
    padding: 24px 14px;
  }

  .hub-panel {
    padding: 38px 32px 32px;
  }

  .machines-grid {
    gap: 66px;
  }

  .advanced-cta--vault {
    left: 32%;
  }

  .advanced-cta--burn {
    right: 16%;
  }
}

@media (max-width: 900px) {
  .hub-title {
    font-size: 2.1rem;
    line-height: 1.15;
  }

  .hub-subtitle {
    font-size: 0.98rem;
  }

  .hub-panel {
    padding: 34px 24px 28px;
  }

  .machines-grid {
    gap: 46px;
  }

  .pipe-horizontal {
    height: 22px;
    top: 47%;
  }

  .pipe-horizontal.pipe-left-center,
  .pipe-horizontal.pipe-center-right {
    width: 360px;
  }

  .machine {
    height: 320px;
  }

  .machine-header {
    top: -26px;
  }

  .machine-tank {
    width: 168px;
    height: 240px;
  }

  .machine-base {
    width: 210px;
  }
}

@media (max-width: 760px) {
  body {
    padding: 18px 10px 32px;
  }

  .hub-root {
    width: 100%;
  }

  .hub-panel {
    padding: 24px 18px 38px;
  }

  .machines-descriptions {
    display: none;
  }

  .hub-header {
    margin-bottom: 12px;
  }

  .hub-title {
    font-size: 1.7rem;
  }

  .hub-subtitle {
    font-size: 0.92rem;
  }

  .machines-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px;
    padding: 26px 0 18px;
  }

  .advanced-cta--vault,
  .advanced-cta--burn {
    display: none;
  }

  .advanced-cta--mobile {
    display: flex;
    position: static;
    width: 100%;
    margin: 12px 0 12px;
    align-items: center;
    justify-content: center;
  }

  .advanced-cta--mobile .advanced-button {
    width: 100%;
    justify-content: center;
  }

  .advanced-cta--mobile .advanced-panel {
    width: 100%;
    max-width: 100%;
  }

  .advanced-panel-combined {
    display: block;
  }

  .base-label {
    pointer-events: auto;
    cursor: pointer;
    text-decoration: underline dotted rgba(255, 255, 255, 0.55);
    color: #f7fbff;
    text-shadow:
      0 1px 0 rgba(0, 0, 0, 0.4),
      0 0 10px rgba(255, 220, 120, 0.35);
  }

  .base-label::after {
    content: "Tap for details";
    display: block;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 3px;
  }

  .machine {
    height: 360px;
  }

  .machine::after {
    display: none;
  }

  .machine:last-child::after {
    display: none;
  }

  .machine-header {
    top: -24px;
    display: none;
  }

  .machine-tank {
    width: 172px;
    height: 246px;
  }

  .machine-base {
    width: 216px;
  }

  .pipe-horizontal {
    display: none;
  }

  .burn-metrics .vault-stat {
    font-size: 0.75rem;
    column-gap: 8px;
    line-height: 1.1;
  }

  .burn-metrics .vault-stat strong {
    font-size: 0.84rem;
  }

  .swap-stream {
    left: 4%;
    top: 40px;
  }

  .swap-coin {
    animation: swapFlowMobile 3s ease-in-out infinite;
  }

  @keyframes swapFlowMobile {
    0%   { transform: translate(-1px, -10) scale(0.8); opacity: 0; }
    15%  { opacity: 1; }
    65%  { transform: translate(52px, 111px) scale(1); opacity: 1; }
    85%  { transform: translate(44px, 126px) scale(0.75); opacity: 1; }
    100% { transform: translate(56px, 148px) scale(0.45); opacity: 0.5; }
  }

  .mobile-backbone {
    display: block;
    position: absolute;
    left: 50%;
    top: 210px;
    bottom: 380px;
    width: 22px;
    transform: translateX(-50%);
    border-radius: 18px;
    background: linear-gradient(180deg, #e8ecff 0%, #d4dcf4 55%, #e8ecff 100%);
    box-shadow:
      0 0 0 2px rgba(0, 0, 0, 0.85),
      inset 0 0 6px rgba(255, 255, 255, 0.6),
      0 14px 24px rgba(0, 0, 0, 0.75);
    opacity: 0.92;
    z-index: 0;
    overflow: hidden;
  }

  .btc-flow--mobile {
    position: absolute;
    left: 50%;
    top: -20px;
    width: 30px;
    height: 30px;
    transform: translateX(-50%);
    animation: btcMoveMobile 3.6s linear infinite;
    filter: drop-shadow(0 0 8px rgba(255, 200, 100, 0.8));
    pointer-events: none;
    z-index: 40;
    opacity: 1;
  }

  @keyframes btcMoveMobile {
    0%   { transform: translate(-50%, 190px); opacity: 0; }
    8%   { opacity: 1; }
    75%  { transform: translate(-50%, calc(100% + 270px)); opacity: 1; }
    100% { transform: translate(-50%, calc(100% + 450px)); opacity: 0; }
  }

  .dao-badge {
    left: auto;
    right: -70px;
    top: -160px;
    transform: scale(0.88);
  }

  .base-info-panel {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(18px);
    width: min(640px, 94vw);
    z-index: 120;
  }

  .base-info-panel.active {
    transform: translateX(-50%) translateY(0);
  }
}

.hub-footer {
  margin-top: 42px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.775rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(222, 214, 194, 0.9);
}

.hub-footer-link {
  color: #3aa7ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hub-footer-link:hover,
.hub-footer-link:focus {
  color: #68bbff;
}
