@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;700&display=swap');

body {
  font-family: 'M PLUS Rounded 1c', sans-serif;
  background-color: #f0f8ff;
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

.app-container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

h1 {
  background: #ffe0b2;
  padding: 10px 20px;
  border-left: 8px solid #ff9800;
  border-radius: 4px;
  font-size: 1.5rem;
  color: #e65100;
}

.step-card {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
  background: #fff;
}

.badge {
  display: inline-block;
  background: #ffcc80;
  color: #e65100;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: bold;
  margin-bottom: 15px;
}

.question-block {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px dashed #eee;
}
.question-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.q-label {
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

/* ますと水 */
.interactive-area {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  margin: 10px 0;
}

.cup-container {
  text-align: center;
}

.cup {
  width: 100px;
  height: 120px;
  border: 3px solid #424242;
  border-top: none;
  position: relative;
  background: #fff;
  margin: 0 auto;
}

.water {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(64, 196, 255, 0.7);
  transition: height 0.3s ease-in-out;
  pointer-events: none; /* 水自体はクリックを邪魔しない */
}

.grid-line {
  position: absolute;
  width: 100%;
  border-top: 1px dashed #9e9e9e;
  z-index: 2;
  pointer-events: none;
}
.grid-line.bold {
  border-top: 1px solid #424242;
}

/* クリックできるますのスタイル */
.clickable-cup {
  cursor: pointer;
  background: #f9f9f9;
}
.clickable-cup:hover {
  box-shadow: 0 0 10px rgba(64, 196, 255, 0.5);
}
.clickable-cup.correct {
  border-color: #4caf50;
  background: #e8f5e9;
}
.clickable-cup.incorrect {
  border-color: #f44336;
  background: #ffebee;
}

.hint-text-inline {
  color: #e91e63;
  font-weight: bold;
  font-size: 0.9rem;
}

/* 入力とボタン */
.input-group {
  margin: 10px 0;
  font-size: 1.1rem;
  font-weight: bold;
}

.ans-input {
  width: 60px;
  font-size: 1.1rem;
  text-align: center;
  padding: 5px;
  border: 2px solid #ccc;
  border-radius: 5px;
  font-family: inherit;
  margin: 0 5px;
}

.ans-input.text-ans {
  width: 120px;
}

.ans-input.correct {
  background-color: #e8f5e9;
  border-color: #4caf50;
  color: #2e7d32;
}
.ans-input.incorrect {
  background-color: #ffebee;
  border-color: #f44336;
  color: #c62828;
}

.hint-btn {
  background: #fff59d;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  color: #f57f17;
  transition: 0.2s;
}
.hint-btn:hover { background: #fff176; }

.hint-box {
  background: #e8f5e9;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-weight: bold;
  color: #2e7d32;
  border-left: 4px solid #4caf50;
}

.unit-questions p { margin: 10px 0; }

.important-box {
  border: 2px solid #ffca28;
  background: #fff8e1;
  padding: 15px;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: bold;
  margin-top: 20px;
}

.box-empty {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid #f06292;
  vertical-align: middle;
}

/* 練習5：分類 */
.number-list {
  font-size: 1.3rem;
  font-weight: bold;
  text-align: center;
  background: #e0f7fa;
  padding: 10px;
  border-radius: 8px;
}

.categorize-area {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}
.category-box {
  flex: 1;
  background: #f5f5f5;
  border: 2px dashed #bdbdbd;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
}
.category-box h3 {
  margin-top: 0;
  color: #3f51b5;
}

/* 仕上げボタン */
.finish-area { text-align: center; margin-top: 40px; }

.check-all-btn {
  background: #ff4081;
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 1.3rem;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 4px 0 #c51162;
  transition: transform 0.1s;
}
.check-all-btn:active {
  transform: translateY(4px);
  box-shadow: none;
}

.final-message {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 20px;
  min-height: 30px;
}