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

/* ---------- BASE ---------- */
body {
  font-family: Arial, sans-serif;
  background: #0f172a;
  color: #e5e7eb;
  padding: 20px;
}

/* ---------- CONTAINER ---------- */
.container {
  max-width: 900px;
  margin: auto;
  background: #020617;
  padding: 10px;
  border-radius: 10px;
}

/* ---------- HEADINGS ---------- */
h1 {
  text-align: center;
  margin-bottom: 10px;
}

p {
  text-align: center;
  margin-bottom: 20px;
  font-size: 15px;
  color: #cbd5f5;
}

/* ---------- INPUT ---------- */
input {
  width: 100%;
  padding: 12px;
  margin: 15px 0;
  border-radius: 6px;
  border: none;
  outline: none;
  font-size: 16px;
}

/* ---------- BUTTONS ---------- */
button {
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  font-size: 15px;
  transition: all 0.2s ease;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* VALIDATE */
#validateBtn {
  background: #22c55e;
  color: #022c22;
}

#validateBtn:hover:not(:disabled) {
  background: #16a34a;
}

/* NEXT */
#nextBtn {
  background: #3b82f6;
  color: white;
}

#nextBtn:hover:not(:disabled) {
  background: #2563eb;
}

/* RESET */
#resetBtn {
  background: #ef4444;
  color: white;
}

#resetBtn:hover {
  background: #dc2626;
}

/* ---------- TABLE ---------- */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 15px 0;
}

table {
  min-width: 500px;
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border: 1px solid #334155;
  padding: 8px;
  text-align: center;
}

th {
  background: #f9f9f9;
  font-weight: bold;
}

/* ---------- RESULT ---------- */
#result {
  margin-top: 12px;
  padding: 8px;
  text-align: center;
  font-weight: bold;
  border-radius: 6px;
}

/* ---------- STATS ---------- */
#stats {
  margin-top: 20px;
  font-size: 20px;
  text-align: center;
  color: #ffffff;
}

#stats span {
  display: inline-block;
  margin: 0 10px;
}

/* ---------- HINT BUTTON ---------- */
.hint-btn {
  width: 100%;
  margin: 12px 0;
  padding: 12px 16px;
  background: linear-gradient(135deg, #64748b, #475569);
  color: #ffffff;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hint-btn:hover {
  background: linear-gradient(135deg, #475569, #334155);
  transform: translateY(-1px);
}

.hint-btn:active {
  transform: scale(0.98);
}

.hint-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#hint {
    display: none;
    max-width: 100%;
    padding: 12px;
    margin-top: 10px;

    background: #4b5563;
    color: #fff;
    border-radius: 8px;

    /* 🔑 CLAVES PARA QUE NO SE SALGA */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    overflow-x: auto;

    font-size: 14px;
}


/* ---------- BUTTON GROUP ---------- */
.button-group {
  align-content: center;
  justify-content: center;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {

  body {
    padding: 10px;
  }

  .container {
    padding: 16px;
    border-radius: 8px;
  }

  h1 {
    font-size: 22px;
  }

  p {
    font-size: 14px;
    margin-bottom: 25px;
  }

  input {
    font-size: 15px;
    padding: 10px;
  }

  .button-group {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  th, td {
    font-size: 13px;
    padding: 6px;
    background: white;
  }

  #stats {
    font-size: 18px;
  }
}

.final-message {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  display: none;
}


/* popup starts */
/* OVERLAY */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* CONTENIDO */
.modal-content {
  background: #0b1220;
  color: #fff;
  padding: 25px;
  border-radius: 12px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

/* IMAGEN */
.modal-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* BOTÓN CERRAR */
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
}

/* BOTÓN COMPRAR */
.btn-comprar {
  display: inline-block;
  margin-top: 15px;
  padding: 12px 20px;
  background: #22c55e;
  color: #000;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
}

.btn-comprar:hover {
  background: #16a34a;
  transform: scale(1.05);
}

.btn-manual {
  display: block;
  margin: 0 auto 30px;
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 10px;
}

/* 📱 Mobile */


@media (max-width: 768px) {
  .btn-manual {
    width: 90%;
    max-width: 320px;
    font-size: 12px;
  }
}





.whatsapp-soporte {
    color: #25D366;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.whatsapp-soporte:hover {
    color: #1ebe5d;
    text-decoration: underline;
}


