html, body {
  font-family: 'Inter', 'Noto Sans', sans-serif !important;
}

/* Prevent anchored headings from being hidden by fixed header and enable scroll snap */
html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 5rem;
}

/* Cada sección encaja al iniciar en su tope */
section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

:root {
  --color-background: #f2f4f6;
  --color-card: #ffffff;
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255,255,255,0.7);
  --color-accent: #e57c19;
  --color-shadow: rgba(0, 0, 0, 0.1);
  --color-blue-dark: #1e2c4b;
  --color-blue-light: #93bde5;
  --color-gold: #e5b019;
  --color-red-wine: #74273a;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(128, 0, 105, 0.2) 0%, rgba(30, 0, 45, 0.1) 20%, transparent 90%),
    radial-gradient(circle at center, rgba(255, 0, 98, 0.1) 0%, rgba(140, 0, 255, 0.1) 100%, transparent 90%),
    radial-gradient(circle at 70% 30%, rgba(119, 0, 143, 0.1) 0%, rgba(0, 0, 0, 0.1) 30%, transparent 90%),
    #000;
  min-height: 100vh;
  font-family: Inter, "Noto Sans", sans-serif;
  background-attachment: fixed;
}

.card, .glass-card {
  background-color: var(--color-card);
  box-shadow: 0 4px 12px var(--color-shadow);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1rem;
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-primary {
  color: var(--color-text-primary);
}

.button-accent, .cta-button, .calc-btn {
  background: var(--color-accent);
  color: white;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cta-button, .calc-btn {
  background: linear-gradient(90deg, #ff5a5f 0%, #ffb400 100%);
  font-size: 1.2rem;
  box-shadow: 0 2px 14px 0 rgba(255,110,90,0.06);
}
.cta-button:hover, .cta-button:focus, .calc-btn:hover { 
  opacity: 0.88;
}

.prompt-gallery img {
  border-radius: 12px;
  object-fit: cover;
  width: 100%;
  height: auto;
}

/* Barra superior */
.glass-header, .header-full {
  position: fixed;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: visible;
  height: 62.5px;
  width: 80%;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.);
  box-shadow: 0 8px 32px 0 rgba(255, 255, 255, 0.1),
              0 0 10px 1px rgba(0, 0, 0, 0.1);
}

.header-full {
  top: 0;
  left: 0 !important;
  width: 100vw !important;
  height: 75px;
  transform: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 48px;
  background: rgba(30, 10, 40, 0.35);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 2px 16px rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.14);
}

/* Burbuja liquid bubble */
.liquid-bubble {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  height: 40px;
  border-radius: 12px;
  transition: left 0.2s ease, width 0.1s ease;
  pointer-events: none;
  z-index: -1;
  background: rgba(60, 50, 100, 0.34);
  box-shadow: 0 0 14px 3px rgba(100,80,160,0.85);
}

/* Nav items */
.nav-item {
  position: relative;
  padding: 8px 16px;
  transition: color 0.3s ease;
  color: var(--color-text-secondary);
}
.nav-item:hover {
  color: var(--color-text-primary) !important;
}

/* Elementos de vidrio */
.glass-panel {
  background: rgba(1, 0, 28, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  padding: 2rem 1.1rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 950px;
}

/* En móvil, menos padding lateral */
@media (max-width: 600px) {
  .glass-panel {
    padding: 1.1rem 0.25rem;
    max-width: 98vw;
    border-radius: 14px;
  }
}

.glass-card, .drag-drop-area {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
}

.drag-drop-area {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.input-field {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.1);
}
.input-field::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}
@keyframes pulseSlow {
  0%,100% { transform: scale(1); opacity: 0.3; }
  50%     { transform: scale(1.1); opacity: 0.5; }
}
@keyframes pop {
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

.fade-in  { animation: fadeIn 0.8s ease forwards; }
.delay-1  { animation-delay: 0.2s; }
.delay-2  { animation-delay: 0.4s; }
.delay-3  { animation-delay: 0.6s; }
.floating { animation: float 6s ease-in-out infinite; }
.animate-pulse-slow { animation: pulseSlow 6s ease-in-out infinite; }

/* Hero Section */
#hero-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: url("images/bgwaves.avif") center/cover fixed;
  padding: 4rem 1.5rem;
  box-shadow: inset 0 0 150px rgba(76, 0, 41, 0.1);
}
#hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle at 70% 30%, rgba(55, 0, 55, 0.3) 0%, transparent 50%);
  z-index: 0;
}

/* Cards */
.feature-card, .testimonial-card { 
  transition: all 0.3s ease; 
}
.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 20px 1px #fff;
}
.testimonial-card:hover {
  transform: translateY(-5px);
}

/* Footer */
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a  { transition: color 0.3s ease; }

/* Modo claro */
body.light-theme {
  background: radial-gradient(circle at 50% 45%, #e9f6ff 0%, #aedafd 40%, #6fc0fc 70%, #1a3158 100%);
  background-attachment: fixed;
  color: #171717 !important;
}

body.light-theme,
body.light-theme .text-primary,
body.light-theme .text-secondary,
body.light-theme .glass-panel,
body.light-theme .glass-card,
body.light-theme .glass-header,
body.light-theme .feature-card,
body.light-theme .testimonial-card,
body.light-theme .footer-links a,
body.light-theme .footer-column,
body.light-theme .cta-button,
body.light-theme .nav-item,
body.light-theme .input-field,
body.light-theme a,
body.light-theme h1, 
body.light-theme h2, 
body.light-theme h3, 
body.light-theme h4, 
body.light-theme h5, 
body.light-theme h6 {
  color: #171717 !important;
}

body.light-theme .glass-panel,
body.light-theme .glass-card,
body.light-theme .glass-header {
  background: rgba(255, 255, 255, 0.80);
}

body.light-theme .text-secondary {
  color: #323a46 !important;
}

/* Responsive */
@media (max-width: 767px) {
  .glass-header, .header-full { 
    width: 90%; 
    padding: 0 1rem;
  }
  .header-full { height: 60px; }
  #hero-section { padding: 2rem 1rem !important; }
  .features-grid, .testimonial-grid { 
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .glass-panel { 
    padding: 1.2rem 0.5rem; 
    border-radius: 18px; 
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .glass-header, .header-full { width: 80%; }
  .features-grid { grid-template-columns: repeat(2,1fr) !important; }
  .testimonial-grid { grid-template-columns: repeat(2,1fr) !important; }
}

@media (min-width: 1024px) {
  .glass-header, .header-full { width: 70%; }
  .features-grid { grid-template-columns: repeat(3,1fr) !important; }
  .testimonial-grid { grid-template-columns: repeat(3,1fr) !important; }
}

/* Header full */
@media (max-width: 900px) {
  .header-full {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* Logo */
.logo-container img {
  height: 55px !important;
  max-height: 55px !important;
  transition: height 0.2s;
}
.logo-light { display: block; }
.logo-dark { display: none; }
body:not(.light-theme) .logo-light { display: none !important; }
body:not(.light-theme) .logo-dark  { display: block !important; }
body.light-theme .logo-light { display: block !important; }
body.light-theme .logo-dark  { display: none !important; }

/* Burbujas y temas */
body:not(.light-theme) .liquid-bubble {
  background: rgba(20, 25, 55, 0.34);
  box-shadow: 0 0 12px 2px rgba(80,80,160,0.80);
}
body.light-theme .liquid-bubble {
  background: rgba(230, 240, 255, 0.19);
  box-shadow: 0 0 12px 2px rgba(120,170,255,0.85);
}

/* Componentes de calculadora */
.calc-result-green, .calc-result-red {
  max-width: 360px;
  margin: 1.1rem auto;
  border-radius: 18px;
  padding: 1.1rem 1.2rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.calc-result-green { 
  background: #d4ffe4; 
  border: 2px solid #41d462; 
  color: #116c37;
}
.calc-result-red { 
  background: #ffe7e7; 
  border: 2px solid #ff555f; 
  color: #ae2131;
}
body:not(.light-theme) .calc-result-green {
  background: #183822;
  border-color: #43d17a;
  color: #97ffc1;
}
body:not(.light-theme) .calc-result-red {
  background: #28181c;
  border-color: #ff555f;
  color: #ffe6e6;
}

/* Sliders */
.slider-coral {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #ff5a5f, #ffb400 95%);
  outline: none;
}
.slider-coral::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #ff5a5f;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  cursor: pointer;
}
.slider-coral::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #ff5a5f;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  cursor: pointer;
}

/* Espaciado secciones */
.section-spaced {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
}
@media (max-width: 768px) {
  .section-spaced {
    margin-top: 28px !important;
    margin-bottom: 28px !important;
  }
}

body.light-theme label[for^="calc-"] {
  color: #171717 !important;
}


body.light-theme #calc-form label,
body.light-theme #calc-form span[id$="value"] {
  color: #171717 !important; /* Negro en modo light */
}

#btn-personalizar {
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  color: #fff; /* Por defecto blanco (dark) */
}
body.light-theme #btn-personalizar {
  color: #171717 !important; /* Negro en light */
}

body.light-theme .input-field {
  background: #f7f8fa;
  color: #171717 !important;
  border: 1.5px solid #e0e7ef;
}
body.light-theme .input-field::placeholder {
  color: #888 !important;
}

.slider-morado {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #a259c3 0%, #f84ba4 50%, #62a0ea 100%);
  outline: none;
}
.slider-morado::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #a259c3;
  box-shadow: 0 2px 8px rgba(80, 0, 100, 0.12);
  cursor: pointer;
}
.slider-morado::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #a259c3;
  box-shadow: 0 2px 8px rgba(80, 0, 100, 0.12);
  cursor: pointer;
}
.slider-morado:focus { outline: none; }

.slider-personalizado {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(90deg, #fa375a 0%, #22d3ee 100%);
  outline: none;
  margin: 0;
  position: relative;
}
.slider-personalizado::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #fa375a;
  box-shadow: 0 2px 8px rgba(250, 55, 90, 0.16);
  cursor: pointer;
  margin-top: -9px;
}
.slider-personalizado:focus::-webkit-slider-thumb {
  background: #22d3ee;
}
.slider-personalizado::-ms-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #fa375a;
  box-shadow: 0 2px 8px rgba(250, 55, 90, 0.16);
  cursor: pointer;
}
.slider-personalizado::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #fa375a;
  box-shadow: 0 2px 8px rgba(250, 55, 90, 0.16);
  cursor: pointer;
}
.slider-personalizado::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(90deg, #2a18ee 0%, #fa375a 100%);
}
.slider-personalizado::-moz-range-track {
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(90deg, #2a18ee 0%, #fa375a 100%);
}
.slider-personalizado::-ms-fill-lower,
.slider-personalizado::-ms-fill-upper {
  background: linear-gradient(90deg, #2a18ee 0%, #fa375a 100%);
}

body:not(.light-theme) .feature-icon {
  color: #fff !important;
}

@media (max-width: 900px) {
  .comparativa-table {
    gap: 0.5rem !important;
  }
  .comparativa-table > div {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .glass-card {
    font-size: 0.96rem !important;
    padding: 0.75rem 0.6rem !important;
  }
  .comparativa-table ul {
    gap: 0.35rem !important;
  }
  .comparativa-table span, .comparativa-table i {
    font-size: 1rem !important;
  }
}
@media (max-width: 650px) {
  .comparativa-table {
    gap: 0.25rem !important;
  }
  .glass-panel {
    padding-left: 0.6rem !important;
    padding-right: 0.6rem !important;
  }
  .glass-card {
    padding: 0.65rem 0.5rem !important;
    font-size: 0.87rem !important;
  }
}

.slider-ticks {
  position: relative;
  height: 14px;
  margin-top: -2px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
}
.slider-tick {
  width: 2px;
  height: 14px;
  background: linear-gradient(180deg, #fa375a 0%, #22d3ee 100%);
  opacity: 0.6;
  border-radius: 1px;
  transition: height 0.1s;
}
.slider-tick.active {
  height: 20px;
  opacity: 1;
  background: linear-gradient(180deg, #22d3ee 0%, #fa375a 100%);
}

.comparativa-table > .grid > .comparativa-cell {
  box-shadow: 0 4px 16px 0 rgba(50,50,80,0.11), 0 1px 6px rgba(40,30,60,0.05);
  border: 1.6px solid rgba(70, 50, 120, 0.08);
  background: rgba(255,255,255,0.92);
}
body:not(.light-theme) .comparativa-table > .grid > .comparativa-cell {
  background: rgba(30,20,38,0.66);
  border: 1.6px solid rgba(80,60,120,0.19);
  box-shadow: 0 4px 18px 0 rgba(90,80,140,0.18), 0 1px 8px rgba(30,10,60,0.09);
}