#buttonDicePvp .event_button_text {
  left: 1px !important;
  top: 66px !important;
  bottom: auto !important;
  width: 82px !important;
  height: auto !important;
  min-height: 17px !important;
  padding: 1px 4px 2px !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(89, 239, 255, .95) !important;
  border-radius: 5px !important;
  background: linear-gradient(180deg, rgba(4, 39, 48, .92), rgba(4, 7, 16, .96)) !important;
  box-shadow: 0 0 8px rgba(34, 232, 255, .55), inset 0 0 7px rgba(128, 248, 255, .18) !important;
  color: #bffcff !important;
  font: inherit !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 12px !important;
  text-align: center !important;
  text-shadow: 0 0 5px #000, 0 1px 0 #000 !important;
  white-space: nowrap !important;
}

#chargeWindow.dicePvpEventWindow {
  box-sizing: border-box !important;
  width: min(96vw, 860px) !important;
  height: min(92vh, 805px) !important;
  max-width: 96vw !important;
  max-height: 92vh !important;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  overflow: hidden !important;
}

#chargeWindow.dicePvpEventWindow #chargeWindowPayment {
  box-sizing: border-box !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

#chargeWindow.dicePvpEventWindow #chargeWindowClose {
  top: 8px !important;
  right: 8px !important;
  z-index: 9999 !important;
}

.diceIdentity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 18px;
  white-space: nowrap;
}

.diceRank {
  display: inline-block;
  flex: 0 0 24px;
  width: 24px;
  height: 18px;
  transform: scale(.78);
  transform-origin: center;
  overflow: hidden;
}

.diceGuild {
  flex: 0 1 auto;
  max-width: 90px;
  overflow: hidden;
  color: #ffe86a;
  text-overflow: ellipsis;
  text-shadow: 0 0 7px rgba(255, 225, 70, .75), 0 2px 2px #000;
}

.diceGuild::before { content: "["; }
.diceGuild::after { content: "]"; }

.diceUsername {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  text-shadow: 0 0 7px rgba(0, 238, 255, .5), 0 2px 2px #000;
}

.diceIdentityWaiting { color: #9beef2; }

.diceOpenRow .diceIdentity {
  justify-content: flex-start;
  margin-bottom: 2px;
}

.diceBalanceCard {
  width: min(360px, 92%);
  margin: 12px auto 4px;
  padding: 10px 16px;
  box-sizing: border-box;
  border: 1px solid rgba(45, 232, 244, .58);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(9, 44, 67, .96), rgba(2, 10, 22, .98));
  box-shadow: inset 0 1px rgba(255, 255, 255, .13), 0 0 15px rgba(0, 220, 255, .2);
  text-align: center;
}

.diceBalanceTitle {
  margin-bottom: 5px;
  color: #9ffff8;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 0 8px #00eaff;
}

.diceBalanceValues {
  display: flex;
  justify-content: center;
  gap: 18px;
  color: #eaffff;
  font-size: 14px;
  font-weight: 900;
}

.diceBalanceValues b {
  color: #ffe86a;
  text-shadow: 0 0 7px #d99c00;
}

.diceRefresh {
  margin-left: 8px;
  padding: 3px 8px;
  border: 1px solid rgba(76, 239, 255, .75);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(0, 73, 90, .95), rgba(1, 20, 34, .98));
  color: #dfffff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 225, 255, .28);
}

.diceRefresh:disabled { opacity: .65; cursor: wait; }

#chargeWindow.dicePvpEventWindow .diceWrap { position: relative; }

.diceResultWin {
  border-color: #4cff91 !important;
  background: linear-gradient(90deg, rgba(0, 68, 31, .92), rgba(3, 122, 58, .82), rgba(0, 68, 31, .92)) !important;
  color: #caffdc !important;
  box-shadow: 0 0 20px rgba(43, 255, 126, .55), inset 0 0 15px rgba(75, 255, 141, .18) !important;
  text-shadow: 0 0 10px #00ff6a, 0 2px 2px #001b0b !important;
}

.diceResultLose {
  border-color: #ff4a55 !important;
  background: linear-gradient(90deg, rgba(83, 0, 8, .94), rgba(155, 6, 22, .84), rgba(83, 0, 8, .94)) !important;
  color: #ffd4d7 !important;
  box-shadow: 0 0 20px rgba(255, 39, 55, .58), inset 0 0 15px rgba(255, 80, 91, .2) !important;
  text-shadow: 0 0 10px #ff2639, 0 2px 2px #260006 !important;
}

.diceOutcomeSplash {
  position: absolute;
  z-index: 80;
  left: 50%;
  top: 48%;
  width: min(500px, 82%);
  padding: 24px 28px;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  border: 2px solid;
  border-radius: 12px;
  text-align: center;
  pointer-events: none;
  backdrop-filter: blur(7px);
  animation: diceOutcomeEnter .32s ease-out, diceOutcomeLeave .45s ease-in 5s forwards;
}

.diceOutcomeWin {
  border-color: #55ff9b;
  background: radial-gradient(circle at 50% 0, rgba(29, 255, 119, .24), transparent 48%), rgba(0, 24, 13, .94);
  color: #d9ffe8;
  box-shadow: 0 0 32px rgba(32, 255, 119, .7), inset 0 0 24px rgba(30, 255, 117, .13);
}

.diceOutcomeLose {
  border-color: #ff4452;
  background: radial-gradient(circle at 50% 0, rgba(255, 44, 65, .26), transparent 48%), rgba(31, 0, 5, .95);
  color: #ffe3e5;
  box-shadow: 0 0 32px rgba(255, 31, 51, .72), inset 0 0 24px rgba(255, 50, 68, .14);
}

.diceOutcomeTitle {
  font-size: clamp(27px, 4vw, 40px);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.diceOutcomeWin .diceOutcomeTitle { color: #68ffa5; text-shadow: 0 0 14px #00ff6a, 0 3px 0 #003317; }
.diceOutcomeLose .diceOutcomeTitle { color: #ff5965; text-shadow: 0 0 14px #ff162b, 0 3px 0 #450008; }
.diceOutcomeSplash p { margin: 12px 0 6px; font-size: 17px; font-weight: 900; }
.diceOutcomeSplash small { display: block; color: #d8faff; font-size: 12px; font-weight: 800; }
.diceOutcomeSplash em { display: block; margin-top: 8px; color: #ffb6bb; font-size: 13px; font-style: normal; font-weight: 900; }

#chargeWindow.dicePvpEventWindow .diceFace {
  width: 190px;
  height: 142px;
  min-height: 142px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-shadow: none;
  perspective: 600px;
}

.diceVisual {
  position: relative;
  display: inline-block;
  width: 138px;
  height: 138px;
  flex: 0 0 138px;
  background: url(/static/images/dice_game_shell.png) center/contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(0, 225, 255, .72));
  transform-origin: 50% 55%;
}

.diceNumber {
  position: absolute;
  left: 39%;
  top: 51%;
  transform: translate(-50%, -50%);
  min-width: 58px;
  color: #fff176;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 35px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 0 7px #ffb600, 0 0 14px rgba(255, 232, 70, .9), 0 3px 2px #091522;
}

.dicePair {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 190px;
  height: 142px;
  gap: 0;
}

.dicePair .diceVisual {
  width: 100px;
  height: 100px;
  flex-basis: 100px;
  margin: 0 -4px;
}

.dicePair .diceNumber { min-width: 42px; font-size: 27px; }

.dicePair .dicePlus {
  position: relative;
  z-index: 4;
  flex: 0 0 22px;
  margin: 0 -8px;
  color: #fff176;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 7px #ffb600, 0 0 14px rgba(255, 232, 70, .9), 0 3px 2px #091522;
}

.dicePair strong {
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  padding: 2px 8px;
  border: 1px solid rgba(255, 232, 106, .72);
  border-radius: 999px;
  background: rgba(2, 12, 24, .94);
  color: #fff18a;
  font-size: 18px;
  line-height: 20px;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(255, 202, 40, .35);
  text-shadow: 0 0 7px #ffb800;
}

#chargeWindow.dicePvpEventWindow .dicePlayers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

#chargeWindow.dicePvpEventWindow .dicePlayers3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#chargeWindow.dicePvpEventWindow .dicePlayers4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#chargeWindow.dicePvpEventWindow .dicePlayers5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

#chargeWindow.dicePvpEventWindow .dicePlayers4 .diceFace,
#chargeWindow.dicePvpEventWindow .dicePlayers5 .diceFace { width: 135px; height: 118px; min-height: 118px; }

.dicePlayers4 .diceVisual,
.dicePlayers5 .diceVisual { width: 108px; height: 108px; flex-basis: 108px; }

.dicePlayers4 .dicePair,
.dicePlayers5 .dicePair { width: 135px; height: 116px; }

.dicePlayers4 .dicePair .diceVisual,
.dicePlayers5 .dicePair .diceVisual { width: 72px; height: 72px; flex-basis: 72px; }

.dicePlayers4 .dicePair .diceNumber,
.dicePlayers5 .dicePair .diceNumber { min-width: 34px; font-size: 22px; }

.dicePlayers4 .dicePair .dicePlus,
.dicePlayers5 .dicePair .dicePlus { flex-basis: 16px; margin: 0 -6px; font-size: 21px; }

.diceRolling .diceVisual {
  animation: diceShellRoll var(--dice-roll-speed, .36s) linear infinite;
  filter: drop-shadow(0 0 17px rgba(0, 242, 255, .98)) brightness(1.18);
}

.diceRolling .dicePair .diceVisual:last-of-type { animation-direction: reverse; animation-delay: -.13s; }
.diceRolling .diceNumber { animation: diceNumberPulse .18s ease-in-out infinite alternate; }
.diceLanded .diceVisual { animation: diceShellLand .55s cubic-bezier(.18,.88,.28,1.35); }

@keyframes diceShellRoll {
  0% { transform: translateY(1px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(.92); }
  25% { transform: translateY(-11px) rotateX(90deg) rotateY(115deg) rotateZ(24deg) scale(1.04); }
  50% { transform: translateY(2px) rotateX(180deg) rotateY(230deg) rotateZ(48deg) scale(.94); }
  75% { transform: translateY(-8px) rotateX(270deg) rotateY(345deg) rotateZ(72deg) scale(1.03); }
  100% { transform: translateY(1px) rotateX(360deg) rotateY(460deg) rotateZ(96deg) scale(.92); }
}

@keyframes diceNumberPulse {
  from { opacity: .55; filter: blur(1px); }
  to { opacity: 1; filter: blur(0); }
}

@keyframes diceShellLand {
  0% { transform: translateY(-18px) rotateZ(-10deg) scale(1.08); filter: brightness(1.55); }
  45% { transform: translateY(6px) rotateZ(5deg) scale(.94); }
  70% { transform: translateY(-4px) rotateZ(-2deg) scale(1.03); }
  100% { transform: translateY(0) rotateZ(0) scale(1); filter: brightness(1); }
}

@keyframes diceOutcomeEnter {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.82); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes diceOutcomeLeave {
  to { opacity: 0; visibility: hidden; transform: translate(-50%, -54%) scale(.96); }
}

@media (max-width: 760px) {
  #chargeWindow.dicePvpEventWindow {
    width: 96vw !important;
    height: 88vh !important;
  }
  .diceBalanceValues { flex-direction: column; gap: 3px; }
  #chargeWindow.dicePvpEventWindow .diceFace { width: 150px; height: 118px; min-height: 118px; }
  .diceVisual { width: 116px; height: 116px; flex-basis: 116px; }
  .dicePair { width: 150px; height: 118px; }
  .dicePair .diceVisual { width: 80px; height: 80px; flex-basis: 80px; }
  #chargeWindow.dicePvpEventWindow .dicePlayers,
  #chargeWindow.dicePvpEventWindow .dicePlayers3,
  #chargeWindow.dicePvpEventWindow .dicePlayers4,
  #chargeWindow.dicePvpEventWindow .dicePlayers5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
