/* QuantX AI - Dark Neon Glassmorphism */
:root {
  --bg: #05060a;
  --bg2: #0a0c16;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(120, 200, 255, 0.14);
  --cyan: #00f0ff;
  --violet: #8b5cf6;
  --green: #22ff88;
  --text: #eaf2ff;
  --muted: #8a97b5;
  --glow-cyan: 0 0 24px rgba(0, 240, 255, 0.35);
  --glow-green: 0 0 24px rgba(34, 255, 136, 0.35);
  --grad: linear-gradient(135deg, #00f0ff 0%, #8b5cf6 100%);
}

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

body {
  font-family: 'Segoe UI', 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Orb di sfondo animati */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  z-index: 0;
  animation: float 18s ease-in-out infinite;
}
body::before {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,240,255,0.35), transparent 70%);
  top: -100px; left: -100px;
}
body::after {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(139,92,246,0.35), transparent 70%);
  bottom: -150px; right: -150px;
  animation-delay: -9s;
}
@keyframes float {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(40px, -40px) scale(1.1); }
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* ---------- NAV ---------- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  margin-bottom: 20px;
}
.logo {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
}
.logo span { -webkit-text-fill-color: var(--text); }
.nav .btn { padding: 10px 22px; }

/* ---------- HERO ---------- */
.hero { text-align: center; padding: 60px 20px 40px; }
.hero .badge {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--cyan);
  background: var(--card);
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}
.hero h1 {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 20px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* ---------- BOTTONI ---------- */
.btn {
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  padding: 15px 32px;
  border-radius: 14px;
  transition: all 0.25s ease;
  font-family: inherit;
}
.btn-primary {
  background: var(--grad);
  color: #04050a;
  box-shadow: var(--glow-cyan);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 0 40px rgba(0,240,255,0.55); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--card); border-color: var(--cyan); }
.btn-green { background: linear-gradient(135deg,#22ff88,#00c853); color:#04140a; box-shadow: var(--glow-green); }
.btn-green:hover { transform: translateY(-3px); box-shadow: 0 0 40px rgba(34,255,136,0.5); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- CARD ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: blur(16px);
  transition: all 0.3s ease;
}
.card:hover { border-color: rgba(0,240,255,0.3); }

/* ---------- GRID STAT ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 40px 0;
}
.stat-card { text-align: center; }
.stat-card .num {
  font-size: 34px;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.stat-card .label { color: var(--muted); font-size: 14px; }

/* ---------- FEATURES ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 40px 0;
}
.feature .icon { font-size: 34px; margin-bottom: 14px; }
.feature h3 { font-size: 20px; margin-bottom: 10px; }
.feature p { color: var(--muted); line-height: 1.6; font-size: 15px; }

/* ---------- SEZIONI ---------- */
.section-title {
  text-align: center;
  font-size: 38px;
  font-weight: 900;
  margin: 60px 0 12px;
}
.section-sub { text-align: center; color: var(--muted); margin-bottom: 30px; }

/* ---------- FORM ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.input {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px 18px;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  transition: border 0.2s;
}
.input:focus { outline: none; border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.label { font-size: 13px; color: var(--muted); margin-bottom: 6px; display: block; }

/* ---------- DASHBOARD ---------- */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.balance-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: blur(16px);
  margin-bottom: 24px;
}
.balance-box .label { font-size: 14px; color: var(--muted); }
.balance-box .amount {
  font-size: 46px;
  font-weight: 900;
  margin: 8px 0;
  background: linear-gradient(135deg, #22ff88, #00f0ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.balance-box .sub { color: var(--green); font-size: 15px; }

.dash-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

/* ---------- SEGNALE (giocata) ---------- */
.signal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 14px;
  background: rgba(0,0,0,0.25);
  transition: all 0.3s;
}
.signal.active { border-color: var(--green); box-shadow: var(--glow-green); }
.signal .info h4 { font-size: 17px; margin-bottom: 6px; }
.signal .info .meta { color: var(--muted); font-size: 13px; }
.signal .win { color: var(--green); font-weight: 800; }
.signal .btn { padding: 12px 20px; }

/* ---------- FEED ---------- */
.feed { display: flex; flex-direction: column; gap: 10px; }
.feed-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(0,0,0,0.2);
  font-size: 14px;
  animation: slideIn 0.4s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(20px);} to {opacity:1; transform:none;} }
.feed-item .pair { color: var(--cyan); font-weight: 700; }
.feed-item .up { color: var(--green); }
.feed-item .down { color: #ff5c7a; }

/* ---------- CHART ---------- */
.chart-wrap { position: relative; }
.chart-svg { width: 100%; height: 220px; display: block; }
.chart-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 6px rgba(34,255,136,0.6));
}
.chart-area { fill: url(#areaGrad); opacity: 0.5; }

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  max-width: 440px;
  width: 90%;
  transform: scale(0.9);
  transition: transform 0.3s;
}
.modal-overlay.show .modal { transform: scale(1); }
.modal h2 { margin-bottom: 20px; font-size: 24px; }

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg2);
  border: 1px solid var(--green);
  border-radius: 12px;
  padding: 14px 24px;
  z-index: 200;
  transition: transform 0.3s;
  box-shadow: var(--glow-green);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- STREAK ---------- */
.streak {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(34,255,136,0.1);
  border: 1px solid rgba(34,255,136,0.3);
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
}

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

/* ---------- AUTH PAGE ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  z-index: 1;
}
.auth-card {
  width: 100%;
  max-width: 420px;
}

/* ---------- HERO IMAGE ---------- */
.hero-img {
  margin-top: 48px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 240, 255, 0.15);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.hero-img img { width: 100%; display: block; }

/* ---------- PIANI / SQUADRA ---------- */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 40px 0;
  align-items: stretch;
}
.plan-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.plan-card.featured {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.25);
  transform: scale(1.04);
}
.plan-badge {
  position: absolute;
  top: 18px;
  right: -40px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #8b5cf6, #00f0ff);
  color: #04050a;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 48px;
}
.plan-name { font-size: 22px; font-weight: 900; letter-spacing: 2px; }
.plan-price { font-size: 42px; font-weight: 900; }
.plan-price span { font-size: 14px; color: var(--muted); font-weight: 500; }
.plan-yield {
  font-size: 24px;
  font-weight: 800;
  color: var(--green);
}
.plan-yield small { font-size: 14px; color: var(--muted); font-weight: 500; }
.plan-features {
  list-style: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
}
.plan-features li::first-letter { color: var(--green); }

/* ---------- WALLET ---------- */
.wallet-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 24px;
  max-width: 520px;
  margin: 0 auto;
  font-family: 'Consolas', monospace;
  word-break: break-all;
}
.wallet-label { font-size: 12px; color: var(--cyan); font-family: inherit; letter-spacing: 1px; }
.wallet-addr { font-size: 15px; color: var(--text); }

/* ---------- TESTIMONIANZE ---------- */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 40px 0;
}
.t-card { display: flex; flex-direction: column; gap: 14px; }
.t-head { display: flex; gap: 14px; align-items: center; }
.t-head img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--cyan);
}
.t-role { color: var(--muted); font-size: 13px; margin-top: 3px; }
.t-card p { color: var(--text); font-size: 15px; line-height: 1.65; flex: 1; }
.t-win {
  color: var(--green);
  font-weight: 800;
  font-size: 15px;
  padding: 10px 16px;
  background: rgba(34, 255, 136, 0.08);
  border: 1px solid rgba(34, 255, 136, 0.25);
  border-radius: 10px;
  text-align: center;
}

/* ---------- REFERRAL CTA / CARD ---------- */
.referral-cta { text-align: center; position: relative; overflow: hidden; }
.referral-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(0, 240, 255, 0.12), transparent 60%);
  pointer-events: none;
}
.ref-link-box {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  overflow: hidden;
}
.ref-link-box span {
  font-family: 'Consolas', monospace;
  font-size: 14px;
  color: var(--cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- ADMIN TABLE ---------- */
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.adm-table th {
  text-align: left;
  padding: 12px 14px;
  color: var(--cyan);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.adm-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(120, 200, 255, 0.07);
}
.adm-table tr:hover td { background: rgba(0, 240, 255, 0.03); }

/* ---------- BARRA LIVE + TICKER ATTIVITA' ---------- */
.livebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin: 18px auto 26px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 14px;
  color: var(--muted);
  max-width: 900px;
}
.livebar b { color: var(--text); }
.livebar .sep { opacity: 0.4; }
.livebar .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

.ticker { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow: hidden; }
.ticker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(120, 200, 255, 0.08);
  font-size: 14px;
  animation: slideIn 0.45s ease both;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.ticker-item .ic { font-size: 16px; }
.ticker-item .tx { flex: 1; color: var(--text); }
.ticker-item .ago { color: var(--muted); font-size: 12px; }

/* ---------- ATTIVITA' UTENTE ---------- */
.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(120, 200, 255, 0.07);
  font-size: 14px;
}
.activity-item:last-child { border-bottom: none; }
.activity-item .ic { font-size: 16px; }
.activity-item .tx { flex: 1; color: var(--text); }
.activity-item .when { color: var(--muted); font-size: 12px; margin-top: 2px; }
.activity-item .pos { color: var(--green); font-weight: 800; }
.activity-item .neg { color: #ff5c7a; font-weight: 800; }

/* ---------- TABS ADMIN ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 10px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}
.tab:hover { color: var(--text); border-color: var(--cyan); }
.tab.active { background: var(--grad); color: #041018; border-color: transparent; }
.tab .pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 12px;
}

/* ---------- PULSANTI CHE LAVORANO ---------- */
.btn.loading { opacity: 0.75; cursor: progress; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { cursor: not-allowed; }
