/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== CSS VARIABLES - Palette Nero + Verde ===== */
:root {
  /* Backgrounds */
  --nero-principale: #0A0A0A;
  --nero-elevato: #1A1A1A;
  --grigio-scuro: #2A2A2A;
  
  /* Verdi */
  --verde-primario: #4CAF50;
  --verde-acceso: #66BB6A;
  --verde-neon: #76FF03;
  
  /* Testi */
  --bianco: #FFFFFF;
  --grigio-chiaro: #E0E0E0;
  --grigio-medio: #9E9E9E;
  
  /* Fonts */
  --font-heading: 'Satoshi', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

/* ===== BODY ===== */
body {
  font-family: var(--font-body);
  background: var(--nero-principale);
  color: var(--grigio-chiaro);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* ===== CANVAS PARTICLES ===== */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ===== APP CONTAINER ===== */
.app-container {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* ===== SEZIONI ===== */
.section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.section#slider,
.section#prodotto {
  overflow-y: auto;
}

.section.active {
  opacity: 1;
  visibility: visible;
}

/* ===== HERO SECTION ===== */
#hero {
  text-align: center;
}

.hero-content {
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  color: var(--bianco);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--grigio-chiaro);
  margin-bottom: 3rem;
  font-weight: 400;
}

/* ===== BUTTON PRIMARY ===== */
.btn-primary {
  padding: 18px 48px;
  font-size: 1.125rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--nero-principale);
  background: linear-gradient(135deg, var(--verde-neon) 0%, var(--verde-primario) 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(118, 255, 3, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(118, 255, 3, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ===== CONTENT GENERICO (per altre sezioni) ===== */
.content {
  max-width: 900px;
  padding: 40px 20px;
  text-align: center;
}

.content h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--bianco);
  margin-bottom: 1rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .btn-primary {
    padding: 16px 40px;
    font-size: 1rem;
  }
}
/* ===== QUESTION SECTION ===== */
.question-container {
  max-width: 700px;
  width: 100%;
  padding: 40px 20px;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--grigio-scuro);
  border-radius: 10px;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--verde-primario), var(--verde-neon));
  border-radius: 10px;
  transition: width 0.5s ease;
}

.progress-text {
  position: absolute;
  top: -30px;
  right: 0;
  color: var(--verde-acceso);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Question Title */
.question-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--bianco);
  margin-bottom: 2rem;
  text-align: center;
}

/* Options Grid (multipla) */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.option-btn {
  padding: 20px 24px;
  font-size: 1rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--bianco);
  background: var(--nero-elevato);
  border: 2px solid var(--grigio-scuro);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

/* Hover solo su desktop (non touch) */
@media (hover: hover) {
  .option-btn:hover {
    border-color: var(--verde-primario);
    background: var(--grigio-scuro);
    transform: translateX(4px);
  }
}

.option-btn.selected {
  border-color: var(--verde-neon);
  background: var(--verde-primario);
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(118, 255, 3, 0.4);
}

/* Slider */
.slider-container {
  margin: 3rem 0;
  text-align: center;
}

.slider-input {
  width: 100%;
  height: 8px;
  background: var(--grigio-scuro);
  border-radius: 10px;
  outline: none;
  -webkit-appearance: none;
  margin-bottom: 2rem;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: var(--verde-neon);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(118, 255, 3, 0.5);
}

.slider-input::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--verde-neon);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(118, 255, 3, 0.5);
}

.slider-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--verde-neon);
  font-family: var(--font-heading);
}

.value-unit {
  font-size: 1.5rem;
  color: var(--grigio-chiaro);
  margin-left: 8px;
}

/* Buttons */
.btn-next {
  padding: 16px 40px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--nero-principale);
  background: linear-gradient(135deg, var(--verde-neon), var(--verde-primario));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 2rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(118, 255, 3, 0.4);
}

.btn-back {
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--grigio-chiaro);
  background: transparent;
  border: 1px solid var(--grigio-scuro);
  border-radius: 8px;
  cursor: pointer;
  margin-top: 2rem;
  transition: all 0.3s ease;
}

.btn-back:hover {
  border-color: var(--grigio-chiaro);
  background: var(--grigio-scuro);
}

/* Responsive */
@media (max-width: 768px) {
  .question-title {
    font-size: 1.5rem;
  }
  
  .slider-value {
    font-size: 2rem;
  }
}

/* ===== SLIDER SECTION ===== */
.slider-section-container {
  max-width: 700px;
  width: 100%;
  padding: 40px 20px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--bianco);
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--grigio-chiaro);
  margin-bottom: 3rem;
  text-align: center;
}

.section-subtitle strong {
  color: var(--verde-neon);
}

/* Slider Block */
.slider-block {
  margin-bottom: 3rem;
}

.slider-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bianco);
  margin-bottom: 1rem;
}

.slider-badge {
  font-size: 0.875rem;
  font-weight: 500;
  color: transparent;
  transition: all 0.3s ease;
}

.slider-badge.recommended {
  color: var(--verde-neon);
  text-shadow: 0 0 10px rgba(118, 255, 3, 0.5);
}

.slider-value-display {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--verde-neon);
  font-family: var(--font-heading);
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Range Slider */
.range-slider {
  width: 100%;
  height: 8px;
  background: var(--grigio-scuro);
  border-radius: 10px;
  outline: none;
  -webkit-appearance: none;
  margin-bottom: 0.5rem;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: var(--verde-neon);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(118, 255, 3, 0.5);
  transition: all 0.2s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 20px rgba(118, 255, 3, 0.8);
}

.range-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--verde-neon);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(118, 255, 3, 0.5);
  transition: all 0.2s ease;
}

.range-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 20px rgba(118, 255, 3, 0.8);
}

.slider-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--grigio-medio);
}

/* Risk Bar */
.risk-bar-container {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--nero-elevato);
  border-radius: 12px;
  border: 1px solid var(--grigio-scuro);
}

.risk-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bianco);
  margin-bottom: 1rem;
  text-align: center;
}

.risk-bar {
  width: 100%;
  height: 12px;
  background: var(--grigio-scuro);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.risk-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease, background 0.3s ease;
}

/* Risk Levels Colors */
.risk-level-1 { background: #2D5016; }
.risk-level-2 { background: #4CAF50; }
.risk-level-3 { background: #8BC34A; }
.risk-level-4 { background: #FFC107; }
.risk-level-5 { background: #FF9800; }
.risk-level-6 { background: #F44336; }

.risk-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--grigio-medio);
  margin-bottom: 1rem;
}

.risk-warning {
  text-align: center;
  color: #FFC107;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .section-title {
    font-size: 1.5rem;
  }
  
  .slider-value-display {
    font-size: 2rem;
  }
  
  .slider-label {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ===== PRODUCT SECTION ===== */
.product-container {
  max-width: 800px;
  width: 100%;
  padding: 60px 20px 40px 20px;
}

.section#prodotto {
  padding-top: 40px;
}

.product-card {
  background: var(--nero-elevato);
  border: 2px solid;
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.product-name {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--bianco);
  margin: 0;
}

.product-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bianco);
}

.product-description {
  font-size: 1rem;
  color: var(--grigio-chiaro);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.product-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--nero-principale);
  border-radius: 12px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-label {
  font-size: 0.875rem;
  color: var(--grigio-medio);
}

.feature-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--verde-neon);
  font-family: var(--font-heading);
}

.product-bullets {
  margin-bottom: 2rem;
}

.product-bullets h4 {
  font-size: 1rem;
  color: var(--bianco);
  margin-bottom: 1rem;
}

.product-bullets ul {
  list-style: none;
  padding: 0;
}

.product-bullets li {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--grigio-chiaro);
  position: relative;
}

.product-bullets li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--verde-neon);
  font-weight: bold;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 6px 12px;
  background: var(--grigio-scuro);
  color: var(--grigio-chiaro);
  border-radius: 6px;
  font-size: 0.875rem;
}

.product-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* Responsive Product */
@media (max-width: 768px) {
  .product-features {
    grid-template-columns: 1fr;
  }
  
  .product-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .product-actions {
    flex-direction: column-reverse;
    width: 100%;
  }
  
  .product-actions button {
    width: 100%;
  }
}

/* ===== FORM SECTION ===== */
.form-container {
  max-width: 600px;
  width: 100%;
  padding: 60px 20px 40px 20px;
}

.section#dati {
  overflow-y: auto;
  padding-top: 40px;
}

.lead-form {
  background: var(--nero-elevato);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--grigio-scuro);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bianco);
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--bianco);
  background: var(--nero-principale);
  border: 2px solid var(--grigio-scuro);
  border-radius: 8px;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--verde-primario);
}

.form-group input::placeholder {
  color: var(--grigio-medio);
}

.input-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--grigio-medio);
  margin-top: 0.5rem;
}

.form-summary {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--nero-principale);
  border-radius: 12px;
  border-left: 4px solid var(--verde-primario);
}

.form-summary h4 {
  font-size: 1rem;
  color: var(--bianco);
  margin-bottom: 1rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  color: var(--grigio-chiaro);
}

.summary-item strong {
  color: var(--verde-neon);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.privacy-notice {
  text-align: center;
  font-size: 0.875rem;
  color: var(--grigio-medio);
  margin-top: 1.5rem;
}

/* Responsive Form */
@media (max-width: 768px) {
  .form-actions {
    flex-direction: column-reverse;
  }
  
  .form-actions button {
    width: 100%;
  }
}

/* ===== SUCCESS SECTION ===== */
.success-container {
  max-width: 700px;
  width: 100%;
  padding: 80px 20px 40px 20px;
  text-align: center;
}

.section#success {
  overflow-y: auto;
  padding-top: 40px;
}

.success-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
  animation: successPop 0.5s ease;
}

@keyframes successPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.success-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--verde-neon);
  margin-bottom: 1rem;
}

.success-subtitle {
  font-size: 1.125rem;
  color: var(--grigio-chiaro);
  margin-bottom: 2rem;
}

.success-subtitle strong {
  color: var(--bianco);
}

.success-card {
  background: var(--nero-elevato);
  padding: 2rem;
  border-radius: 16px;
  border: 2px solid var(--verde-primario);
  margin: 2rem 0;
  text-align: left;
}

.success-card h3 {
  font-size: 1.25rem;
  color: var(--bianco);
  margin-bottom: 1.5rem;
}

.success-list {
  list-style: none;
  padding: 0;
}

.success-list li {
  padding: 0.75rem 0;
  color: var(--grigio-chiaro);
  border-bottom: 1px solid var(--grigio-scuro);
}

.success-list li:last-child {
  border-bottom: none;
}

.success-list strong {
  color: var(--verde-neon);
}

.success-next-steps {
  background: var(--nero-principale);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 2rem 0;
  text-align: left;
}

.success-next-steps h4 {
  font-size: 1rem;
  color: var(--bianco);
  margin-bottom: 1rem;
}

.success-next-steps ol {
  padding-left: 1.5rem;
  color: var(--grigio-chiaro);
}

.success-next-steps li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.success-next-steps strong {
  color: var(--verde-acceso);
}

.success-actions {
  margin: 2rem 0;
}

.success-footer {
  font-size: 0.875rem;
  color: var(--grigio-medio);
  margin-top: 1.5rem;
}

/* Responsive Success */
@media (max-width: 768px) {
  .success-title {
    font-size: 1.5rem;
  }
  
  .success-icon {
    font-size: 4rem;
  }
}

/* ===== CHATBOT WIDGET ===== */
#chatbot-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--verde-neon), var(--verde-primario));
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(118, 255, 3, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(118, 255, 3, 0.6);
}

.chatbot-toggle .close-icon {
  display: none;
}

.chatbot-toggle.open .chat-icon {
  display: none;
}

.chatbot-toggle.open .close-icon {
  display: block;
  color: var(--nero-principale);
}

.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  max-height: 500px;
  background: var(--nero-elevato);
  border: 2px solid var(--verde-primario);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chatbot-window.open {
  display: flex;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chatbot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--nero-principale);
  border-bottom: 1px solid var(--grigio-scuro);
}

.chatbot-header h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--verde-neon);
}

.chatbot-close {
  background: none;
  border: none;
  color: var(--grigio-chiaro);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-message {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  max-width: 80%;
  line-height: 1.4;
  font-size: 0.9rem;
}

.user-message {
  align-self: flex-end;
  background: var(--verde-primario);
  color: var(--bianco);
}

.bot-message {
  align-self: flex-start;
  background: var(--grigio-scuro);
  color: var(--grigio-chiaro);
}

.bot-message.typing {
  display: flex;
  gap: 4px;
  padding: 1rem;
}

.bot-message.typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--verde-neon);
  animation: typing 1.4s infinite;
}

.bot-message.typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.bot-message.typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-10px);
  }
}

.chatbot-input-container {
  display: flex;
  padding: 1rem;
  gap: 0.5rem;
  border-top: 1px solid var(--grigio-scuro);
  background: var(--nero-principale);
}

#chatbot-input {
  flex: 1;
  padding: 0.75rem;
  background: var(--nero-elevato);
  border: 1px solid var(--grigio-scuro);
  border-radius: 8px;
  color: var(--bianco);
  font-size: 0.9rem;
  font-family: var(--font-body);
}

#chatbot-input:focus {
  outline: none;
  border-color: var(--verde-primario);
}

.chatbot-send-btn {
  width: 40px;
  height: 40px;
  background: var(--verde-primario);
  border: none;
  border-radius: 8px;
  color: var(--bianco);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chatbot-send-btn:hover {
  background: var(--verde-neon);
  transform: scale(1.05);
}

.chatbot-counter {
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--grigio-medio);
  background: var(--nero-principale);
}

/* Responsive Chatbot */
@media (max-width: 768px) {
  .chatbot-window {
    width: calc(100vw - 40px);
    right: 20px;
  }
}