/* ====== Estilos generales ====== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at top, #0f172a, #1e293b);
  color: #f1f5f9;
  overflow-x: hidden;
}

/* Simulación de estrellas */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: transparent url("https://www.transparenttextures.com/patterns/stardust.png") repeat;
  opacity: 0.3;
  pointer-events: none;
}

.container {
  text-align: center;
  background: rgba(17, 24, 39, 0.9);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  width: 90%;
  max-width: 400px;
  margin: 40px auto;
}

h1 { margin-bottom: 20px; }

.timer {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 20px;
}

#countdown {
  font-size: 2rem;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 8px;
}

input[type="number"] {
  margin: 10px 0;
  padding: 8px;
  border-radius: 6px;
  border: none;
  text-align: center;
  width: 100%;
  max-width: 200px;
}

.verde { color: #22c55e; }
.amarillo { color: #facc15; }
.rojo { color: #ef4444; }

button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #22c55e;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

button:hover {
  background: #16a34a;
  transform: scale(1.05);
}

#mensaje-final {
  margin-top: 20px;
  font-size: 1rem;
  font-weight: bold;
  color: #38bdf8;
}

/* ====== Animación del cohete ====== */
.cohete {
  font-size: 3rem;
  margin-top: 30px;
  position: relative;
  display: inline-block;
}

.fuego, .humo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
}

.fuego {
  bottom: -20px;
  width: 20px;
  height: 40px;
  background: radial-gradient(circle, #f97316 20%, #ef4444 80%);
  border-radius: 50%;
}

.humo {
  bottom: -60px;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 20%, rgba(255,255,255,0) 80%);
  border-radius: 50%;
}

.lanzar { animation: despegar 3s forwards; }
.fuego-activo { opacity: 1; animation: fuegoAnim 0.5s infinite alternate; }
.humo-activo { opacity: 1; animation: humoAnim 2s infinite; }

@keyframes despegar {
  0% { transform: translateY(0); }
  100% { transform: translateY(-300px); }
}
@keyframes fuegoAnim {
  from { transform: translateX(-50%) scaleY(1); }
  to { transform: translateX(-50%) scaleY(1.5); }
}
@keyframes humoAnim {
  0% { transform: translateX(-50%) scale(1); opacity: 0.8; }
  100% { transform: translateX(-50%) scale(1.5); opacity: 0; }
}

/* ====== Footer ====== */
footer {
  background: rgba(0,0,0,0.7);
  color: #f1f5f9;
  text-align: center;
  padding: 15px;
  width: 100%;
}

footer h3 {
  margin: 0;
  font-size: 1rem;
}

.link-container {
  margin-top: 10px;
}

.github-logo {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.github-logo:hover {
  transform: rotate(10deg) scale(1.2);
  filter: drop-shadow(0 0 8px #22c55e);
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
  .container {
    width: 95%;
    margin: 20px auto;
  }
  h1 { font-size: 1.6rem; }
  .timer { font-size: 1.2rem; }
  #countdown { font-size: 1.5rem; }
  .cohete { font-size: 2.5rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.3rem; }
  .timer { font-size: 1rem; }
  #countdown { font-size: 1.2rem; }
  .cohete { font-size: 2rem; }
  .github-logo { width: 32px; height: 32px; }
}
