:root {
  /* Palette Magazzino Lattoneria 2026 */
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --secondary: #10b981;
  --dark-bg: #0f172a;
  --dark-surface: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-ai: #00f2ff;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background Effects */
.bg-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% -20%, rgba(59, 130, 246, 0.15), transparent 70%),
    radial-gradient(circle at 0% 100%, rgba(16, 185, 129, 0.05), transparent 50%);
  z-index: -1;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

header {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #fff, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero Section */
.hero {
  padding: 8rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 242, 255, 0.1);
  border: 1px solid rgba(0, 242, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  color: var(--accent-ai);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Mockup CSS (Simplified for now) */
.mockup-container {
  position: relative;
  background: var(--dark-surface);
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  height: 450px;
}

.mockup-header {
  height: 40px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 0.5rem;
}

.mockup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.5;
}

.red {
  background: #ff5f56;
}

.yellow {
  background: #ffbd2e;
}

.green {
  background: #27c93f;
}

.mockup-content {
  padding: 1.5rem;
  height: calc(100% - 40px);
}

.cta-btn {
  background: var(--primary);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s;
  display: inline-block;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
  background: var(--primary-dark);
}

/* Loading Animation */
.loading-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(59, 130, 246, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.loading-container p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Section Common */
.section-padding {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Grid Sections */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 2rem;
  border-radius: 1.5rem;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Activation Block */
.activation-section {
  padding: 6rem 0;
  text-align: center;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 2rem;
  margin-bottom: 4rem;
  border: 1px solid var(--glass-border);
}

.activation-grid {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.activation-card {
  padding: 1.5rem 2.5rem;
  background: var(--dark-bg);
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
  text-align: left;
  min-width: 250px;
}

.activation-card.primary {
  border-color: var(--primary);
}

.activation-card.secondary {
  border-color: var(--secondary);
}

.activation-text {
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 0.8rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
}

.nav-link:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.nav-link.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.nav-link.download-btn {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--primary);
  color: #fff;
}

.card-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 0.3rem;
  letter-spacing: 1px;
}

.label-primary {
  color: var(--primary);
}

.label-secondary {
  color: var(--secondary);
}

.card-value {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Mockup Specifics */
.mockup-header span {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Utilities */
.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mt-1 {
  margin-top: 1rem;
}

.color-primary {
  color: var(--primary);
}

.color-secondary {
  color: var(--secondary);
}

/* Responsive */
@media (max-width: 968px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 3rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero-content p:first-of-type {
    font-size: 1.2rem;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

/* Pricing & Licenses Page */
.pricing-grid {
  display: flex !important;
  justify-content: center;
  align-items: stretch;
  gap: 1.5rem;
  margin: 4rem 0;
  flex-wrap: nowrap; /* Force 3 side-by-side on desktop */
}

@media (max-width: 1100px) {
  .pricing-grid {
    flex-wrap: wrap; /* Wrap on smaller screens */
  }
  .pricing-card {
    min-width: 300px;
    flex: 1 1 300px;
  }
}

.pricing-card {
  flex: 1; /* All cards equal width */
  background: #1e293b !important; /* Colore solido costante */
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  padding: 3rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.pricing-card.featured {
  border: 4px solid var(--primary); /* Use border instead of scale */
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.25);
  z-index: 2;
}

.pricing-card:hover {
  border-color: var(--primary);
  background: #243347 !important;
}

.price-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.pricing-card h3 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff !important;
}

.pricing-card .price {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 2rem;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  text-align: left;
  flex: 1;
}

.pricing-card ul li {
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  color: #f8fafc !important; /* Testo più chiaro e leggibile */
  display: flex;
  align-items: flex-start; /* Better for wrapping text */
  gap: 0.5rem;
  line-height: 1.3;
}

.pricing-card ul li::before {
  content: '✓';
  color: var(--secondary);
  font-weight: 900;
  flex-shrink: 0;
}

/* Comparison Table */
.comparison-container {
  overflow-x: auto;
  margin-top: 4rem;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--dark-surface);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.comparison-table th, .comparison-table td {
  padding: 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

.comparison-table th {
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.check-yes { color: var(--secondary); font-weight: bold; }
.check-no { color: #ef4444; opacity: 0.5; }

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  color: white;
  font-size: 1rem;
  transition: all 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.file-input-wrapper {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 2px dashed var(--glass-border);
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}

.file-input-wrapper:hover {
  background: rgba(59, 130, 246, 0.05);
  border-color: var(--primary);
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.file-label b {
  color: var(--primary);
}

.alert {
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 2rem;
  font-weight: 600;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--secondary);
  color: #10b981;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  color: #ef4444;
}

/* --- Sezione Demo Video --- */
.demo-container {
  max-width: 1000px;
  margin: 4rem auto;
  padding: 0 1rem;
}

.main-video-wrapper {
  position: relative;
  background: var(--dark-bg);
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  margin-bottom: 3rem;
  transition: transform 0.3s ease;
}

.main-video-wrapper:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.play-btn-circle {
  width: 80px;
  height: 80px;
  background: rgba(59, 130, 246, 0.8);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  transition: all 0.3s ease;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.main-video-wrapper:hover .play-btn-circle {
  transform: scale(1.1);
  background: var(--primary);
  box-shadow: 0 0 50px rgba(59, 130, 246, 0.8);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.video-card {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
  overflow: hidden;
  transition: all 0.3s ease;
}

.video-card:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--secondary);
  transform: translateY(-3px);
}

.video-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #0f172a;
  background-size: cover;
  background-position: center;
  position: relative;
}

.video-card-info {
  padding: 1.25rem;
}

.video-card-info h4 {
  margin: 0 0 0.5rem 0;
  color: #fff;
  font-size: 1rem;
}

.video-card-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.demo-cta {
  text-align: center;
  margin-top: 5rem;
  padding: 3rem;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 2rem;
  border: 1px dashed rgba(59, 130, 246, 0.2);
}

.demo-preview {
  margin-top: 6rem;
  text-align: center;
}

.demo-preview .main-video-wrapper {
  max-width: 800px;
  margin: 0 auto;
  cursor: pointer;
}

.demo-thumb-bg {
  background-image: linear-gradient(rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.4)), url('../img/thumb_main.png');
}

.cta-btn.large {
  padding: 1rem 3rem;
}

.mt-2 { margin-top: 1.5rem; }
.mt-6 { margin-top: 6rem; }
.mb-3 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 4rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }

/* --- Video Modal --- */
.video-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.video-modal.active {
  display: flex;
  opacity: 1;
}

.video-modal-content {
  width: 90%;
  max-width: 1100px;
  position: relative;
  transform: translateY(30px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.video-modal.active .video-modal-content {
  transform: translateY(0);
}

.video-modal-content video {
  width: 100%;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 100px rgba(59, 130, 246, 0.3);
}

.close-modal {
  position: absolute;
  top: -50px;
  right: 0;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.close-modal:hover {
  opacity: 1;
}
