/* style.css — Azul marino + naranja claro, animaciones modernas y responsivo */

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

html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background: #0B1A33;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', 'Poppins', system-ui, sans-serif;
  position: relative;
  padding: 1rem;
  min-height: 100vh;
  min-height: 100dvh;
}

#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Tarjeta principal */
.construction-card {
  position: relative;
  z-index: 10;
  background: rgba(11, 26, 51, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 140, 0, 0.25);
  border-radius: clamp(24px, 6vw, 42px);
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1.25rem, 6vw, 4rem);
  max-width: min(650px, 92vw);
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 165, 0, 0.1) inset;
  animation: floatIn 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  transform: scale(0.96);
  opacity: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

@keyframes floatIn {
  0% { transform: scale(0.92) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Icono */
.icon-wrapper {
  margin-bottom: clamp(1rem, 3vw, 1.8rem);
  display: flex;
  justify-content: center;
  filter: drop-shadow(0 0 15px rgba(255, 140, 0, 0.5));
}

.gear-icon {
  width: clamp(56px, 12vw, 90px);
  height: clamp(56px, 12vw, 90px);
  color: #FFAA33;
  animation: spinPulse 4s infinite ease-in-out;
  transform-origin: center;
}

@keyframes spinPulse {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); filter: drop-shadow(0 0 25px #FFB347); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Título */
.title {
  font-size: clamp(1.75rem, 8vw, 3.5rem);
  font-weight: 800;
  letter-spacing: clamp(1px, 0.6vw, 4px);
  text-transform: uppercase;
  background: linear-gradient(135deg, #FFFFFF 0%, #FFD699 45%, #FFAA33 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
  animation: shimmer 3s infinite;
  background-size: 200% auto;
  line-height: 1.1;
  overflow-wrap: break-word;
  word-break: break-word;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}

/* Subtítulo */
.subtitle {
  color: #C7D9F0;
  font-size: clamp(0.9rem, 2.6vw, 1.15rem);
  font-weight: 400;
  letter-spacing: 0.5px;
  margin-bottom: clamp(1.5rem, 5vw, 2.8rem);
  opacity: 0.9;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  line-height: 1.4;
  overflow-wrap: break-word;
}

/* Barra de progreso */
.progress-container {
  width: 100%;
  height: clamp(8px, 1.6vw, 10px);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 8px rgba(255, 170, 51, 0.2);
  border: 1px solid rgba(255, 170, 51, 0.2);
  margin-bottom: clamp(0.5rem, 1.5vw, 0.8rem);
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #FF8C00, #FFB347, #FFD699);
  border-radius: 20px;
  box-shadow: 0 0 16px #FFAA33, 0 0 8px #FF8C00;
  transition: width 0.1s linear;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -30%;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: shine 1.8s infinite;
}

@keyframes shine {
  0% { left: -30%; }
  60% { left: 100%; }
  100% { left: 100%; }
}

/* Texto de porcentaje */
.progress-text {
  font-size: clamp(1rem, 3.2vw, 1.3rem);
  font-weight: 600;
  color: #FFC285;
  text-shadow: 0 0 12px rgba(255, 140, 0, 0.7);
  margin-bottom: clamp(1rem, 4vw, 2rem);
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}

/* Puntos decorativos */
.deco-dots {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 2vw, 14px);
  margin-top: 0.5rem;
}

.deco-dots span {
  width: clamp(7px, 1.6vw, 10px);
  height: clamp(7px, 1.6vw, 10px);
  background: #FFAA33;
  border-radius: 50%;
  box-shadow: 0 0 10px #FFB347;
  animation: bounceDot 1.4s infinite ease-in-out;
}

.deco-dots span:nth-child(1) { animation-delay: 0s; }
.deco-dots span:nth-child(2) { animation-delay: 0.2s; background: #FFC285; width: clamp(9px, 2vw, 12px); height: clamp(9px, 2vw, 12px); }
.deco-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounceDot {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(-8px); opacity: 1; box-shadow: 0 0 18px #FFD699; }
}

/* Ajustes extra para pantallas muy pequeñas */
@media (max-width: 380px) {
  .title {
    letter-spacing: 1px;
  }
  .subtitle {
    letter-spacing: 0;
  }
}