/* retos.css — Estilos para la página de Retos de Programación */

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 20px 60px;
}

.page-title {
  text-align: center;
  font-family: "Outfit", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #a5b4fc, #c084fc);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.page-sub {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 45px;
}

/* ── Barra de progreso global ── */
.progress-bar-wrap {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  height: 8px;
  margin-bottom: 30px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(135deg, #a5b4fc, #c084fc);
  border-radius: 50px;
  transition: width 0.5s ease;
}

.progress-text {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

/* ── Grupos por nivel ── */
.level-group { margin-bottom: 40px; }

.level-label {
  font-family: "Outfit", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Badges de nivel */
.badge-easy {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
}

.badge-med {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
}

.badge-hard {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
}

/* ── Card de reto ── */
.challenge {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 22px 25px;
  margin-bottom: 15px;
  backdrop-filter: blur(10px);
  transition: transform 0.3s;
}

.challenge:hover { transform: translateY(-3px); }

.ch-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}

.ch-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.ch-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.ch-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tag {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 50px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-hover);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ── Botones ── */
.hint-btn {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: all 0.3s;
  font-family: "Outfit", sans-serif;
}

.hint-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.solved-btn {
  padding: 8px 14px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s;
}

.solved-btn.done {
  background: rgba(16, 185, 129, 0.3);
  font-weight: 600;
}

/* ── Caja de pista ── */
.hint-box {
  display: none;
  margin-top: 15px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border-left: 3px solid var(--accent-primary);
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  line-height: 1.6;
}

.hint-box.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
