* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #0b1020;
}

.login,
.registration {
  width: 100%;
  max-width: 780px;
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
}

.login .container, 
.registration .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  justify-content: space-between;
  text-align: center;
}

.login .header, 
.registration .header {
  min-width: 100%;
  background-color: #000;
  padding: 30px 40px 55px 40px;
  border-radius: 0 0 40px 40px;
  box-shadow: 0 30px 30px rgba(90, 90, 90, 0.2);
}

.login .header img, 
.registration .header img {
  width: 330px;
  max-width: 100%;
}

.login .form, 
.registration .form {
  width: 100%;
  padding: 0 20px;
}

.login .form .form-item, 
.registration .form .form-item {
  position: relative;
  margin-bottom: 20px;
}

.login .form .form-item input, 
.registration .form .form-item input {
  width: 100%;
  padding: 20px 20px 20px 60px;
  background-color: #f0f4f8;
  border: solid 1px #dbe2ed;
  border-radius: 8px;
  outline: none;
}

.login .form .form-item svg, 
.registration .form .form-item svg {
  position: absolute;
  width: 20px;
  height: 20px;
  top: 20px;
  left: 20px;
}

.login .form .btn-submit, 
.registration .form .btn-submit {
  width: 100%;
  padding: 20px;
  color: #fff;
  border: none;
  border-radius: 8px;
  background-color: #000;
  text-transform: uppercase;
  font-size: 18px;
  font-weight: bold;
  outline: none;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.login .form .error,
.registration .form .error {
  margin: -10px 0 15px;
  color: #eb274f;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.login .link, 
.registration .link {
  padding: 0 20px;
}

.login .link a, 
.registration .link a {
  color: #748a9d;
}

.login .privacy, 
.registration .privacy {
  color: #a6bcd0;
  padding: 20px;
}

.login .privacy a, 
.registration .privacy a {
  color: #a6bcd0;
}

/* Settings */
.settings .container {
  min-height: 100vh;
  padding: 24px 16px 48px;
  color: #f7f8fb;
  background: #0b1020;
}

.settings .content {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.settings .header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin-bottom: 20px;
}

.settings .header h1 {
  grid-column: 2;
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  text-align: center;
}

.settings .btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #f7f8fb;
  background: #171d2b;
  border: 1px solid #293247;
  border-radius: 8px;
}

.settings .btn-back svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings .section {
  margin-bottom: 16px;
  padding: 20px;
  background: #171d2b;
  border: 1px solid #293247;
  border-radius: 8px;
}

.settings .photo {
  display: flex;
  align-items: center;
  gap: 20px;
}

.settings .photo-avatar {
  flex: 0 0 112px;
  width: 112px;
  height: 112px;
}

.settings .photo-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 2px solid #fed000;
  border-radius: 50%;
}

.settings .photo-content {
  flex: 1;
  min-width: 0;
}

.settings .section h2 {
  margin: 0 0 6px;
  color: #f7f8fb;
  font-size: 18px;
  line-height: 1.3;
}

.settings .section p {
  margin: 0;
  color: #8993a7;
  font-size: 14px;
  line-height: 1.45;
}

.settings .section-header {
  margin-bottom: 18px;
}

.settings .field {
  display: block;
  margin-bottom: 16px;
}

.settings .field > span {
  display: block;
  margin-bottom: 7px;
  color: #c4cad7;
  font-size: 13px;
}

.settings .field-control {
  position: relative;
}

.settings .field-control svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 20px;
  height: 20px;
  color: #8993a7;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-50%);
  pointer-events: none;
}

.settings .field input {
  width: 100%;
  height: 50px;
  padding: 0 15px 0 48px;
  color: #f7f8fb;
  background: #101624;
  border: 1px solid #35405a;
  border-radius: 8px;
  outline: none;
}

.settings .field input:focus {
  border-color: #fed000;
  box-shadow: 0 0 0 3px rgba(254, 208, 0, 0.12);
}

.settings .btn {
  min-height: 46px;
  padding: 0 20px;
  color: #111522;
  background: #fed000;
  border: 1px solid #fed000;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.settings .btn-secondary {
  margin-top: 16px;
  color: #f7f8fb;
  background: #242d40;
  border-color: #35405a;
}

.settings .btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings .btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.settings .btn:disabled {
  cursor: wait;
  opacity: 0.55;
}

.settings .form .btn {
  width: 100%;
}

.settings .status {
  min-height: 18px;
  margin-top: 10px;
  color: #8993a7;
  font-size: 13px;
  line-height: 1.35;
}

.settings .status:empty {
  min-height: 0;
  margin-top: 0;
}

.settings .status.is-success {
  color: #58d68d;
}

.settings .status.is-error {
  color: #ff7b7b;
}

@media (max-width: 520px) {
  .settings .container {
    padding: 16px 12px 36px;
  }

  .settings .section {
    padding: 16px;
  }

  .settings .photo {
    flex-direction: column;
    text-align: center;
  }

  .settings .photo-content, 
  .settings .btn-secondary {
    width: 100%;
  }
}

/* Lobby and room */
.room, 
.lobby {
  width: 100%;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.room {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.room .room-controls {
  position: relative;
  flex: 0 0 auto;
  min-height: 72px;
}

.room .toolbar {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 16px 20px;
}

.room .toolbar-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
}

.room .btn-sound,
.room .btn-fullscreen {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  border: 0;
  background: transparent;
  cursor: pointer;
}

body.telegram-web-app .room .btn-fullscreen {
  display: none;
}

.room .btn-sound svg,
.room .btn-fullscreen svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.room .bot-controls {
  position: absolute;
  top: 66px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.telegram-web-app .room .bot-controls {
  top: 15px;
}

.room .btn-back {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: #171d2b;
  border: 1px solid #293247;
  border-radius: 8px;
}

.room .btn-back svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.room .center {
  grid-column: 2;
  justify-self: center;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.room .btn-stand, 
.room .btn-bot-add,
.room .btn-bot-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  cursor: pointer;
}

.room .btn-stand svg, 
.room .btn-bot-add svg,
.room .btn-bot-remove svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.room .btn-stand {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  transform: rotate(-90deg);
}

.room .btn-bot-add,
.room .btn-bot-remove {
  width: 42px;
  height: 42px;
  border: 1px solid #293247;
  border-radius: 50%;
  background: #171d2b;
}

.room .btn-sound:hover,
.room .btn-sound:focus,
.room .btn-fullscreen:hover,
.room .btn-fullscreen:focus,
.room .btn-stand:hover, 
.room .btn-stand:focus, 
.room .btn-bot-add:hover,
.room .btn-bot-add:focus,
.room .btn-bot-remove:hover,
.room .btn-bot-remove:focus {
  filter: brightness(1.15);
  outline: none;
}

.room .footer-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-column-gap: 10px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  padding: 0 10px;
  z-index: 220;
}

.room .set-value {
  position: absolute;
  bottom: 72px;
  left: 10px;
  right: 10px;
  background-color: #61cb46;
  border-radius: 5px;
}

.room .set-value .btn-close-rate {
  position: absolute;
  top: -20px;
  right: -5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: solid 1px #202123;
  border-radius: 50%;
  background-color: #fff;
  cursor: pointer;
  z-index: 99;
}

.room .set-value .btn-close-rate svg {
  width: 16px;
  height: 16px;
}

.room .set-value .btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 10px;
  padding: 15px;
}

.room .set-value .btn-rate {
  background-color: #fff;
  height: 37px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 5px;
  font: inherit;
  cursor: pointer;
}

.room .set-value .slider {
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.room .slider input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 1 1 auto;
  min-width: 0;
  height: 1px;
  margin: 10px 0;
  background: transparent;
  cursor: pointer;
}

.room .slider input[type="range"]:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.room .slider input[type="range"]::-webkit-slider-runnable-track {
  height: 1px;
  background: #202123;
}

.room .slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 1px solid #202123;
  border-radius: 50%;
  background: #202123;
  cursor: pointer;
}

.room .slider input[type="range"]::-moz-range-track {
  height: 1px;
  background: #202123;
}

.room .slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 1px solid #202123;
  border-radius: 50%;
  background: #202123;
  cursor: pointer;
}

.room .set-value .slider-minus, 
.room .set-value .slider-plus {
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  font-size: 18px;
  border-radius: 5px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.room .set-value .slider-minus svg, 
.room .set-value .slider-plus svg {
  width: 16px;
  height: 16px;
}

.room .set-value .slider-min, 
.room .set-value .slider-max {
  position: absolute;
  bottom: 30px;
  color: #fff;
  font-size: 12px;
}

.room .set-value .rate-input {
  width: 84px;
  height: 37px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background-color: #fff;
  color: #202123;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.room .set-value .rate-input:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.room .set-value .btn-rate-ok {
  width: 54px;
  height: 37px;
  padding: 0;
  border: none;
  border-radius: 5px;
  background-color: #448932;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.room .footer-buttons .btn-fold, 
.room .footer-buttons .btn-call, 
.room .footer-buttons .btn-raise, 
.room .footer-buttons .btn-check {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px;
  color: #0b1020;
  border: 0;
  text-transform: uppercase;
  border-radius: 5px;
  font: inherit;
  cursor: pointer;
}

.room .footer-buttons .value {
  display: flex;
  align-items: center;
  justify-content: center;
}

.room .footer-buttons .svg-bg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #fff;
  margin-right: 2px;
}

.room .footer-buttons .svg-bg svg {
  width: 8px;
  height: 8px;
}

.room .footer-buttons .btn-fold {
  background-color: #eb274f;
}

.room .footer-buttons .btn-call {
  background-color: #4198ec;
}

.room .footer-buttons .btn-raise {
  background-color: #61cb46;
}

.room .footer-buttons .btn-raise.active {
  background-color: #448932;
}

.room .footer-buttons .btn-check {
  background-color: #fed000;
}

.room .footer-buttons button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.room .footer-buttons button.recommended {
  box-shadow: 0 0 0 2px #fff, 0 0 18px rgba(255, 255, 255, 0.75);
}

.room .play-control {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  width: 100%;
  padding: 0 10px;
  z-index: 220;
}

.room .play-control .btn-play {
  display: flex;
  width: 100%;
  padding: 10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 0;
  background-color: #fed000;
  color: #0b1020;
  border-radius: 5px;
  font: inherit;
  text-transform: uppercase;
  cursor: pointer;
}

.room .play-control .btn-play svg {
  width: 20px;
  height: 20px;
}

.room .table-wrapper {
  --table-scale: 1;
  flex: 1 1 auto;
  min-height: 460px;
  width: 100%;
  margin: 0 auto;
  padding: 35px 10px 0px;
  display: flex;
  align-items: flex-start;
}

.room .table {
  position: relative;
  width: 324px;
  min-height: 434px;
  margin: 0 auto;
  zoom: var(--table-scale);
  border: solid 15px #202123;
  border-radius: 162px;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5), 0 0 10px rgba(255, 255, 255, 0.7);
  background-color: #1b4618;
}

.room .table::before {
  content: "";
  position: absolute;
  top: 43%;
  left: 50%;
  z-index: 0;
  width: 165px;
  height: 120px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: url("/img/logo-pokerx-v2-table-mono.png") center / contain no-repeat;
  opacity: 0.3;
  mix-blend-mode: luminosity;
  filter: grayscale(1) contrast(1.25) brightness(0.85)
    drop-shadow(1px 1px 0 rgba(255, 255, 255, 0.12))
    drop-shadow(-1px -1px 1px rgba(0, 0, 0, 0.55));
}

.room .board {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 175px;
  max-height: 300px;
  transform: translate(-50%, -70%);
  font-weight: 600;
  color: #fff;
}

.room .board .bank {
  height: 75px;
}

.room .board .bank .title {
  text-align: center;
}

.room .board .bank .bank-value {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.room .board .bank .bank-value-item {
  width: 50px;
  background: linear-gradient(to top, #ff4600, #c02000);
  margin: 5px 3px;
  border-radius: 20px;
  text-align: center;
  transition: box-shadow 0.2s ease, filter 0.2s ease;
}

.room .board .bank .bank-value-item.winner {
  box-shadow: 0 0 0 2px #fed000, 0 0 14px rgba(254, 208, 0, 0.9);
  filter: brightness(1.2);
}

.room .board .cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  height: 128px;
}

.room .board .cards .card {
  height: 65px;
  display: flex;
  margin: 0 5px 5px 0;
}

.room .board .cards .card img {
  width: 44px;
  height: 61px;
}

.room .board .cards .card.active {
  box-shadow: 0 0 10px #ffdf00;
}

.room .board .winner-hand {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  min-height: 24px;
  margin-top: 14px;
  color: #fed000;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.room .table-info {
  position: absolute;
  top: 80%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  opacity: 0.3;
}

.room .player {
  position: absolute;
  z-index: 2;
  width: 95px;
  height: 95px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.room .player > .role {
  position: absolute;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  z-index: 3;
  width: 17px;
  height: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 10px;
  border-radius: 50%;
  background-color: #fff;
  border: solid 1px #000;
  box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.7);
}

.room .pl-1 > .role {
  top: 12px;
  left: -6px;
}

.room .pl-2 > .role {
  top: 12px;
  right: -6px;
}

.room .pl-3 > .role {
  top: 12px;
  right: -6px;
}

.room .pl-4 > .role {
  bottom: 24px;
  right: 0;
}

.room .pl-5 > .role {
  top: 12px;
  left: -6px;
}

.room .pl-6 > .role {
  top: 12px;
  left: -6px;
}

.room .player > .balance {
  min-width: 50px;
  background-color: #393a3d;
  border: solid 1px #202123;
  border-radius: 20px;
  text-align: center;
  z-index: 99;
}

.room .player > .avatar {
  position: relative;
  width: 54px;
  min-height: 54px;
  height: 54px;
  margin-top: 18px;
  border: solid 3px #202123;
  border-radius: 50%;
  overflow: hidden;
}

.room .player > .balance + .avatar {
  margin-top: 0;
}

.room .player > .avatar .btn-sit {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  background-color: #242d40;
  opacity: 0.85;
}

.room .player > .avatar .btn-sit:hover, 
.room .player > .avatar .btn-sit:focus {
  background-color: #4eaa39;
  outline: none;
  opacity: 1;
}

.room .player > .avatar .btn-sit:active {
  transform: scale(0.94);
}

.room .player > .avatar .btn-sit:disabled {
  cursor: default;
  opacity: 0.55;
}

.room .player > .avatar .timer {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  color: #202123;
  font-size: 16px;
  font-weight: 900;
  border-radius: 50%;
  background-color: rgba(254, 208, 0, 0.72);
  z-index: 140;
}

.room .player > .timer {
  position: absolute;
  top: 27px;
  left: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  color: #202123;
  font-size: 16px;
  font-weight: 900;
  border: solid 3px #202123;
  border-radius: 50%;
  background-color: rgba(254, 208, 0, 0.72);
  box-shadow: 0 0 10px rgba(255, 223, 0, 0.8);
  z-index: 140;
}

.room .pl-1.open-cards > .timer {
  top: 45px;
}

.room .pl-1.is-turn > .timer {
  top: auto;
  right: -28px;
  bottom: 0;
  left: auto;
  width: 25px;
  height: 25px;
  transform: none;
  font-size: 12px;
  border-width: 2px;
}

.room .out .avatar {
  opacity: 0.7;
}

.room .player > .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.room .player > .nickname {
  width: 100%;
  margin-top: 3px;
  padding: 5px 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  /* overflow: hidden; */
  text-overflow: ellipsis;
  text-align: center;
  background-color: #393a3d;
  border: solid 1px #fff;
  border-radius: 20px;
}

.room .out .nickname {
  color: #8d8d8d;
  background-color: #393a3d;
  border: solid 1px #8d8d8d;
}

.room .player > .action {
  width: 100%;
  position: relative;
  background-color: #393a3d;
  border: solid 1px #202123;
  border-radius: 20px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 0;
}

.room .pl-1 .action {
  margin-top: 4px
}

.room .player > .action .icon {
  position: absolute;
  top: -8px;
  left: calc(50% - 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: solid 1px #202123;
  border-radius: 50%;
  background-color: #fff;
  z-index: 99;
}

.room .player > .action .icon svg {
  width: 8px;
  height: 8px;
}

.room .player > .action.call .icon {
  background-color: #4198ec;
}

.room .player > .action.fold .icon {
  background-color: #eb274f;
}

.room .player > .action.bet .icon,
.room .player > .action.raise .icon, 
.room .player > .action.all-in .icon {
  background-color: #61cb46;
}

.room .player > .action.check .icon,
.room .player > .action.sb .icon,
.room .player > .action.bb .icon {
  background-color: #fed000;
}

.room .player > .action.call .value {
  color: #4198ec;
}

.room .player > .action.fold .value {
  color: #eb274f;
}

.room .player > .action.bet .value,
.room .player > .action.raise .value, 
.room .player > .action.all-in .value {
  color: #61cb46;
}

.room .player > .action.check .value,
.room .player > .action.sb .value,
.room .player > .action.bb .value {
  color: #fed000;
}

.room .player > .action .price {
  margin-left: 5px;
}

.room .player > .hand {
  width: 100%;
  display: flex;
  justify-content: center;
}

.room .player > .hand .card {
  display: flex;
  margin-right: 3px;
}

.room .player > .hand .card img {
  width: 31px;
  height: 44px;
}

.room .player > .hand .card.active {
  box-shadow: 0 0 10px #ffdf00;
}

.room .player > .winner {
  position: absolute;
  top: -18px;
  color: #fed000;
  font-size: 16px;
  font-weight: 900;
}

.room .player.winner .avatar {
  box-shadow: 0 0 20px #ffdf00;
}

.room .player.winner .balance,
.room .player.winner .nickname {
  border-color: #fed000;
  box-shadow: 0 0 14px rgba(254, 208, 0, 0.85);
}

.room .player.winner .hand .card {
  box-shadow: 0 0 14px rgba(254, 208, 0, 0.85);
}

.room .pl-1 {
  top: 104%;
  left: 50%;
}

.room .pl-1 .balance {
  order: 1;
}

.room .pl-1 .avatar, 
.room .pl-1 .hand {
  order: 2;
}

.room .pl-1 .nickname, 
.room .pl-1 .action {
  order: 3;
}

.room .pl-1 .hand {
  position: static;
  margin-top: 3px;
}

.room .player.open-cards .balance {
  order: 1;
}

.room .player.open-cards .hand {
  order: 2;
}

.room .player.open-cards .nickname, 
.room .player.open-cards .action {
  order: 3;
}

.room .pl-2 {
  top: 70%;
  left: calc(0% + 10px);
}

.room .pl-3 {
  top: 25%;
  left: calc(0% + 10px);
}

.room .pl-4 {
  top: 0;
  left: 50%;
}

.room .pl-5 {
  top: 25%;
  left: calc(100% - 10px);
}

.room .pl-6 {
  top: 70%;
  left: calc(100% - 10px);
}

@media (max-height: 680px) {
  .room .toolbar {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .room .bot-controls {
    top: 54px;
  }

  body.telegram-web-app .room .bot-controls {
    top: 15px;
  }

  .room .table-wrapper {
    --table-scale: 0.92;
    padding-bottom: 12px;
  }
}

@media (max-height: 610px) {
  .room .table-wrapper {
    --table-scale: 0.84;
  }

  .room .footer-buttons {
    padding-bottom: 6px;
  }

  .room .footer-buttons .btn-fold,
  .room .footer-buttons .btn-call,
  .room .footer-buttons .btn-raise,
  .room .footer-buttons .btn-check {
    padding-top: 6px;
    padding-bottom: 6px;
  }
}

@media (max-height: 540px) {
  .room .table-wrapper {
    --table-scale: 0.76;
  }
}

.learn-room {
  color: #fff;
}

.learn-room .toolbar {
  grid-template-columns: 44px minmax(0, 1fr);
}

.learn-room .learn-progress {
  grid-column: 2;
  width: 100%;
  max-width: 430px;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f7f8fb;
  font-size: 13px;
  font-weight: 700;
}

.learn-room .learn-progress-track {
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #293247;
}

.learn-room .learn-progress-track div {
  height: 100%;
  background: #fed000;
  transition: width 0.25s ease;
}

.learn-room .learn-tip {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 260;
  width: calc(100% - 32px);
  max-width: 430px;
  margin: 0;
  padding: 14px 16px;
  background: #171d2b;
  border: 1px solid #293247;
  border-radius: 8px;
  opacity: 0.85;
  transform: translate(-50%, -50%);
  transition: left 0.24s ease, transform 0.24s ease, opacity 0.24s ease;
}

.learn-room .learn-tip.is-collapsed {
  left: 100%;
  cursor: pointer;
  transform: translate(-28px, -50%);
}

.learn-room .learn-tip-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #202123;
  background: #fed000;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.learn-room .learn-tip-close svg {
  width: 12px;
  height: 12px;
}

.learn-room .learn-tip-close line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.learn-room .learn-tip.is-collapsed .learn-tip-close {
  top: 50%;
  right: auto;
  left: -14px;
  transform: translateY(-50%);
}

.learn-room .learn-tip h1 {
  margin: 0 32px 6px 0;
  color: #fed000;
  font-size: 18px;
  line-height: 1.25;
}

.learn-room .learn-tip p {
  margin: 0;
  color: #d9deea;
  font-size: 14px;
  line-height: 1.4;
}

.learn-room .learn-tip-next {
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  color: #0b1020;
  background: #fed000;
  border: 0;
  border-radius: 5px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.learn-room .learn-tip-next:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.learn-room .learn-footer-actions {
  grid-template-columns: 1fr;
}

.learn-room .learn-footer-actions-double {
  grid-template-columns: 1fr 1fr;
}

.lobby {
  min-height: 100vh;
  background: #0b1020;
  color: #fff;
}

.lobby .container {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.lobby .profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 150px;
  padding: 28px 30px;
  border: solid 1px #293247;
  border-radius: 8px;
  background-color: #171d2b;
}

.lobby .btn-learn-poker {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0 0 18px;
  color: #0b1020;
  background: #fed000;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.lobby .profile-name {
  margin-bottom: 14px;
  font-size: 28px;
  font-weight: 700;
}

.lobby .profile-balance {
  font-size: 36px;
  font-weight: 700;
}

.lobby .profile-balance span {
  margin-right: 8px;
  color: #8993a7;
  font-size: 13px;
  font-weight: 700;
}

.lobby .profile-avatar {
  position: relative;
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
}

.lobby .profile-avatar > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: solid 2px #fff;
  border-radius: 8px;
}

.lobby .profile-avatar > span {
  position: absolute;
  right: -7px;
  bottom: -7px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: solid 2px #fff;
  border-radius: 50%;
  background-color: #fed000;
}

.lobby .profile-avatar > span svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #0b1020;
  stroke-width: 2;
}

.lobby .modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 36px;
}

.lobby .btn-mode {
  min-height: 84px;
  padding: 12px;
  border: solid 1px transparent;
  border-radius: 8px;
  color: #8993a7;
  background-color: transparent;
  cursor: pointer;
}

.lobby .btn-mode svg {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 8px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lobby .btn-mode span {
  font-size: 16px;
  font-weight: 700;
}

.lobby .btn-mode.active {
  border-color: #46536a;
  color: #fff;
  background-color: #344057;
}

.lobby .btn-mode:focus-visible {
  outline: solid 2px #fed000;
  outline-offset: 2px;
}

.lobby .tables[hidden] {
  display: none;
}

.lobby .tables h1 {
  margin: 0 0 24px;
  font-size: 30px;
  letter-spacing: 0;
}

.lobby .coming-soon {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: solid 1px #293247;
  border-radius: 8px;
  color: #8993a7;
  background-color: #121827;
}

.lobby .coming-soon svg {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  fill: none;
  stroke: #fed000;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lobby .coming-soon strong {
  color: #fff;
  font-size: 22px;
  letter-spacing: 0;
}

.lobby .table-row {
  display: grid;
  grid-template-columns: 1fr 1.35fr .65fr 72px;
  column-gap: 16px;
  align-items: center;
  min-height: 76px;
  padding: 12px 10px;
  border-bottom: solid 1px #252d40;
  font-size: 17px;
}

.lobby .table-row-head {
  min-height: 42px;
  padding-top: 0;
  color: #8993a7;
  font-size: 13px;
  font-weight: 700;
}

.lobby .btn-sit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  min-height: 42px;
  border-radius: 8px;
  color: #0b1020;
  background-color: #fed000;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.lobby .btn-sit:hover, 
.lobby .btn-sit:focus-visible {
  background-color: #ffe15a;
  outline: none;
}

@media (max-width: 520px) {
  .lobby .container {
    padding: 18px 14px 32px;
  }

  .lobby .profile {
    min-height: 126px;
    padding: 22px 20px;
  }

  .lobby .profile-name {
    font-size: 23px;
  }

  .lobby .profile-balance {
    font-size: 29px;
  }

  .lobby .profile-avatar {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
  }

  .lobby .modes {
    margin: 20px 0 30px;
  }

  .lobby .btn-mode {
    min-height: 78px;
    padding-right: 6px;
    padding-left: 6px;
  }

  .lobby .btn-mode span {
    font-size: 14px;
  }

  .lobby .tables h1 {
    font-size: 26px;
  }

  .lobby .table-row {
    grid-template-columns: 1fr 1fr 58px 58px;
    column-gap: 8px;
    padding-right: 0;
    padding-left: 0;
    font-size: 14px;
  }

  .lobby .table-row-head {
    font-size: 11px;
  }

  .lobby .btn-sit {
    width: 58px;
    min-height: 38px;
    font-size: 13px;
  }
}
