.math-card {
  background: #fffef6;
  border: 4px solid #42a5f5;
  border-radius: 20px;
  padding: 24px;
  max-width: 650px;
  margin: 0 auto;
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
}

.math-card__title {
  text-align: center;
  color: #1976d2;
  margin-bottom: 20px;
}

.math-card__image img {
  width: 100%;
  border-radius: 16px;
  display: block;
}

.math-title {
  text-align: center;
  font-size: 2rem;
  margin-top: 20px;
}

.math-badges {
  text-align: center;
  margin: 20px 0;
}

.difficulty,
.category {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: bold;
  color: white;
  margin: 4px;
}

.difficulty-easy {
  background: #4caf50;
}

.difficulty-medium {
  background: #ff9800;
}

.difficulty-hard {
  background: #e53935;
}

.category {
  background: #2196f3;
}

.section {
  margin-top: 24px;
}

.section h4 {
  margin-bottom: 10px;
}

.math-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 25px;
}

.learn-more {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 180px;
  height: 52px;
  border-radius: 10px;
  background: #1976d2;
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
}

.learn-more:hover {
  background: #125ea8;
}

.speak-math,
.show-hint,
.show-answer,
.learn-more {
  width: 100%;
  min-height: 52px;

  display: flex;
  justify-content: center;
  align-items: center;

  border-radius: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  box-sizing: border-box;
}

.speak-math {
  background: #8e24aa;
  color: white;
  border: 0;
  cursor: pointer;
}

.speak-math:hover {
  background: #6a1b9a;
}

.show-hint {
  background: #ffb300;
  color: white;
  border: 0;
  cursor: pointer;
}

.show-hint:hover {
  background: #ff9800;
}

.show-answer {
  background: #43a047;
  color: white;
  border: 0;
  cursor: pointer;
}

.show-answer:hover {
  background: #2e7d32;
}

.hint-box,
.answer-box {
  margin-top: 25px;
  padding: 18px;
  border-radius: 12px;
}

.hint-box {
  background: #fff8dc;
  border-left: 5px solid #ffb300;
}

.answer-box {
  background: #f1f8e9;
  border-left: 5px solid #43a047;
}

.answer-checker{
    margin-top:30px;
}

.answer-checker label{
    display:block;
    font-weight:bold;
    margin-bottom:10px;
}

.math-answer{
    width:100%;
    padding:14px;
    font-size:1.2rem;
    border:2px solid #ccc;
    border-radius:10px;
    box-sizing:border-box;
}

.check-answer{

    margin-top:15px;

    width:100%;

    height:54px;

    border:none;

    border-radius:10px;

    background:#00a651;

    color:#fff;

    font-size:1.5rem;

    font-weight:bold;

    cursor:pointer;
}

.check-answer:hover{

    background:#00873f;

}

.answer-result{

    margin-top:20px;

    font-size:1.5rem;

    font-weight:bold;

    text-align:center;

}

.answer-result.correct{

    color:#2e7d32;

}

.answer-result.incorrect{

    color:#d32f2f;

}

.answer-result.warning{

    color:#f57c00;

}

.answer-result.correct{

    color:#2e7d32;

    animation: popSuccess .6s ease;
}

@keyframes popSuccess{

    0%{
        transform:scale(.7);
        opacity:0;
    }

    70%{
        transform:scale(1.12);
    }

    100%{
        transform:scale(1);
        opacity:1;
    }

}