/* ===========================
   Yakdiel Kids — styles.css
   Estilo: Duolingo infantil
   =========================== */

/* --- Paleta y variables --- */
:root{
  --bg: #e9f9ef;
  --card: #ffffff;
  --accent: #4caf50;
  --accent-2: #6bd17a;
  --muted: #6b7a73;
  --shadow: 0 10px 28px rgba(23, 43, 23, 0.08);
  --radius: 16px;
  --glass: rgba(255,255,255,0.6);
}

/* --- Reset básico --- */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family: "Inter", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(180deg,#f3fff6 0%,var(--bg) 100%);
  color:#173017;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  padding:18px;
}

/* --- Layout centrado --- */
.container{
  max-width:920px;
  margin:0 auto;
}

/* --- Top header --- */
.top-header{
  display:flex;
  align-items:center;
  gap:14px;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  padding:12px 18px;
  border-radius:14px;
  box-shadow:var(--shadow);
  color:white;
}

.logo{
  width:62px;
  height:62px;
  border-radius:10px;
  object-fit:cover;
  border:3px solid rgba(255,255,255,0.12);
  background: #fff;
}

.app-title{
  font-size:20px;
  font-weight:800;
  letter-spacing:0.2px;
}

/* --- Panels / sections --- */
.panel{
  margin-top:18px;
}

.panel.hidden{display:none}
.panel.show{display:block}

/* --- Section title --- */
.section-title{
  font-size:18px;
  font-weight:800;
  margin-bottom:12px;
  color: #11481a;
}

/* --- Category grid --- */
.category-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:12px;
  margin-bottom:14px;
}

.category-card{
  background:var(--card);
  border-radius:12px;
  padding:14px;
  text-align:center;
  box-shadow:var(--shadow);
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease;
  border: 1px solid rgba(16,80,16,0.03);
}

.category-card:hover{
  transform: translateY(-6px);
  box-shadow:0 18px 36px rgba(15,60,15,0.08);
}

.category-emoji{
  font-size:30px;
  margin-bottom:8px;
}

.category-name{
  font-weight:800;
  font-size:15px;
  color:#143b16;
}

/* --- Menu buttons --- */
.menu-buttons{
  display:flex;
  gap:10px;
  margin-top:10px;
  flex-wrap:wrap;
}

.primary-btn, .secondary-btn{
  padding:12px 16px;
  border-radius:12px;
  border:0;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(0,0,0,0.06);
}

.primary-btn{
  background:linear-gradient(180deg,var(--accent),var(--accent-2));
  color:#fff;
  flex:1;
}

.secondary-btn{
  background:transparent;
  border:2px solid rgba(15,80,15,0.08);
  color:var(--muted);
  flex:1;
}

/* small variant */
.small{
  padding:8px 12px;
  border-radius:10px;
  font-size:0.95rem;
}

/* --- Card de pregunta --- */
.card{
  background:var(--card);
  border-radius:18px;
  padding:18px;
  box-shadow:var(--shadow);
  max-width:720px;
  margin:10px auto 24px;
}

.question-number{
  font-size:13px;
  color:var(--muted);
  margin-bottom:8px;
}

.question-text{
  font-size:20px;
  font-weight:900;
  margin-bottom:14px;
  color:#113615;
}

/* --- Lista de respuestas --- */
.answers-list{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:10px;
}

.answer-btn{
  display:block;
  width:100%;
  text-align:left;
  padding:14px 16px;
  border-radius:12px;
  background:linear-gradient(180deg,#fbfff8,#f1fff0);
  border:1px solid rgba(14,55,14,0.06);
  font-weight:800;
  font-size:15px;
  cursor:pointer;
  transition: transform .08s ease, box-shadow .12s ease, background .12s;
  box-shadow: 0 6px 12px rgba(4,20,4,0.04);
}

.answer-btn:hover{
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(7,30,7,0.06);
}

.answer-btn.selected{
  outline: 3px solid rgba(76,175,80,0.18);
  background: linear-gradient(180deg,#eaffea,#e1ffd9);
}

.answer-btn.correct{
  background: linear-gradient(180deg,#d7f8d9,#c6f1c5);
  border-color:#4caf50;
}

.answer-btn.wrong{
  background: linear-gradient(180deg,#ffecec,#ffdcdc);
  border-color:#e53935;
}

/* --- Feedback text --- */
.feedback{
  margin-top:14px;
  font-weight:800;
  font-size:16px;
  color:var(--muted);
  text-align:center;
}

/* --- Saved list --- */
.saved-list{
  list-style:none;
  padding:0;
  margin-top:6px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.saved-item{
  background:linear-gradient(180deg,#fff,#fbfff7);
  padding:12px;
  border-radius:12px;
  box-shadow:var(--shadow);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  border:1px solid rgba(14,55,14,0.04);
}

.saved-item .meta{
  font-size:13px;
  color:var(--muted);
}

/* --- Modal / celebraciones --- */
.celebrate {
  position:fixed;
  right:16px;
  bottom:16px;
  background:linear-gradient(180deg,#fffef6,#eaffea);
  padding:12px 14px;
  border-radius:14px;
  box-shadow:0 12px 28px rgba(0,0,0,0.12);
  display:flex;
  gap:10px;
  align-items:center;
  animation: popIn .28s ease;
}

@keyframes popIn{
  from{ transform: translateY(12px) scale(.98); opacity:0 }
  to{ transform: translateY(0) scale(1); opacity:1 }
}

/* star animation */
.star {
  color:#ffd54f;
  font-size:20px;
  transform: scale(0);
  animation: starPop .35s forwards;
  margin-left:3px;
}
@keyframes starPop{
  from{ transform: scale(0) }
  to{ transform: scale(1) }
}

/* --- Utilities --- */
.hidden{display:none}
.center { display:flex; align-items:center; justify-content:center; }
.mt-8{ margin-top:8px }
.px-8{ padding-left:8px; padding-right:8px }

/* --- Responsive --- */
@media (max-width:720px){
  .category-grid{ grid-template-columns:repeat(2,1fr) }
  .question-text{ font-size:18px }
  .logo{ width:54px; height:54px }
  .container{ padding:10px }
}

