/*
 * apps/dice.css
 * "🎲 주사위 굴리기" 카드 전용 스타일. (.count-btn 공용 버튼은 css/style.css 참고)
 */

.dice-count-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.dice-count-row .count-btn {
  width: auto;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
}

.dice-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 22px 0;
}

.die {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-card-hover);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 10px;
  box-sizing: border-box;
}

.die.is-rolling {
  animation: dice-shake 0.12s linear infinite;
}

@keyframes dice-shake {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
  100% { transform: rotate(0deg); }
}

.die-pip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary-dark);
  justify-self: center;
  align-self: center;
  opacity: 0;
}

.die-pip.is-on {
  opacity: 1;
}

.dice-sum {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-sub);
  margin: 0 0 4px;
}

.dice-sum .dice-sum-value {
  color: var(--color-primary-dark);
  font-size: 20px;
  font-weight: 800;
}

@media (max-width: 560px) {
  .die {
    width: 54px;
    height: 54px;
    padding: 8px;
  }

  .die-pip {
    width: 8px;
    height: 8px;
  }
}
