html {
  height: 100%;
}


html {
  height: 100%;
}
body {
  background:linear-gradient(0deg, #151a20 100%, #184378 16%);
    position: relative;
    width: 100vw;
    height: 100vh;
    width: 100dvw;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
}

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  position: fixed;
  width: 100%;
}

* {
  color: #fff;
}


.wrapper {
    aspect-ratio: 16 / 9;
    width: min(100vw, calc(100vh * (16 / 9)));
    height: min(100vh, calc(100vw * (9 / 16)));
    width: min(100dvw, calc(100dvh * (16 / 9)));
    height: min(100dvh, calc(100dvw * (9 / 16)));
    /* background: linear-gradient(180deg,rgb(10, 7, 1) 0%, rgb(158, 114, 20) 50%, rgb(190, 135, 25) 100%); */
    position: relative;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}



.wrapper video {
  /* aspect-ratio: 16/ 9; */
  width: 100%;
  height: 100%;
  /* background-color: rgb(28, 27, 27); */
 
}
/* HUD */

.hud {
  z-index: 1;
  position: absolute;
  bottom: 0;
  display: flex;
  padding-inline: 4px;
  padding-bottom: 1rem;
  /* gap: 4px; */
    flex-direction: row;
  box-sizing: border-box;
  width: 100%;
  justify-content: space-between;
  align-items:center;
  /* background: linear-gradient(rgba(21, 21, 21, 0) 0%, rgba(21, 21, 21, 0.75) 39.04%, rgb(21, 21, 21) 100%); */
  background: linear-gradient(180deg, #0000, #181818d9 45%, #181818d9 70%, #18181880);
}
.hud-panel {
  flex: 1;
  padding-block: 1rem;
  margin-inline: 4px;
}

.hud-panel:nth-child(2) {
 flex: 1.28;
  padding-inline: 4px;

}
.hud-panel > svg {
  width: 100%;
}


.hud svg text {
  font-family: var(--font-main);
}

.hud-panel:has(svg.betting) {
  perspective: 900px;
}
svg.betting{
  transition: all 1s ease-in-out;
}
svg.betting.disabled{
  transform: rotateX(30deg) scale(.9);
  bottom: -29px;
  position: relative;
  }

svg.roadmap {
  background: #fff;
  padding: 6px;
  box-sizing: border-box;
  border-radius: 4px;
}
svg.roadmap text{
  fill: black;
}
svg.roadmap .grid-line{
  /* stroke: rgba(179, 179, 179, 0.5);
  stroke-width: 0.05; */
  stroke-width: 0.15;
  stroke: #000;
}


.place-bet {
  cursor: pointer;
}
.place-bet:where(#player,#banker,#tie) text {
  /* font-family: var(--font-table) !important; */
}
.place-bet > :where(path,rect) {
  stroke-width: 1px;
  fill-opacity: .8; 
  stroke-linecap: round; 
  stroke-linejoin: round;
}
.place-bet:hover > :where(path,rect) {
  /* stroke: url(#blue-stroke) */
  stroke: #ffffffa1
}
.place-bet:hover > :where(text) {
  text-shadow: 0 0 10px #ffffff81;
}
.place-bet.hit rect{
  fill: url(#blue-light-on)
}
.place-bet-outline stop {
}

.chip:hover > :where(circle) {
  stroke: #fff;
}

.chip:hover > :where(text) {
  text-shadow: 0 0 10px #ffffff81;
}
.chip circle {
  opacity: .5;
}

.common-ui {
  /* position: absolute */
}
.common-ui > div{
  position: absolute;
  box-sizing: border-box;
}
.top-gradient {
    --rem-migration-size: 4.225px;
    --color: 0, 0, 0;
    background: linear-gradient(-11.3deg, #0000 73%, rgba(var(--color), .5) 89%), linear-gradient(11.3deg, #0000 73%, rgba(var(--color), .5) 89%);
    height: calc(var(--rem-migration-size) * 12.5);
    left: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 100%;
}
.top-left {
  left: 0;
  right: auto;
  top: 0;
}

.left {
  top: 53px;
  max-width: 200px;
  width: 100%;
}
.message-box {
  margin-left: .5rem;
  font-family: var(--font-main);
  display: grid;
  height: 70vh;
  grid-template-rows: auto 1fr 1fr;
  gap: 5px;
  max-width: 32vw;

}

.chat-form {
  background: #1a1a1a99;
  padding: 4px 20px;
  border: 1px solid #ffffff56;
  border-radius: 50px; 
  margin-bottom: 5px;
}
.chat-input {
  background: transparent;
  border: none;
  color: #ffffff9c;
  outline: none;
  font-size: clamp(9px, 1vw, 13px);
  font-size: clamp(9px, dvw, 13px);
  width: 100%;
}

.chats {
  font-family: var(--font-main);
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 2px;
  overflow: auto;
}
.chat-row {
  padding: 5px;
  border-radius: 4px;
  background:rgba(0, 0, 0, 0.6);
  line-height: 1
}
.chat-row.me {
  background: rgba(79, 79, 79, 0.6);
}
.chat-row .sender {
  color: yellow;
  font-size:7px;
  font-weight:400;
}
.chat-row.me .sender {
  color: #fff;
}
.chat-row .message {
  font-size:clamp(7px,1vw,9px);
  font-weight:500;
  max-width: 180px;
}

.game-messages {
  overflow: auto;
}

.gm-row {
  text-shadow: rgba(0, 0, 0, 0.6) 1px 1px 0px;
  font-size: clamp(9px,1vw,13px);
}
.gm-row .prize {
  color: yellow;
}

.top-right {
  left: auto;
  right: 0;
  top: 0;
}
.bottom-left {
  left: 0;
  right: auto;
  bottom: 0;
  z-index: 38;
}
.bottom-right {
    left: auto;
    right: 0;
    bottom: 0;
    z-index: 38;
}


.top-right-menu {
  display: flex;
  gap: 8px;
  margin: .5rem;
}


.top-right-menu a {
  --buttonSize: clamp(22px,3vw,38px);
    width: var(--buttonSize);
    height: var(--buttonSize);
    display: grid;
    place-items: center;
    border-radius: 5px;
    border-radius: 50%;
} 
.top-right-menu a:hover{
  background-color: #ffffff56;
}

.bottom-right-menu {
  display: flex;
  gap: 4px;
  padding: .5rem;
}


.top-left-menu {
  display: flex;
  align-items: center;
  padding: .5rem;
  gap: .5rem;
}


.bottom-right-menu a{
    /* width: var(--buttonSize);
    height: var(--buttonSize); */
    display: flex;
    border-radius: 50px;
    /* font-size: 14px; */
    background-color: #0606066b;
    padding: 6px 1.2rem;
    font-family: var(--font-main);
    gap: 4px;
    align-items: center;
} 


.common-btn {
  font-weight: 500;
  /* text-transform: uppercase; */
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background-color: #0606066b;
  background-color: #1a1a1a99;
  background-color: #1a1a1a99;
  font-size: clamp(10px,1.4vw,14px);
  font-size: clamp(10px,1.4dvw,14px);
  font-weight: 500;
  min-height: 24px;
  
}
.common-btn:hover{
  background-color: #ffffff56;
}

.common-btn.wallet-data   {
  display: grid;
  line-height: 1;
  font-weight: 500;
  place-items: center;
  line-height: 0.7;
  text-shadow: rgba(0, 0, 0, 0.6) 1px 1px 0px;

}
.common-btn.wallet-data :nth-child(1)  {
  font-size: clamp(6px,1vw,10px);

  font-weight: 700;

}
.common-btn.wallet-data :nth-child(2)  {
  color: #fbdc01;
  font-size: clamp(12px,1.4vw,14px);
  font-weight: 500;
}

.circle-button {
  --buttonSize: clamp(22px,3vw,38px);
    border-radius: 50%;
    width: var(--buttonSize);
    height: var(--buttonSize);
    display: grid;
    place-items: center;
    font-size: 10;
}

.game-header {
  font-family: var(--font-main);
  font-weight: 600;
  font-size: clamp(11px, 1.4vw, 18px);
  font-size: clamp(11px, 1.4dvw, 18px);
  /* text-shadow: 0 0 5px rgba(0, 0, 0, 0.363); */
  text-shadow: rgba(0, 0, 0, 0.6) 1px 1px 0px;
}
.game-header span{
  color:  yellow;
}


@media (max-width: 768px) {
  .wrapper {
    display: grid;
    /* grid-template-rows: 1fr 1fr;
    grid-template-rows: 1fr auto; */
    grid-template-rows: auto 1fr;
    width: 100%;
    /* height: unset; */
    height: 100%;
  }
  .hud {
    position: sticky;
    bottom: 0;
    align-self: start;
    flex-direction: column;
    bottom: 0;
    background: none;
  }
  
  .hud-panel {
    padding-block: 2px;
    padding-inline: 0px !important;
    align-self: stretch;
    margin-inline: 0;
  }
  .hud-panel:nth-child(1) {
    order: 2;
  }
  .hud-panel:nth-child(3) {
    order: 3;
  }

  .message-box {
   height: 24.4vh;
display: flex;
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 768px) and (max-height: 600px) {
  .wrapper {
    display: unset;
    grid-template-rows: 1fr 1fr;
    width: min(100vw, calc(100vh * (16 / 9)));
    height: min(100vh, calc(100vw * (9 / 16)));
    width: min(100dvw, calc(100dvh * (16 / 9)));
    height: min(100dvh, calc(100dvw * (9 / 16)));
  }

  .hud {
    position: absolute;
    bottom: 0;
    flex-direction: row;
    /* display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto; */
    padding-bottom: 3rem;
    align-items: end;
  /* background: linear-gradient(180deg, #0000, #181818d9 45%, #181818d9 70%, #18181880); */
  }
  .hud-panel {
    padding-block: 2px;
    padding-inline: 2px !important;
  }
  .hud-panel:nth-child(1) {
    order: unset;
  }
  .hud-panel:nth-child(2) {
    grid-area: 1 / 1 / 3 /2;
  }
  .hud-panel:nth-child(3) {

  }

}

@media (max-width: 500px) {
  .top-right-menu {
      flex-direction: column;
      gap: 4px;
    }
}

@media (max-width: 400px) {
  .bottom-right-menu { 
  }
  
}