/* ===================== */
/* Multiplication Trainer CSS z animacją kota i piłki */
/* ===================== */

#multiplication-trainer {
  background: #f0fdf9;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  max-width: 1200px;
  width: 100%;
  margin: 2rem auto;
  padding: 2rem;
  font-family: "Comic Sans MS", "Arial Rounded MT Bold", sans-serif;
  text-align: center;
}

#multiplication-trainer h2 {
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  color: #0f4c75;
  margin-bottom: 1rem;
  border-bottom: 2px solid #cbe4de;
  padding-bottom: 10px;
}

.range-select { margin: 1.5rem 0; font-size: clamp(1rem, 2vw, 1.2rem); }
.range-select select {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  padding: 0.4rem 1rem;
  border-radius: 8px;
  border: 2px solid #38b48b;
  cursor: pointer;
  background: #fff;
}

.question {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 1.5rem 0;
  color: #0f4c75;
}

.answers {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 2vw, 1.5rem);
}

.answers button {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  padding: clamp(0.5rem, 1.5vw, 1rem) clamp(1rem, 3vw, 2rem);
  border-radius: 10px;
  border: none;
  background: #38b48b;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.answers button:hover { transform: scale(1.05); background: #1b4332; }
.answers button.correct { background: #2ecc71 !important; }
.answers button.wrong { background: #e74c3c !important; }

.score { margin-top: 1.5rem; font-size: clamp(1rem,2vw,1.4rem); color:#0f4c75; font-weight:bold; }

.cat {
  margin-top: 2rem;
  font-family: monospace;
  white-space: pre;
  font-size: clamp(1rem,3vw,1.5rem);
  min-height: 12ch;
  line-height: 1.2;
  transition: transform 0.3s;
  color: #0f4c75;
  position: relative;
}

/* Kot - happy jump */
.cat.jump {
  animation: jump 0.6s ease-in-out infinite alternate;
}

/* Kot - smutek */
.cat.sad {
  animation: shake 0.5s ease-in-out 2;
}

@keyframes jump { from { transform: translateY(0); } to { transform: translateY(-15px); } }
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

/* Komunikat kota */
.cat-message {
  font-size: clamp(1rem,2vw,1.3rem);
  color:#0f4c75;
  font-weight:bold;
  margin-top:0.5rem;
}

/* Piłka animowana */
.cat-ball {
  display: inline-block;
  position: relative;
  left: 0;
  animation: ball-move 0.6s linear infinite;
}

@keyframes ball-move {
  0% { transform: translate(0,0); }
  25% { transform: translate(8px,-5px); }
  50% { transform: translate(16px,0); }
  75% { transform: translate(8px,5px); }
  100% { transform: translate(0,0); }
}

/* Responsywność */
@media (max-width:768px) {
  .answers button { padding:0.5rem 1rem; font-size:1.1rem; }
  .question { font-size:2rem; }
}

.mode-select button[data-mode="kids"] { border-color:#f4a261; }
.mode-select button[data-mode="kids"].active { background:#f4a261; color:#fff; }
