:root {
  --padding:20px
}
html,body{overflow-x:hidden;max-width:100vw}
@media screen and (max-width:979px) {
  :root { --padding:12px }
}

.diceRand{
  grid-gap:10px;
  display:grid;
  grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr;
  position:relative;
  align-items:center;
  user-select:none;
}
.diceRand span{
  background:var(--main-gradient);
  height:70px;
  width:100%;
  border-radius:15px;
  position:relative;
}
.diceRand span a{
  position:absolute;
  right:0;left:0;top:50%;
  transform:translateY(-50%);
  width:100%;
  margin:0 auto;
  text-align:center;
  font-size:24px;
  color:#fff !important;
}
@media (max-width:600px){
  .diceRand span { height:55px }
}

.dice {
  background:var(--bg-card);
  border-radius:12px;
  display:flex;
  margin-bottom:20px;
  overflow:hidden;
  border:1px solid var(--border);
}
.livefeed{max-height:220px;overflow-y:auto;width:100%}
#livegames{max-height:200px;overflow-y:auto}

@media screen and (max-width:960px){
  .dice { display:grid!important }
  .dice_sidebar { width:100%!important }
  .infoButton { position:relative!important;width:100%!important;margin-top:-10px!important }
}

.dice .bt{
  align-items:center;
  background:transparent;
  border:0;
  border-radius:4px;
  color:inherit;
  cursor:pointer;
  display:flex;
  font-family:inherit;
  font-size:inherit;
  gap:4px;
  justify-content:center;
  line-height:1.2;
  outline:none;
  padding:0;
  transition:.3s
}
.dice .bt.disabled,.dice .bt:disabled{pointer-events:none}
.dice .bt-primary{
  background:var(--main-gradient);
  border-radius:6px;
  color:#fff;
  font-weight:600;
  padding:12px
}
.dice .bt-primary:hover{filter:brightness(1.1)}
.dice .bt-orange{
  background:var(--main-gradient);
  border-radius:6px;
  color:#000;
  font-weight:600;
  padding:12px
}
.dice .bt-orange:hover{filter:brightness(1.1)}
.dice .bt-transparent{
  background:transparent;
  border-radius:6px;
  color:var(--text-secondary);
  font-weight:600;
  padding:0 12px
}
.dice .bt-light,.dice .bt-transparent:hover{
  background:var(--surface-hover)
}
.dice .bt-light{
  border-radius:6px;
  color:var(--text-secondary);
  font-weight:600;
  padding:0 12px;
  background:var(--bg-hover);
  text-decoration:none;
}
.dice .bt-light:hover{background:var(--surface-hover)}
.dice .bt-light-gradient{
  background:var(--bg-elevated);
  border-radius:6px;
  color:var(--text-secondary);
  font-weight:600;
  padding:0 12px;
  position:relative
}
.dice .bt-light-gradient span{position:relative}
.dice .bt-light-gradient:before{
  background:var(--main-gradient);
  border-radius:inherit;
  bottom:0;
  content:"";
  display:block;
  left:0;
  opacity:0;
  position:absolute;
  right:0;
  top:0;
  transition:.3s
}
.dice .bt-light-gradient:hover{color:#fff!important}
.dice .bt-light-gradient:hover:before{opacity:1}
.dice .bt-light-gradient.active{color:#fff}
.dice .bt-light-gradient.active:before{opacity:1}
.dice .input_gradient{
  flex-grow:1;
  position:relative
}
.dice .input_gradient input,.dice .input_gradient textarea{
  border:none;
  border-radius:6px;
  position:relative;
  width:100%;
  z-index:1
}
.dice .input_gradient input~span,.dice .input_gradient textarea~span{
  background:var(--main-gradient);
  border-radius:6px;
  bottom:-1px;
  left:-1px;
  opacity:0;
  position:absolute;
  right:-1px;
  top:-1px;
  transition:.3s
}
.dice .input_gradient input:focus,.dice .input_gradient textarea:focus{box-shadow:0 0 0 1px transparent}
.dice .input_gradient input:focus~span,.dice .input_gradient textarea:focus~span{opacity:1}

.dice_sidebar{
  background:var(--bg-elevated);
  border-radius:10px;
  display:flex;
  flex-direction:column;
  gap:var(--padding);
  min-width:350px;
  padding:var(--padding);
  width:350px
}
.dice_sidebar_field{font-size:14px}
.dice_sidebar_field__header{
  color:var(--text-muted)!important;
  margin-bottom:10px;
  align-items:center;
  display:flex;
  font-weight:500;
  justify-content:space-between
}
.dice_sidebar_field__body{
  background:var(--bg-secondary);
  border-radius:6px;
  display:flex;
  gap:6px;
  justify-content:space-between;
  padding:8px
}
.dice_sidebar_field__body button,.dice_sidebar_field__body input{height:40px}
.dice_sidebar_field__body input{
  background:var(--bg-card);
  color:#fff !important;
  outline:none;
  border:none !important;
  font-weight:600;
  max-width:130px;
  padding:12px;
  width:100%;
  border-radius:6px
}
.dice_sidebar-toolbar_btn{
  background:var(--main-gradient);
  border-radius:6px;
  outline:none;
  border:none;
  color:#fff;
  font-size:15px;
  font-weight:500;
  min-width:44px;
  width:44px;
}
.dice_sidebar-toolbar_btn:hover{opacity:0.8}
.dice_sidebar-toolbar input{
  border-radius:6px;
  font-size:16px;
  max-width:none;
  text-align:center;
  width:100%
}
.dice_sidebar-btns{
  display:grid;
  gap:var(--padding)
}
.dice_sidebar-btns a,.dice_sidebar-btns button{
  font-size:16px;
  height:42px;
  width:100%
}
.dice_sidebar-btns .onmob{display:none}
.dice_sidebar-header{
  align-items:center;
  display:flex;
  font-weight:600;
  gap:8px;
  background:linear-gradient(135deg, rgba(var(--accent-rgb),0.08), transparent);
  padding:10px 14px;
  border-radius:10px;
  width:fit-content;
  border:1px solid rgba(var(--accent-rgb),0.06)
}
.dice_sidebar-header .icon-gradient{
  align-items:center;
  background:var(--main-gradient);
  border-radius:10px;
  color:#fff;
  display:flex;
  height:32px;
  justify-content:center;
  width:32px;
  padding:5px;
}
.dice_sidebar-footer{margin-top:auto}
.dice_sidebar-footer .onmob{display:none}
.dice_sidebar-footer .bt{height:42px}
.dice_sidebar-hash{
  display:flex;
  font-size:12px;
  font-weight:500;
  gap:4px;
  overflow:hidden;
  white-space:nowrap;
  width:100%;
  margin-bottom:0;
  color:var(--text-muted);
  opacity:0.4
}
.dice_sidebar-hash span{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.dice_main{flex-grow:1;overflow:hidden}
.dice-game{
  display:grid;
  gap:var(--padding);
  margin:auto;
  max-width:500px;
  padding:40px 12px;
  position:relative
}
.dice-game_score{
  background:var(--bg-elevated);
  border-radius:12px;
  color:var(--text-muted);
  font-weight:600;
  padding:var(--padding);
  position:relative;
  text-align:center;
  z-index:1;
  border:1px solid var(--border)
}
.dice-game_score_num{
  align-items:center;
  color:var(--text-secondary);
  display:flex;
  font-size:50px;
  justify-content:center;
  line-height:1;
  margin-bottom:14px;
  z-index:1
}
.dice-game_score_num p{font-size:.9em;margin-top:5px}
.dice-game_bet{
  display:grid;
  gap:10px;
  grid-template-columns:repeat(2,1fr)
}
.dice-game_bet__item{
  display:grid;
  font-size:16px;
  font-weight:500;
  gap:12px;
  text-align:center;
  text-overflow:ellipsis;
  white-space:nowrap
}
.dice-game_bet__item-info{
  background:var(--bg-elevated);
  color:var(--text-muted);
  height:42px;
  align-items:center;
  border-radius:6px;
  display:flex;
  justify-content:center;
  border:1px solid var(--border)
}
.dice-game_bet__item-btn{
  align-items:center;
  background:var(--main-gradient);
  border-radius:6px;
  color:#000;
  font-weight:600;
  height:54px;
  justify-content:center;
  letter-spacing:.03em;
  position:relative;
  transition:.3s;
  width:100%;
  display:flex;
  font-size:inherit
}
.dice-game_bet__item-btn span{position:relative}
.dice-game_bet__item-btn:before{
  background:var(--main-gradient);
  border-radius:6px;
  bottom:0;
  content:"";
  display:block;
  left:0;
  opacity:0;
  position:absolute;
  right:0;
  top:0;
  transition:.3s
}
.dice-game_bet__item-btn:hover{
  box-shadow:0 8px 25px rgba(var(--accent-rgb),0.3);
  color:#fff
}
.dice-game_bet__item-btn:hover:before{opacity:1}
.dice-game_pending.bt{
  background:var(--bg-hover);
  height:42px
}
.dice-game_pending.bt .i-loading{
  animation:rotate 1.2s linear infinite;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 12c0 6.627-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0s12 5.373 12 12ZM3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0Z' fill='url(%23a)' fill-opacity='.2'/%3E%3Cpath d='M22.5 12c.828 0 1.51.674 1.406 1.496A11.999 11.999 0 1 1 10.504.094C11.326-.01 12 .672 12 1.5s-.676 1.487-1.493 1.625a9 9 0 1 0 10.368 10.368c.138-.817.797-1.493 1.625-1.493Z' fill='url(%23b)'/%3E%3Cdefs%3E%3ClinearGradient id='a' x1='.014' y1='12' x2='24.014' y2='12' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23e1a337'/%3E%3Cstop offset='.771' stop-color='%23facc15'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='.014' y1='12' x2='24.014' y2='12' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23e1a337'/%3E%3Cstop offset='.771' stop-color='%23facc15'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E");
  border-radius:24px;
  color:inherit;
  display:inline-block;
  height:24px;
  min-width:24px;
  position:relative;
  width:24px
}
.dice-game_result{height:92px}
.dice-game_result .onmob{display:none}
.dice-game_result_wrap{display:grid;gap:8px}
.dice-game_result .bt{font-weight:600;gap:8px;height:42px}
.dice-game_result__win{
  background:linear-gradient(0deg,#4caf50,#2e7d32)!important;
  color:#fff!important
}
.dice-game_result__lose{
  background:linear-gradient(0deg,#f44336,#c62828)!important;
  color:#fff!important
}

@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}

@media screen and (max-width:979px){
  .dice_sidebar{min-width:300px;width:300px}
}
@media screen and (max-width:760px) and (orientation:portrait){
  .dice{flex-wrap:wrap;position:relative}
  .dice_sidebar{display:flex;flex-wrap:wrap;min-width:100%;order:1;width:100%}
  .dice_sidebar-header{left:0;padding:var(--padding);position:absolute;top:0}
  .dice_sidebar-header .icon-gradient{height:24px;width:24px}
  .dice_sidebar-header .icon-gradient svg{height:16px!important;width:16px!important}
  .dice_sidebar_field{width:100%}
  .dice_sidebar-toolbar input{max-width:none}
  .dice_sidebar-btns{display:none;flex-wrap:wrap;order:-1;width:100%}
  .dice_sidebar-btns button{padding:4px 8px;width:auto}
  .dice_sidebar-btns a{display:none}
  .dice_sidebar-btns .onmob{display:block}
  .dice_sidebar-btns .ondesk{display:none}
  .dice_sidebar-btns .bt-primary{flex-grow:1;order:-1}
  .dice_sidebar-btns .bt-orange{min-width:100px;width:100px}
  .dice_sidebar-hash{color:var(--text-muted);display:block;font-size:14px}
  .dice_sidebar-hash span{background:var(--bg-hover);border-radius:6px;display:block;margin:8px 0;padding:12px;text-overflow:clip;white-space:normal;word-break:break-word}
  .dice_sidebar-footer{width:100%}
  .dice-game,.dice_sidebar-footer .onmob{display:flex}
  .dice-game{flex-wrap:wrap;gap:0;padding:56px 12px 12px}
  .dice-game_score{margin-bottom:12px;width:100%}
  .dice-game_score_num{font-size:30px;margin-bottom:4px}
  .dice-game_score_num p{margin-bottom:1px}
  .dice-game_pending{margin-top:12px}
  .dice-game_result{height:auto;width:100%}
  .dice-game_result_wrap{display:flex;padding-top:12px}
  .dice-game_result .fg{flex-grow:1}
  .dice-game_result .bt-transparent{background:var(--bg-hover);border-radius:6px}
  .dice-game_result .ondesk{display:none}
  .dice-game_result .onmob{display:block}
  .dice-game_bet{width:100%}
}
@media only screen and (min-width:480px) and (max-width:979px) and (orientation:landscape){
  .dice_sidebar{gap:6px}
  .dice_sidebar_field__header{display:none}
  .dice_sidebar-btns{gap:inherit}
  .dice-game{display:flex;flex-wrap:wrap;gap:0;padding:12px}
  .dice-game_score{margin-bottom:4px;width:100%}
  .dice-game_score_num{font-size:30px;margin-bottom:4px}
  .dice-game_score_num p{margin-bottom:1px}
  .dice-game_pending{margin-top:4px}
  .dice-game_result{height:auto;width:100%}
  .dice-game_result_wrap{display:flex;gap:4px;padding-top:4px}
  .dice-game_result .fg{flex-grow:1}
  .dice-game_result .bt-transparent{background:var(--bg-hover);border-radius:6px}
  .dice-game_result .ondesk{display:none}
  .dice-game_result .onmob{display:block}
  .dice-game_bet{gap:4px;width:100%}
  .dice-game_bet__item{gap:4px}
}

.game-wrap{display:contents}

@media (max-width:768px){
  .dice{display:flex!important;flex-direction:column;gap:0}
  .dice_sidebar{order:2!important;width:100%!important;min-width:unset!important;max-width:none!important;padding:6px!important;gap:4px!important;max-height:none;overflow:visible;border-radius:0!important;flex-shrink:0}
  .dice > *:not(.dice_sidebar){order:1}
  .game-wrap{display:flex;flex-direction:column}
  .game-wrap > .dice{order:2}
  .game-wrap > .dice_main{order:1}
  .dice_sidebar-header{padding:6px 10px!important;margin-bottom:0}
  .dice_sidebar-header .icon-gradient{height:28px!important;width:28px!important}
  .dice_sidebar-header .icon-gradient svg{width:15px!important;height:15px!important}
  .dice_sidebar_field{margin:0 4px!important;padding:0!important}
  .dice_sidebar_field__header{margin-bottom:0!important;padding:4px 8px 0!important;font-size:10px!important}
  .dice_sidebar_field__body{padding:4px!important;gap:4px!important}
  .dice_sidebar_field__body button{height:40px!important;padding:0 10px!important;font-size:13px!important}
  .dice_sidebar_field__body input{height:40px!important;font-size:14px!important;padding:4px 6px!important;max-width:none!important}
  .dice_sidebar_field__body .input_gradient{min-width:0!important}
  .dice_sidebar-btns{padding:2px 4px 4px!important;gap:4px!important}
  .dice_sidebar-btns button{height:44px!important;font-size:14px!important}
  .dice_main{flex:1 1 auto!important;min-height:300px!important;overflow-y:auto!important}
  .dice_main > div{padding-top:8px!important;padding-bottom:8px!important}
  .container{padding:0 4px!important}
  .game-wrap{gap:0!important}
  .dice-game{padding:12px!important;gap:8px!important}
  .dice-game_score_num{font-size:32px!important;margin-bottom:6px!important}
  .dice-game_bet{gap:6px!important}
  .dice-game_bet__item{gap:6px!important}
  .dice-game_bet__item-btn{height:42px!important}
  .dice-game_bet__item-info{height:36px!important;font-size:13px!important}
  .dice-game_result .bt{height:40px!important}
}

.game-win-glow{box-shadow:0 0 40px rgba(76,175,80,0.4);transition:box-shadow .3s}
.game-lose-shake{animation:loseShake .5s ease-in-out}
@keyframes loseShake{
  0%,100%{transform:translateX(0)}
  10%{transform:translateX(-6px) rotate(-1deg)}
  30%{transform:translateX(6px) rotate(1deg)}
  50%{transform:translateX(-3px)}
  70%{transform:translateX(3px)}
}
@keyframes winPop{
  0%{transform:scale(0.3);opacity:0}
  60%{transform:scale(1.15);opacity:1}
  100%{transform:scale(1);opacity:1}
}
.win-pop{animation:winPop .5s ease-out}
.balance-flash-win{animation:flashGreen .4s ease-out}
@keyframes flashGreen{
  0%{color:#4caf50;transform:scale(1.1)}
  100%{color:inherit;transform:scale(1)}
}
.balance-flash-lose{animation:flashRed .4s ease-out}
@keyframes flashRed{
  0%{color:#f44336;transform:scale(1.1)}
  100%{color:inherit;transform:scale(1)}
}

@media screen and (max-width:768px){
  .crash-rocket-area{flex-direction:column!important}
  .crash-rocket-col .rocket-img{width:160px!important}
  .crash-multiplier{font-size:48px!important}
  .crash-canvas-wrap{min-height:280px!important}
  .game-wrap{gap:8px!important}
  .dice_main{min-height:300px!important;overflow-y:auto!important}
}
@media screen and (max-width:480px){
  .crash-rocket-col .rocket-img{width:110px!important}
  .crash-multiplier{font-size:32px!important}
  .crash-sidebar{width:100%!important}
  .crash-wrap{flex-direction:column!important}
}

.buttonProject{
  background:var(--bg-hover);
  color:var(--text-primary);
  border:1px solid var(--border);
  border-radius:6px;
  padding:10px 20px;
  font-weight:600;
  font-size:14px;
  cursor:pointer;
  transition:all .2s;
  font-family:inherit;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px
}
.buttonProject:hover{
  background:var(--surface-hover);
  border-color:rgba(var(--accent-rgb),0.3);
  color:var(--gold-light)
}
.buttonProject:active{transform:scale(0.98)}