/* math-game.css */

.math-container {
  max-width: 720px;
  box-sizing: border-box;
  text-align: center;
}

.math-board {
  width: 100%;
  height: auto;
  min-height: 300px;
  padding: 20px;
  box-sizing: border-box;
  background-color: var(--game-bg-color);
  border: 2px solid var(--game-grid-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.game-info {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 1rem;
  padding: 0 20px;
  box-sizing: border-box;
}

.info-box {
  font-size: 1.5rem;
  color: var(--text-color);
}


#problem {
  font-size: 3rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.dot-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 0 1rem;
}

.dot {
  font-size: 2.5rem;
  color: var(--text-color);
  margin: 0.2rem;
}

.emphasized-dot {
  color: var(--accent-color); /* or any other distinct color */
}

.operator {
  font-size: 3rem;
  color: var(--accent-color);
  margin: 0 1rem;
}

#answer-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 2rem;
}

.btn-answer {
  width: 60px;
  height: 60px;
  font-size: 2rem;
  font-family: 'DungGeunMo', sans-serif;
  background-color: var(--panel-color);
  color: var(--text-color);
  border: 2px solid var(--game-grid-color);
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.btn-answer:hover {
  background-color: var(--accent-color);
}

.btn-answer:active {
  transform: scale(0.95);
}

.game-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 2rem auto;
  min-height: 340px; /* math-board의 min-height + padding */
}

.start-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
  border-radius: 12px;
  color: var(--text-color);
  text-align: center;
}

.start-overlay h2 {
  margin-bottom: 1rem;
  font-size: 2rem;
  color: var(--title-color); /* Changed from #ffeb3b to variable */
}

#winOverlay {
  justify-content: center;
}

#winOverlay h2 {
  margin-bottom: 2rem;
  transform: translateY(-160%);
  color: var(--title-color); /* Added variable */
}

/* Light mode override for overlays */
body.light-mode .start-overlay {
  background: rgba(255, 255, 255, 0.95);
}
