/* Premium, turn-aware Roll Dice button for BOTH games.
   Green only while the local player may roll; quiet dark glass otherwise.
   The numeric dice value is no longer printed inside the button. */
#rollBtn.roll-button,
#roll.roll {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .02em;
  color: #e9e4d2 !important;
  background: linear-gradient(152deg, #2c3b33 0%, #1b2620 58%, #151e1a 100%) !important;
  border: 1px solid #ffffff26 !important;
  box-shadow: inset 0 1px 0 #ffffff1f, 0 6px 18px #0000003d !important;
  transition: background .25s ease, box-shadow .25s ease, color .25s ease, border-color .25s ease, transform .16s ease;
}

#rollBtn.roll-button::after,
#roll.roll::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 30%, #ffffff1c 47%, transparent 64%);
  pointer-events: none;
}

#rollBtn.roll-button:hover:not(:disabled),
#roll.roll:hover:not(:disabled) { transform: translateY(-1px); }

#rollBtn.roll-button:disabled,
#roll.roll:disabled {
  opacity: .62;
  color: #cdc8b7 !important;
  background: linear-gradient(152deg, #26332c 0%, #18211c 60%, #131b17 100%) !important;
}

/* ---- The player's own turn: RED call-to-action ---- */
#rollBtn.roll-button.is-my-turn,
#roll.roll.is-my-turn {
  color: #fff4f2 !important;
  background: linear-gradient(152deg, #ff5a64 0%, #dd1f2b 52%, #9e0f19 100%) !important;
  border: 1px solid #ffb9b0 !important;
  box-shadow: inset 0 1px 0 #ffffff66, 0 0 0 1px #d92c37, 0 10px 26px #b81e2a5c !important;
  animation: dbRollGlow 2.6s ease-in-out infinite;
}

#rollBtn.roll-button.is-my-turn:hover:not(:disabled),
#roll.roll.is-my-turn:hover:not(:disabled) {
  background: linear-gradient(152deg, #ff707a 0%, #ef2c38 52%, #ad111c 100%) !important;
}

@keyframes dbRollGlow {
  0%, 100% { box-shadow: inset 0 1px 0 #ffffff66, 0 0 0 1px #d92c37, 0 8px 20px #b81e2a42; }
  50% { box-shadow: inset 0 1px 0 #ffffff7a, 0 0 0 1px #ff6b74, 0 10px 30px #b81e2a85; }
}

/* The dice number inside the button is intentionally hidden. */
#diceValue[hidden],
#diceResult[hidden] { display: none !important; }

#rollBtn.roll-button span:empty,
#roll.roll span:empty { display: none !important; }

@media (max-width: 680px) {
  #rollBtn.roll-button,
  #roll.roll { padding: 12px 16px; min-height: 46px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  #rollBtn.roll-button.is-my-turn,
  #roll.roll.is-my-turn { animation: none !important; }
  #rollBtn.roll-button,
  #roll.roll { transition: none !important; }
}
