* {
  -webkit-user-select: none; /* Safari, Chrome */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE/Edge */
  user-select: none; /* Стандарт */
  -webkit-tap-highlight-color: transparent; /* убирает синий/серый ховер на мобильных */
}

body {
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: "Lapsus Pro";
  src: url("fonts/LapsusPro/LapsusPro-Bold.otf") format("opentype");
  font-weight: bold;
  font-style: normal;
}

:focus-visible {
  outline: none;
}

p {
  margin: 0;
}

.profile-wrapper {
  padding: 6px 9px;
  border-radius: 10px;
  font-family: "Lapsus Pro", sans-serif;
  color: #572411;
  margin-bottom: 10px;
}

.profile-short {
  display: flex;
  align-items: center;
  padding: 6px 9px;
  gap: 20px;
  background-color: #ffe8be;

  border-radius: 10px;
}

.profile-short > .profile-info {
  display: flex;
  align-items: center;
  width: 70%;
  gap: 10px;
}

.profile-short > .profile-info > .profile-info__avatar {
  width: 27px;
  height: 27px;
  border-radius: 22px;
  border: 2px solid linear-gradient(180deg, #f1a84a, #d07834);
}

.profile-short > .profile-info > .profile-info__username {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-short > .profile-balance {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}


#tic-tac-toe-card-anim {
  z-index: 10;
  width: 100%;
  height: 100%;
}

#flappy-card-anim {
  z-index: 10;
  width: 100%;
  height: 100%;
}

.game-card-wrapper {
  display: flex;
  border-radius: 10px;
  width: 100%;
  height: 200px;
}

.game-card-wrapper > .card {
  position: relative;
  width: 100%;
  background-position: 8px;
  border-radius: 10px;
  background-position: center;
  background-repeat: no-repeat;
}

.game-card-wrapper > .card > .card-about {
  position: absolute;
  bottom: 21px;
  left: 22px;
  border-radius: 100px;
  font-size: 11px;
  border: 0;
  padding: 5px 7.5px;
  cursor: pointer;
  z-index: 1000;
}

.game-card-wrapper > .card > .card-about > .card-about__icon {
  margin-bottom: -1.5px;
}

/* Layout */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;

  padding: calc(110px + env(safe-area-inset-top)) 12px 40px 12px;

  min-height: 100vh;
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
  box-sizing: border-box;
}

.container__menu {
  min-width: 340px;
  width: 340px;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}
img,
svg,
video {
  max-width: 100%;
  height: auto;
}

/* Game Popup */
/* Game Popup + Locked */
game-popup,
game-popup-locked {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}

game-popup[open],
game-popup-locked[open] {
  display: block;
}

game-popup .gp-overlay,
game-popup-locked .gp-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

game-popup .gp-sheet,
game-popup-locked .gp-sheet {
  width: 100%;
  height: 85vh;
  min-width: 340px;

  background: linear-gradient(180deg, #f1a84a, #d07834),
    url("sprites/wood-effect-2.png");

  background-repeat: no-repeat, repeat-x;
  background-position: center, top left;
  background-size: cover;

  background-blend-mode: multiply, normal;

  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  animation: gp-slide-up 0.3s ease forwards;
  margin: max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right)) -20px max(16px, env(safe-area-inset-left));
}

game-popup-locked .gp-sheet {
  height: initial;
}

game-popup .gp-content,
game-popup-locked .gp-content {
  padding: 6px;
}

game-popup .gp-content app-card .card-content,
game-popup-locked .gp-content app-card .card-content {
  height: calc(75vh + 5px);
  overflow: auto;
}

game-popup-locked .gp-content app-card .card-content {
  height: 75vh;
  min-height: min-content;
  overflow: auto;
}

game-popup .gp-close,
game-popup-locked .gp-close {
  display: block;
  margin: 16px auto;
  padding: 8px 16px;
  border: 0;
  background: #eee;
  border-radius: 8px;
  cursor: pointer;
}
game-popup .gp-close:hover,
game-popup-locked .gp-close:hover {
  background: #ddd;
}

game-popup.closing .gp-sheet,
game-popup-locked.closing .gp-sheet {
  animation: gp-slide-down 0.25s ease forwards;
}

@keyframes gp-slide-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes gp-slide-down {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(100%);
  }
}

game-popup .gp-content .card-content .header,
game-popup-locked .gp-content .card-content .header-2,
game-popup-locked .gp-content .card-content .header {
  position: relative;
  text-align: center;
  color: rgba(87, 36, 17, 0.5);
}

game-popup .gp-content .card-content .header > .header__title,
game-popup-locked
  .gp-content
  .card-content
  .header-2
  > .header__title
  game-popup-locked
  .gp-content
  .card-content
  .header
  > .header__title {
  font-size: 20px;
  margin-bottom: 10px;
}

game-popup .gp-content .card-content .header > .header__description,
game-popup-locked
  .gp-content
  .card-content
  .header-2
  > .header__description
  game-popup-locked
  .gp-content
  .card-content
  .header
  > .header__description {
  font-size: 12px;
  margin-bottom: 8px;
  text-align: center;
  width: 250px;
}

game-popup .gp-content .card-content .header > .js-balance,
game-popup-locked
  .gp-content
  .card-content
  .header-2
  > .js-balance
  game-popup-locked
  .gp-content
  .card-content
  .header
  > .js-balance {
  margin-top: 12px;
  margin-bottom: 8px;
}

game-popup .gp-content .card-content .header-2,
game-popup-locked .gp-content .card-content .header-2 {
  position: relative;
  text-align: center;
  color: rgba(87, 36, 17, 0.5);
}

game-popup .gp-content .card-content .header-2 > .header__title,
game-popup-locked .gp-content .card-content .header-2 > .header__title {
  font-size: 20px;
  margin-bottom: 10px;
}

game-popup .gp-content .card-content .header-2 > .header__description,
game-popup-locked .gp-content .card-content .header-2 > .header__description {
  font-size: 32px;
  color: rgba(87, 36, 17, 1);
  margin-bottom: 8px;
}

game-popup .gp-content .card-content .header-2 > .js-balance,
game-popup-locked .gp-content .card-content .header-2 > .js-balance {
  margin-top: 12px;
  margin-bottom: 8px;
}

game-popup .gp-content .card-content .main,
game-popup-locked .gp-content .card-content .main-2,
game-popup-locked .gp-content .card-content .main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

game-popup .gp-content .card-content .main .rooms__title,
game-popup-locked .gp-content .card-content .main-2 .rooms__title,
game-popup-locked .gp-content .card-content .main .rooms__title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(87, 36, 17, 1);
}

game-popup .gp-content .card-content .main .rooms__title > .title,
game-popup-locked .gp-content .card-content .main-2 .rooms__title > .title,
game-popup-locked .gp-content .card-content .main .rooms__title > .title {
  font-size: 32px;
}

game-popup .gp-content .card-content .main .rooms__description,
game-popup-locked .gp-content .card-content .main-2 .rooms__description,
game-popup-locked .gp-content .card-content .main .rooms__description {
  font-size: 12px;
  color: rgba(87, 36, 17, 0.5);
}

.rooms__list {
  gap: 8px;
  overflow: auto;
}

game-popup .gp-content .card-content .main .rooms__list,
game-popup-locked .gp-content .card-content .main-2 .rooms__list,
game-popup-locked .gp-content .card-content .main .rooms__list {
  font-size: 12px;
  color: rgba(87, 36, 17, 0.5);
  gap: 8px;
  width: 100%;
  max-height: 450px;
}

game-popup .gp-content .card-content .main .rooms__list > .list-item,
game-popup-locked .gp-content .card-content .main-2 .rooms__list > .list-item,
game-popup-locked .gp-content .card-content .main .rooms__list > .list-item {
  display: flex;
  align-items: center;
  border-radius: 14px;
  background-color: rgba(217, 194, 150, 1);
  padding: 12px 25px 12px 12px;
}

game-popup
  .gp-content
  .card-content
  .main
  .rooms__list
  > .list-item
  > .list-item__avatar,
game-popup-locked
  .gp-content
  .card-content
  .main-2
  .rooms__list
  > .list-item
  > .list-item__avatar,
game-popup-locked
  .gp-content
  .card-content
  .main
  .rooms__list
  > .list-item
  > .list-item__avatar {
  margin-right: 10px;
  border-radius: 50px;
  width: 48px;
  height: 48px;
}

game-popup
  .gp-content
  .card-content
  .main
  .rooms__list
  > .list-item
  > .list-item__name,
game-popup-locked
  .gp-content
  .card-content
  .main-2
  .rooms__list
  > .list-item
  > .list-item__name,
game-popup-locked
  .gp-content
  .card-content
  .main
  .rooms__list
  > .list-item
  > .list-item__name {
  margin-right: auto;
  max-width: 40%;
  font-size: 20px;
  color: rgba(87, 36, 17, 1);
}

game-popup
  .gp-content
  .card-content
  .main
  .rooms__list
  > .list-item
  > .list-item__bet,
game-popup-locked
  .gp-content
  .card-content
  .main-2
  .rooms__list
  > .list-item
  > .list-item__bet,
game-popup-locked
  .gp-content
  .card-content
  .main
  .rooms__list
  > .list-item
  > .list-item__bet {
  display: flex;
  flex-direction: column;
  justify-content: center; 
  align-items: center;
  gap: 8px;
}

game-popup
  .gp-content
  .card-content
  .main
  .rooms__list
  > .list-item
  > .list-item__bet
  > .bet-title,
game-popup-locked
  .gp-content
  .card-content
  .main-2
  .rooms__list
  > .list-item
  > .list-item__bet
  > .bet-title,
game-popup-locked
  .gp-content
  .card-content
  .main
  .rooms__list
  > .list-item
  > .list-item__bet
  > .bet-title {
  font-size: 12px !important;
  color: rgba(87, 36, 17, 0.5) !important;
}

game-popup
  .gp-content
  .card-content
  .main
  .rooms__list
  > .list-item
  > .list-item__bet
  > .bet-value,
game-popup-locked
  .gp-content
  .card-content
  .main
  .rooms__list
  > .list-item
  > .list-item__bet
  > .bet-value,
game-popup-locked
  .gp-content
  .card-content
  .main-2
  .rooms__list
  > .list-item
  > .list-item__bet
  > .bet-value {
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(87, 36, 17, 1) !important;
  font-size: 20px !important;
}

.bet-value {
  color: rgba(87, 36, 17, 1) !important;
  font-size: 14px !important;
}

game-popup .gp-view,
game-popup-locked .gp-view {
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  will-change: opacity, transform;
}
game-popup .gp-view.--active,
game-popup-locked .gp-view.--active {
  transform: translateY(0);
}

/* Bet Picker */
.bet-picker {
  display: flex;
  height: 52px;
  min-width: 300px;
  width: 100%;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 8px 0;
}
.bet-picker > button.btn {
  width: 30px;
  touch-action: manipulation; /* убирает задержку клика на мобильных и двойной тап */
}

.bet-view {
  position: relative;
  height: 100%;
  width: 75%;
  border-radius: 14px;
  background: rgba(217, 194, 150, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: 700 20px/1 "Lapsus Pro", sans-serif;
  color: #572411;
}

.bet-view::before {
  content: "▼";
  position: absolute;
  top: -2.5px;
  left: 50%;
  transform: translateX(-50%);
  color: black;
  font-size: 14px;
}

/* стрелка снизу */
.bet-view::after {
  content: "▲";
  position: absolute;
  bottom: -2.5px;
  left: 50%;
  transform: translateX(-50%);
  color: black;
  font-size: 14px;
}

.bet-view__value {
  font-size: 20px;
  transition: transform 0.18s ease, opacity 0.18s ease;
  will-change: transform, opacity;
}

.bet-view__value.bet-current {
  display: flex;
  gap: 2px;
  position: absolute;
  left: 41.5%;
  font-weight: bold;
  opacity: 1;
  transform: scale(1.2); /* выделяем текущую */
}

.bet-view__value.bet-prev,
.bet-view__value.bet-next {
  opacity: 0.4; /* полупрозрачные */
}

.bet-view__value.bet-prev {
  position: absolute;
  left: 15px;
}

.bet-view__value.bet-next {
  position: absolute;
  right: 15px;
}

.to-prev {
  transform: translateX(-100%) scale(0.9) !important;
  opacity: 0 !important;
}
.to-next {
  transform: translateX(100%) scale(0.9) !important;
  opacity: 0 !important;
}
.to-current {
  transform: translateX(-50%) scale(1.1) !important;
  opacity: 1 !important;
  font-weight: bold;
}

/* Popup */

app-popup {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.6);
  z-index: 2147483647;
  isolation: isolate;
  opacity: 0;
  transition: opacity 0.15s ease;
}

app-popup[open] {
  display: flex;
  opacity: 1;
}

@keyframes popup-fade-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes popup-fade-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

app-popup .popup {
  position: relative;
  background: #0f2f4a;
  border-radius: 12px;
  padding: 30px 36px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);

  font-family: "Lapsus Pro", sans-serif;
  font-size: 20px;

  transform: scale(0.98);
  transition: transform 0.15s ease;

  margin: max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));

  animation: popup-fade-out 0.15s ease forwards;
}

app-popup .popup.--lobby {
  display: flex;
  flex-direction: column;
  width: 80vw;
  gap: 24px;
}

app-popup .popup.--game-result {
  position: relative;
  min-width: 400px;
  min-height: 450px;

  background: url("sprites/game-result-popup-bg.svg");

  background-repeat: no-repeat, repeat-x;
  background-position: center, top left;
  background-size: contain;

  background-blend-mode: multiply, normal;
  box-shadow: none;
}

app-popup .popup.--game-result .game-result__title {
  position: relative;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
}

app-popup .popup.--game-result .game-result__title.--win::before {
  background: url("sprites/win.svg") no-repeat top center;
  background-size: cover;
  content: "";
  position: absolute;
  top: -20px; /* фон вылезает сверху */
  left: 50%; /* фон шире влево */
  transform: translateX(-50%);
  bottom: -20px; /* фон ниже */
  height: 110px;
  width: 350px;
  z-index: -1;
}

app-popup .popup.--game-result .game-result__title.--lose::before {
  background: url("sprites/lose.svg") no-repeat top center;
  background-size: cover;

  content: "";
  position: absolute;
  top: -20px; /* фон вылезает сверху */
  left: 50%; /* фон шире влево */
  transform: translateX(-50%);
  bottom: -20px; /* фон ниже */
  height: 110px;
  width: 350px;
  z-index: -1;
}

app-popup .popup.--game-result .game-result__title.--draw::before {
  background: url("sprites/draw.svg") no-repeat top center;
  background-size: cover;

  content: "";
  position: absolute;
  top: -20px; /* фон вылезает сверху */
  left: 50%; /* фон шире влево */
  transform: translateX(-50%);
  bottom: -20px; /* фон ниже */
  height: 110px;
  width: 350px;
  z-index: -1;
}

app-popup .popup.--game-result .game-result__players {
  font-family: "Lapsus Pro", sans-serif;
  display: flex;
  align-items: center;
  text-align: center;
  gap: 12px;
  color: rgba(87, 36, 17, 1);
  margin-bottom: 24px;
}

app-popup .popup.--game-result .game-result__players .player {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.player.--winner::before {
  background: url("crown.svg") no-repeat top center;
  background-size: cover;
  content: "";
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 58px;
  height: 52px;
}

app-popup .popup.--game-result .game-result__players .player .player__info {
  border-radius: 50px;
  padding: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
}

app-popup .popup.--game-result .game-result__score {
  font-size: 20px;
  color: rgba(87, 36, 17, 0.5);
  text-align: center;
  width: 130px;
}

app-popup .popup.--game-result .game-result__report {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

app-popup .popup.--game-result .game-result__report .report__balance {
  color: rgba(87, 36, 17, 1);
  font-size: 32px;
}

app-popup[open] .popup {
  animation: popup-fade-in 0.2s ease forwards;
}

app-popup.closing .popup {
  animation: popup-fade-out 0.15s ease forwards;
}

.popup__header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.popup__header > img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.popup__header > .game-title {
  color: rgba(255, 255, 255, 0.5);
}

.popup__main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: rgba(255, 255, 255, 1);
}

.popup__main > p {
  margin: 0;
  text-align: center;
}

.popup__footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Navbar */
nav-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  transition: transform 180ms ease;
  width: 344px;
  height: 100px;
  z-index: 2147483000;
  display: block;
}

nav-bar.--visible {
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  nav-bar {
    transition: none;
  }
}

nav-bar .nav {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

nav-bar .nav a {
  text-decoration: none;
}

nav-bar .btn {
  pointer-events: auto;
  width: 85px;
  height: 88px;
  background: #3b668e;
  color: #fff;
  border: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: 8px 8px 24px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font: 600 12px/1.1 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Arial;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  cursor: pointer;

  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease,
    background-color 160ms ease;
  will-change: transform, filter;
  font-family: "Lapsus Pro", sans-serif;
}

nav-bar .btn img {
  width: 35px;
  height: 35px;
  display: block;
}

nav-bar .btn:not(.is-active):hover {
  transform: translateY(-3px);
  filter: brightness(1.15);
}

nav-bar .btn:not(.is-active):hover {
  transform: scale(1.04);
  filter: brightness(1.15);
}

nav-bar .btn.is-active {
  transform: scale(1.08);
  background-color: #60bdff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  z-index: 5;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

nav-bar .button-pvp {
  order: 0;
}
nav-bar .button-pvp img {
  margin-bottom: -7px;
}
nav-bar .button-rate {
  order: 1;
}
nav-bar .button-guide {
  order: 2;
}
nav-bar .button-profile {
  order: 3;
}
nav-bar .button-profile img {
  margin-left: -7px;
}

/* Dropdown */
app-dropdown {
  display: block;
  font-family: "Lapsus Pro", sans-serif;
}

app-dropdown .wrap {
  background: transparent;
  font-family: "Lapsus Pro", sans-serif;
}

app-dropdown .header,
app-dropdown .header-2 {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  color: #ffffff;
  font-family: "Lapsus Pro", sans-serif;
}

app-dropdown .title {
  font-size: 20px;
  font-weight: 600;
}

app-dropdown .chev {
  background-color: rgba(255, 255, 255, 0.29);
  border-radius: 25px;
  transition: transform 0.2s ease;
}

app-dropdown[open] .chev {
  transform: rotate(180deg);
}

app-dropdown .content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.2s ease, padding 0.2s ease;
  padding: 1px 6px;
  font-size: 12px;
  color: #ffffff;
  font-family: "Lapsus Pro", sans-serif;
}

app-dropdown[open] .content {
  padding: 8px 6px;
}

/* Button */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 6px;

  border: none;
  border-radius: 50px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25),
    inset 0 2px 2px rgba(255, 255, 255, 0.2),
    inset 0 -2px 2px rgba(0, 0, 0, 0.2);

  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-alt {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 6px;

  border: none;
  border-radius: 50px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25),
    inset 0 2px 2px rgba(255, 255, 255, 0.2),
    inset 0 -2px 2px rgba(0, 0, 0, 0.2);

  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.btn:hover > .btn__text {
  background: rgba(121, 129, 1, 1);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn > .btn__text {
  background-color: rgba(171, 189, 45, 1);
  border-radius: 20px;
  padding: 12px 16px;
  min-width: 30px;
  font-size: 14px;

  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25),
    inset 0px 3px 2px rgba(250, 254, 92, 0.55),
    inset -2px -3px 1px rgba(0, 0, 0, 0.3);

  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn > .btn__icon > img {
  width: 16px;
  height: 16px;
}

.btn.--game-card-back {
  position: absolute;
  left: 0;
  top: -8px;
}

.btn > .btn__icon > img.--arrow-left {
  transform: rotateY(180deg) translateX(1.5px);
}

.btn > .btn__icon {
  position: relative;
  background-color: rgba(171, 189, 45, 1);
  border-radius: 20px;
  padding: 6px 6px 3px 6px;

  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25),
    inset 0px 3px 2px rgba(250, 254, 92, 0.55),
    inset -2px -3px 1px rgba(0, 0, 0, 0.3);

  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-alt:hover > .btn__icon {
  background: rgba(33, 102, 126, 1);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-alt > .btn__icon {
  background-color: rgba(45, 151, 189, 1);
  border-radius: 20px;
  padding: 6px 6px 3px 6px;

  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25),
    inset 0px 3px 2px rgba(65, 197, 244, 1),
    inset -2px -3px 1px rgba(0, 0, 0, 0.3);

  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-alt:hover > .btn__text {
  background: rgba(33, 102, 126, 1);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-alt > .btn__text {
  background-color: rgba(45, 151, 189, 1);
  border-radius: 20px;
  padding: 12px 16px;
  min-width: 30px;

  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25),
    inset 0px 3px 2px rgba(65, 197, 244, 1),
    inset -2px -3px 1px rgba(0, 0, 0, 0.3);

  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Guide */
.guide {
  display: flex;
  flex-direction: column;
}

.guide-content {
  background: rgba(56, 59, 71, 0.25);
  backdrop-filter: blur(29.7px);
  -webkit-backdrop-filter: blur(29.7px);
  padding: 22px;
  border-radius: 10px;
}

.guide > h3 {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Lapsus Pro", sans-serif;
  font-size: 32px;
  color: #ffffff;
  margin: 0 0 8px 0;
  text-decoration: underline;
}

/* Rating */
.rating {
  display: flex;
  flex-direction: column;
}

.rating > h3 {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Lapsus Pro", sans-serif;
  font-size: 32px;
  color: #ffffff;
  margin: 0 0 2px 0;
  text-decoration: underline;
}

.rating > .rating-table {
  display: flex;
  flex-direction: column;
  padding: 21px 21px 150px 21px;
  color: white;
  border-radius: 10px;
  background: rgba(56, 59, 71, 0.25);
  backdrop-filter: blur(29.7px);
  -webkit-backdrop-filter: blur(29.7px);
  position: relative;
}

.rating > .rating-table > .rating-table__header {
  display: flex;
  justify-content: center;
  text-align: center;
  font-size: 20px;
  font-family: "Lapsus Pro", sans-serif;
  margin-bottom: 12px;
}

.rating > .rating-table > .rating-table__reward {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: "Lapsus Pro", sans-serif;
  justify-content: center;
  cursor: pointer;
}

.rating > .rating-table > .rating-table__reward > span {
  text-decoration: underline;
}

.rating > .rating-table > .rating-table__reward > img {
  text-decoration: underline;
  margin-bottom: -2px;
}

.rating > .rating-table > .rating-table__users {
  display: flex;
  flex-direction: column;
  min-height: 290px;
  gap: 8px;
  margin-top: 11px;
  margin-bottom: 21px;
  position: relative;
}

.rating > .rating-table > .rating-table__users > .user-item {
  display: flex;
  align-items: center;
  margin-left: 30px;
  gap: 10px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

.rating
  > .rating-table
  > .rating-table__users
  > .user-item
  > .user-item__place {
  font-family: "Lapsus Pro", sans-serif;
  font-size: 22px;
  margin-right: 30px;
}

.rating
  > .rating-table
  > .rating-table__users
  > .user-item
  > .user-item__place
  > img {
  width: 23px;
  height: 15px;
}

.rating > .rating-table > .rating-table__users > .user-item > .user-item__info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rating
  > .rating-table
  > .rating-table__users
  > .user-item
  > .user-item__info
  > .user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 25px;
}

.rating
  > .rating-table
  > .rating-table__users
  > .user-item
  > .user-item__info
  > .user-name {
  color: #ffffff;
  font-size: 14px;
  max-width: 90px;
}

.rating
  > .rating-table
  > .rating-table__users
  > .user-item
  > .user-item__info
  > .user-wins-count {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

/* App Card */
app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 10px;

  background: linear-gradient(180deg, #f1a84a, #d07834),
    url("sprites/wood-effect-1.png");

  background-repeat: no-repeat, repeat-x;
  background-position: center, top left;
  background-size: cover;

  background-blend-mode: multiply, normal;
}

app-card .card-content {
  border-radius: 10px;
  background-color: rgba(255, 232, 190, 1);
  padding: 15px 12px;
  font-family: "Lapsus Pro", sans-serif;
}

app-card .extra-header {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: -50px;
  left: 50%;

  transform: translateX(-50%);
  padding: 4px;

  border-radius: 8px;

  background: linear-gradient(180deg, #f1a84a, #d07834),
    url("sprites/wood-effect-2.png");

  background-repeat: no-repeat, repeat-x;
  background-position: center, top left;
  background-size: cover;

  background-blend-mode: multiply, normal;
  z-index: 10000;
}

app-card .extra-header > img {
  width: 64px;
  height: 64px;
}

app-card .header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 30px;
  color: rgba(87, 36, 17, 1);
}

app-card .header > .header__title {
  margin-bottom: 12px;
}

app-card .main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 30px;
  color: rgba(87, 36, 17, 1);
  margin-bottom: 12px;
}

app-card .header-2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 30px;
  color: rgba(87, 36, 17, 1);
}

app-card .header-3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 30px;
  color: rgba(87, 36, 17, 1);
}

app-card .header-4 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 30px;
  color: rgba(87, 36, 17, 1);
}

app-card .header-2 > .header__title {
  margin-bottom: 12px;
}

app-card .header-3 > .header__title {
  margin-bottom: 12px;
}

app-card .header-4 > .header__title {
  margin-bottom: 12px;
}

app-card .main,
app-card .main-2,
app-card .main-3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 30px;
  color: rgba(87, 36, 17, 1);
  margin-bottom: 12px;
}

app-card .main-4 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 30px;
  color: rgba(87, 36, 17, 1);
  margin-bottom: 12px;
}

app-card .main-2 > .main__title app-card .main > .main__title {
  margin-top: 12px;
  margin-bottom: 12px;
}

app-card .main-3 > .main__title app-card .main > .main__title {
  margin-top: 12px;
  margin-bottom: 12px;
}

app-card .main-4 > .main__title app-card .main > .main__title {
  margin-top: 12px;
  margin-bottom: 12px;
}

app-card .footer,
app-card .footer-2,
app-card .footer-3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

app-card .footer-4 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Profile */
app-card.profile {
  display: flex;
}

app-card.profile .dep-grid {
  display: grid;
  width: 90%;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, 48px);
  gap: 10px;
  margin: 10px 0;
}

app-card.profile .dep-grid .grid-item {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 70px;
  background-color: rgba(217, 194, 150, 1);
  color: rgba(87, 36, 17, 1);
  font-size: 20px;
  cursor: pointer;
}

.grid-item {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 70px;
  background-color: rgba(217, 194, 150, 1);
  color: rgba(87, 36, 17, 1);
  font-size: 20px;
  gap: 4px;
  cursor: pointer;
}

.grid-item:hover {
  background-color: rgba(217, 194, 150, 0.75);
}

app-card.profile .dep-grid .grid-item:hover {
  background-color: rgba(217, 194, 150, 0.75);
}

app-card.profile .btn.--game-card-back {
    position: absolute;
    left: 14px;
    top: 14px;
}

.custom-input {
  height: 40px;
  background: rgba(217, 194, 150, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 20px/1 "Lapsus Pro", sans-serif;
  text-align: center;
  color: #572411
}

.custom-input::placeholder {
  color: rgba(87, 36, 17, 0.5)
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0; /* Optional: Remove default margin */
}

/* For Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

app-card.profile .profile-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

app-card.profile .profile-info > .profile-info__avatar {
  padding: 4px;
  width: 68px;
  height: 68px;
  border-radius: 50px;
}

app-card.profile .profile-info > .profile-info__avatar > img {
  border-radius: 50px;
  width: 68px;
  height: 68px;
}

app-card.profile .profile-info > .profile-info__data {
  color: rgba(87, 36, 17, 1);
  font-size: 18px;
  text-align: left;
}

app-card.profile .profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

app-card.profile .profile-stats > .profile-stats__item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-radius: 10px;
  padding: 20px 12px;
  background-color: rgba(255, 244, 223, 1);
}

app-card.profile .profile-stats > .profile-stats__item > .info {
  display: flex;
  align-items: center;
  gap: 6px;
}

app-card.profile .profile-stats > .profile-stats__item > .info > img {
  width: 34px;
  height: 34px;
  margin-bottom: 2px;
}

app-card.profile .profile-stats > .profile-stats__item > .description {
  font-size: 18px;
  color: rgba(156, 111, 94, 1);
}

.popup__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.popup__main > .reward-item {
  display: flex;
  color: #ffffff;
  font-size: 20px;
  font-family: "Lapsus Pro", sans-serif;
  gap: 4px;
}

.popup__main > .reward-description {
  display: flex;
  margin-top: 14px;
  text-align: center;
}

.rating > .rating-table > .rating-table__footer {
  position: relative;
  align-self: center;
  width: 200px;
  bottom: 0;
}

#anim-rating-footer {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -5px;
}

/* Modifiers (backgrounds and etc) */
.--gap-10 {
  gap: 10px;
}

.--flex {
  display: flex;
}

.--flex-column {
  display: flex;
  flex-direction: column;
}

.--background-sea {
  position: relative;
  z-index: 0;
}

.--background-sea::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  background: url("background_sea.svg") center/cover no-repeat;
  z-index: -1;
}

.--wood-effect-1 {
  background: linear-gradient(180deg, #f1a84a, #d07834),
    url("sprites/wood-effect-1.png");

  background-repeat: no-repeat, repeat-x;
  background-position: center, top left;
  background-size: cover;

  background-blend-mode: multiply, normal;
}

.--wood-effect-2 {
  background: linear-gradient(180deg, #f1a84a, #d07834),
    url("sprites/wood-effect-2.png");

  background-repeat: no-repeat, repeat-x;
  background-position: center, top left;
  background-size: cover;

  background-blend-mode: multiply, normal;
}

.btn.--wood-effect-1,
.btn.--wood-effect-2 {
  border-radius: 50px;
  overflow: hidden;
  background-clip: padding-box;
}

.--bg-glass {
  color: white;
  background: rgba(56, 59, 71, 0.25);
  backdrop-filter: blur(29.7px);
  -webkit-backdrop-filter: blur(29.7px);
}

.--font-lapsus {
  font-family: "Lapsus Pro", sans-serif;
}

.--115vh {
  min-height: 115vh;
}

.--text-truncate {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.--no-bg {
  background: initial;

  background-repeat: initial;
  background-position: initial;
  background-size: initial;

  background-blend-mode: initial;
}

.--justify-center {
  display: flex;
  justify-content: center;
}

/* app-card.--no-bg {
  background: initial;

  background-repeat: initial;
  background-position: initial;
  background-size: initial;

  background-blend-mode: initial;
} */

#stageFlappy {
  position: fixed;
  inset: 0; /* растянуть по окну */
  width: 100vw;
  height: 100vh; /* CSS-размер для событий мыши/тача */
  display: block;
  touch-action: none;
}

.list-item {
  margin-bottom: 8px;
}

/* TIC TAC TOE STYLES */

.ttt-root {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 100vh;
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
  box-sizing: border-box;
}

.ttt-root::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  background: radial-gradient(
      circle at center,
      rgba(0, 0, 0, 0) 70%,
      rgba(0, 0, 0, 0.7) 100%
    ),
    url("tic-tac-toe-bg.svg") center/cover no-repeat;
  z-index: -1;
}

.board-wrapper {
  position: relative;
  top: 50px;
  width: 100%;
  height: 500px;

  background: url("sprites/game-result-popup-bg.svg");

  background-repeat: no-repeat, repeat-x;
  background-position: center, top left;
  background-size: contain;

  background-blend-mode: multiply, normal;
  box-shadow: none;
}

.board-wrapper .board-wrapper__extra-header {
  width: 375px;
  margin: 0 auto;
  position: relative;
}

/* СТАТИЧНАЯ КАРТИНКА ДЛЯ ТИКТАКТОУ */
/* .board-wrapper .board-wrapper__extra-header::before {
  content: "";
  position: absolute;
  top: -125px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 190px;
  z-index: -1;
  background: url("../tic-tac-toe-patrick.svg") center/cover no-repeat;
} */

#tictac-preloader {
  width: 200px;
  top: -150px;
  transform: translateX(-50%);
  left: 50%;
  position: absolute;
  z-index: -1;
}

.board-wrapper .board-wrapper__header {
  display: flex;
  flex-direction: column;
  text-align: center;
  justify-content: flex-end;
  height: 100px;
  font-family: "Lapsus Pro", sans-serif;
  font-size: 32px;
  color: rgba(87, 36, 17, 1);
}

.board-wrapper .board-wrapper__footer {
  display: flex;
  text-align: center;
  flex-direction: column;
  justify-content: center;
  height: 100px;
  font-family: "Lapsus Pro", sans-serif;
  font-size: 32px;
  color: rgba(87, 36, 17, 1);
}

/* Tic Tac Toe board grid fixes (iOS/iPhone 11) */
#board.board--3x3 {
  border: 1px solid rgba(87, 36, 17, 1);
  width: 242px;
  border-radius: 4px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Remove doubled borders set inline and add single inner separators */
#board.board--3x3 > button {
  border: none !important;
  border-radius: 0 !important;
  background-color: transparent;
}

/* Single inner grid lines */
#board.board--3x3 > button {
  border-right: 1px solid rgba(87, 36, 17, 1) !important;
  border-bottom: 1px solid rgba(87, 36, 17, 1) !important;
}
#board.board--3x3 > button:nth-child(3n) {
  border-right: none !important;
}
#board.board--3x3 > button:nth-child(n+7) {
  border-bottom: none !important;
}

.preloader {
  min-height: 70vh; /* чтобы было пространство для центровки */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#sword-preloader {
  position: relative;
  right: 25px;
  width: 360px; /* или % от контейнера */
  height: 360px;
  margin-bottom: 12px; /* отступ от текста "Загрузка" */
}

/* делаем фон видимым: даём высоту и корректный background */
.preloader-static {
  width: 340px; /* под твой макет 340px */
  height: 240px; /* ключ: теперь элемент имеет высоту */
  background: url("preloader-static.svg") center/contain no-repeat;
}

/* "Загрузка…" с бегущими точками */
.loading-text {
  font-size: 50px;
  /* line-height: 1.2; */
  color: white;
}

/* фейковый прогресс-бар в футере (без изменения HTML) */
.progress-bar {
  position: relative;
  height: 20px;
  border-radius: 25px;
  background: rgba(87, 36, 17, 1);
  overflow: hidden;
}
.progress-bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 0%);
  transition: width 0.9s ease;
  border-width: 3px 0; /* сверху и снизу по 3px */
  border-style: solid;
  border-image: linear-gradient(
      to bottom,
      rgba(250, 254, 92, 1),
      /* светлый сверху */ rgba(121, 129, 1, 1) /* тёмный снизу */
    )
    1;
  background: rgba(171, 189, 45, 1);
}

/* если оставляешь затемнение, держим как псевдо-элемент (из прошлого шага) */
.vignette::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: rgba(5, 14, 22, 0.72);
}


