/* ============================================
   GAMBLA AI - Tema viola e nero (brand unificato)
   ============================================ */

:root {
  /* Brand palette gradient magenta → arancia (dashboard black, rifiniture minimal) */
  --brand-navy: #0a0a0a;
  --brand-slate: #111111;
  --brand-magenta: #D946EF;
  --brand-orange: #F97316;
  --brand-violet: #D946EF;
  --brand-violet-light: #E879F9;
  --brand-violet-dark: #F97316;
  --brand-accent: #D946EF;
  --gambla-gradient: linear-gradient(135deg, #D946EF 0%, #F97316 100%);

  /* Mappatura su variabili esistenti (compatibilità) */
  --gambla-primary: var(--brand-violet);
  --gambla-secondary: var(--brand-violet-light);
  --gambla-accent: var(--brand-violet-dark);
  --gambla-success: #10b981;
  --gambla-warning: #f59e0b;
  --gambla-danger: #ef4444;

  /* Background & surfaces (nero) */
  --bg-primary: var(--brand-navy);
  --bg-secondary: var(--brand-slate);
  --bg-tertiary: #1a1a1a;
  --bg-card: #111111;
  --bg-hover: #1f1f1f;

  /* Text */
  --text-primary: #fafafa;
  --text-secondary: #e4e4e7;
  --text-muted: #a1a1aa;
  --text-disabled: #71717a;

  /* Borders */
  --border-primary: rgba(255, 255, 255, 0.08);
  --border-secondary: rgba(255, 255, 255, 0.12);
  --border-accent: var(--brand-violet);

  /* Typography */
  --font-display: 'Outfit', 'Inter', -apple-system, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Glass */
  --studio-glass-bg: rgba(17, 17, 17, 0.8);
  --studio-glass-border: rgba(217, 70, 239, 0.18);
}

body {
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-sans) !important;
  -webkit-font-smoothing: antialiased;
}

/* --- Glass card --- */
.glass-card,
.section-card {
  background: var(--studio-glass-bg) !important;
  border: 1px solid var(--studio-glass-border) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

@media (min-width: 1024px) {
  .glass-card,
  .section-card {
    border-radius: 1.25rem;
  }
}

/* --- Buttons --- */
.btn-primary,
.btn-studio-primary,
.btn-primary:hover {
  background: linear-gradient(135deg, #D946EF 0%, #F97316 100%) !important;
  color: #ffffff !important;
  border: none !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(217, 70, 239, 0.35);
}
.btn-primary:hover,
.btn-studio-primary:hover {
  background: linear-gradient(135deg, #E879F9 0%, #FB923C 100%) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.btn-secondary,
.btn-studio-secondary {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--studio-glass-border) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-display) !important;
  border-radius: 0.75rem;
}
.btn-secondary:hover,
.btn-studio-secondary:hover {
  background: rgba(217, 70, 239, 0.15) !important;
  border-color: rgba(217, 70, 239, 0.4) !important;
  color: var(--text-primary) !important;
}

/* --- Badges --- */
.badge-studio-success,
.badge-success,
.bg-success {
  background: rgba(217, 70, 239, 0.2) !important;
  color: var(--brand-violet-light) !important;
  border: 1px solid rgba(217, 70, 239, 0.35);
}
.badge-studio-premium,
.badge-premium {
  background: var(--gambla-gradient) !important;
  color: #ffffff !important;
  border: none;
}

/* --- Header --- */
.studio-header,
header.studio-header {
  background: rgba(10, 10, 10, 0.95) !important;
  border-bottom: 1px solid rgba(217, 70, 239, 0.2) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.studio-logo {
  font-family: var(--font-display) !important;
}
.studio-logo span.accent {
  color: var(--brand-violet) !important;
}
.studio-logo-icon {
  width: 2rem;
  height: 2rem;
  background: var(--gambla-gradient) !important;
  box-shadow: 0 4px 14px rgba(217, 70, 239, 0.35);
}
.studio-logo-icon i {
  color: #ffffff !important;
  font-size: 1rem;
}
.bg-brand-emerald { background-color: var(--brand-violet) !important; }
.text-brand-navy { color: var(--brand-navy) !important; }
.text-brand-emerald { color: var(--brand-violet) !important; }
.font-display { font-family: var(--font-display) !important; }
.studio-nav-item.active {
  color: var(--brand-violet-light) !important;
  background: rgba(217, 70, 239, 0.15) !important;
}
.studio-nav-item:hover {
  color: var(--text-primary) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  text-decoration: none !important;
}
.navbar-nav .nav-link:hover {
  color: var(--brand-violet-light) !important;
  text-decoration: none !important;
}

/* --- Footer --- */
.studio-footer {
  background: var(--brand-navy) !important;
  border-top: 1px solid rgba(217, 70, 239, 0.15) !important;
}
.studio-footer-links a:hover {
  color: var(--brand-violet-light) !important;
}
.studio-footer .studio-logo-icon {
  width: 1.5rem;
  height: 1.5rem;
}
.studio-footer .studio-logo-icon i {
  font-size: 0.75rem;
}
.studio-footer .studio-footer-logo .accent {
  color: var(--brand-violet) !important;
}

/* --- Section headers --- */
.section-header h2 i,
.studio-section-title i {
  color: var(--brand-violet) !important;
}
.filter-tab.active {
  background: var(--brand-violet) !important;
  border-color: var(--brand-violet) !important;
  color: #ffffff !important;
}
.match-tab.active {
  color: var(--brand-violet-light) !important;
  border-bottom-color: var(--brand-violet) !important;
}
.match-tab.active .count {
  background: rgba(217, 70, 239, 0.2) !important;
  color: var(--brand-violet-light) !important;
}

/* --- Links & accents --- */
a {
  color: var(--brand-violet-light);
}
a:hover {
  color: var(--brand-violet);
}
.view-all,
.section-header .view-all {
  color: var(--brand-violet-light) !important;
}
.finished-cta-btn,
.bonus-cta {
  background: var(--brand-violet) !important;
  color: #ffffff !important;
  border-color: var(--brand-violet) !important;
}
.bonus-cta:hover {
  background: var(--brand-violet-light) !important;
  color: #ffffff !important;
}

/* --- Hero --- */
.hero-section {
  background: var(--studio-glass-bg) !important;
  border: 1px solid var(--studio-glass-border) !important;
  border-radius: 1rem;
}
.hero-section h1 {
  background: none !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  color: var(--text-primary) !important;
}
.hero-section h1 .accent {
  color: var(--brand-violet) !important;
}

/* --- Stat chips / cards --- */
.stat-chip .value,
.stat-card .value {
  color: var(--brand-violet-light) !important;
}
.section-header .badge {
  background: var(--brand-violet) !important;
  color: #ffffff !important;
}

/* --- Form controls (focus) --- */
.form-control:focus,
.form-select:focus {
  border-color: var(--brand-violet) !important;
  box-shadow: 0 0 0 0.2rem rgba(217, 70, 239, 0.25) !important;
}

/* --- Ambient --- */
.gambla-blob-magenta {
  background: var(--brand-violet);
  opacity: 0.1;
}
.gambla-blob-orange {
  background: var(--brand-violet-dark);
  opacity: 0.08;
}

/* --- PWA banner --- */
#pwa-install-banner {
  background: var(--brand-slate) !important;
  border-top-color: var(--brand-violet) !important;
}
#pwa-install-banner .pwa-install-btn {
  background: var(--brand-violet) !important;
  color: #ffffff !important;
}

/* --- Alerts --- */
.alert-info { border-color: rgba(217, 70, 239, 0.3); background: rgba(217, 70, 239, 0.1); color: var(--text-primary); }
.alert-success { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.1); color: var(--text-primary); }
.alert-danger, .alert-error { border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.1); color: var(--text-primary); }

/* --- Layout (max-width) --- */
.studio-main .container {
  max-width: 1600px;
}
.home-page {
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}
