html, body {
  height: 100vh;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #2d241c;
  overflow: hidden;
 
  
}
*, *::before, *::after {
  box-sizing: inherit;
}
body {
  min-height: 100vh;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  align-items: stretch;
}
.game-container {
  height: 100vh;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@supports (height: 100svh) {
  html, body {
    height: 100svh;
    min-height: 100svh;
  }
  .game-container {
    height: 100svh;
    min-height: 100svh;
  }
}
@supports (height: 100dvh) {
  html, body {
    height: 100dvh;
    min-height: 100dvh;
  }
  .game-container {
    height: 100dvh;
    min-height: 100dvh;
  }
}
html, body, .game-container {
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
@media (max-width: 600px) {
  html, body, .game-container {
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
  }
  html, body, .game-container {
    height: -webkit-fill-available;
    min-height: -webkit-fill-available;
    max-height: -webkit-fill-available;
  }
}
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: block;
  height: 50px;
  min-height: 50px;
  border-bottom: 2px solid #1a120a;
  background: #2d241c;
  background-image: url(../img/texture/texture.jpg);
  background-repeat: repeat;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 4px 18px #0008;
  padding: 0 24px 0px 24px;
  z-index: 100;
  overflow: hidden;
}

.top-bar::after {
  content: '';
  display: table;
  clear: both;
}
.top-bar .coins, .top-bar .gems {
  display: block;
  float: left;
  align-items: center;
  background: none;
  border-radius: 0;
  box-shadow: none;
  padding: 4px 10px;
  font-size: 1.1em;
  font-weight: bold;
  color: #fff;
  margin: 0;
  line-height: 42px;
}
.top-bar .icon-img {
  width: 1.7em !important;
  height: 1.7em !important;
  margin: 0;
  filter: none;
}

.top-bar .gems {
  background: none;
  float: right;
  display: none;
}

/* Энергия: прогресс-бар в левом верхнем углу */
.energy-progress-bar-container {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 15vw;
  min-width: 120px;
  max-width: 300px;
  height: 22px;
  background: #1a2d1a;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0003;
  z-index: 10;
  overflow: hidden;
  display: flex;
  align-items: center;
  /* Для абсолютного позиционирования текста */
  justify-content: center;
}
.energy-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4be04b 0%, #1fa01f 100%);
  border-radius: 12px 0 0 12px;
  transition: width 0.3s;
  box-shadow: 0 1px 4px #0002;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
}
.energy-progress-bar-text {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 1em;
  white-space: nowrap;
  text-shadow: 0 1px 2px #000a;
  z-index: 2;
  pointer-events: none;
  gap: 4px;
}
.energy-progress-bar-text .icon-img {
  width: 1.2em !important;
  height: 1.2em !important;
  margin: 0;
  filter: drop-shadow(0 1px 2px #000a);
}
@media (max-width: 600px) {
  .energy-progress-bar-container {
    top: 16px;
    left: 8px;
    width: 40vw;
    min-width: 120px;
    max-width: 160px;
    height: 16px;
  }
  .energy-progress-bar-text {
    font-size: 0.85em;
  }
}
/* Удаляем старые стили прогресс-бара */
.progress-bar-container, .progress-bar {
  display: none !important;
}
.main-content {
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  height: calc(100% - 166px);
  display: block;
  width: 100%;
  min-height: 0;
  min-width: 0;
  background: linear-gradient(to bottom, #a3d18b 60%, #6b8e4e 100%);
  overflow: hidden;
  text-align: center;
}
.pet-image2 {
  position: absolute;
  left: 50%;
  bottom: 0px;
  transform: translateX(-50%);
  z-index: 0;
  width: min(98%, 85vh);
  height: min(98%, 85vh);
  min-width: 180px;
  min-height: 180px;
  max-width: 98%;
  max-height: calc(85vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.1s ease;
  transform-origin: center bottom;
}

.pet-image {
  position: absolute;
  left: 50%;
  bottom: 0px;
  transform: translateX(-50%);
  z-index: 0;
  width: min(98%, 85vh);
  height: min(98%, 85vh);
  min-width: 180px;
  min-height: 180px;
  max-width: 98%;
  max-height: calc(85vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.1s ease;
  transform-origin: center bottom;
}
.pet-image img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  display: block;
}
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: block !important;
  background: rgba(66, 66, 66, 1);
  padding: 5px;
  border-top: 2px solid #1a120a;
  background-image: url('../img/texture/texture.jpg');
  background-repeat: repeat;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -2px 12px #0006;
  height: 116px;
  min-height: 70px;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 100;
  overflow: hidden;
}


.bottom-bar .btn {
  display: block;
  float: left;
  width: calc((100% - 20px) / 4);
  height: 100%;
  background: rgba(66, 66, 66, 1);
  border-radius: 18px;
  box-shadow: 0 2px 8px #0004, 0 1px 0 #fff1 inset;
  margin: 0 2px;
  padding: 0;
  cursor: pointer;
  transition: box-shadow 0.2s, background 0.2s, color 0.2s;
  border: none;
  outline: none;
  position: relative;
  z-index: 101;
  text-align: center;
  padding-top: 10px;
  box-sizing: border-box;
}

.bottom-bar .icon-img {
  width: 55px !important;
  height: 55px !important;
  margin: 0 auto 6px auto!important;
  filter: drop-shadow(0 2px 4px #0006);
  display: block;
}
.bottom-bar .btn span {
  color: #fff;
  font-size: 0.9em;
  font-weight: bold;
  text-shadow: 0 2px 6px #000a, 0 1px 0 #fff2;
  margin: 0;
  padding: 0;
  line-height: 1.5;
  display: block;
  text-align: center;
}
.btn {
  cursor: pointer;
}
.main-content-inner {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.main-content-character-block {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  position: relative;
}

.upgrades-wrapper {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}
.upgrades-inner {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: #3a3126;
  border-radius: 0;
  box-shadow: 0 0 10px #0004;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-y: auto;
}
.upgrade-list {
  width: 100vw;
  min-width: 100vw;
  max-width: 100vw;
  gap: 20px;
  justify-content: flex-start;
  align-items: stretch;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 20px 16px;
  position: relative;
  z-index: 2;
}
.upgrade-item {
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(135deg, #2d241c 0%, #3a3126 100%);
  border: 2px solid #4a3d2e;
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 20px 24px;
  box-shadow: 0 4px 16px #0004, inset 0 1px 0 rgba(255, 255, 255, 0.1);
  gap: 20px;
  position: relative;
  margin: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}



.upgrade-item.disabled,
.upgrade-item.disabled * {
  filter: grayscale(100%) !important;
  opacity: 0.6 !important;
  pointer-events: none !important;
}

.upgrade-item.disabled .upgrade-icon {
  filter: grayscale(100%) !important;
}

.upgrade-item.disabled .upgrade-name,
.upgrade-item.disabled .upgrade-desc,
.upgrade-item.disabled .upgrade-level {
  color: #999 !important;
}


/* Стили для иконок апгрейдов */
.upgrade-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4em;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, #4a3d2e 0%, #6a543a 100%);
  border: 3px solid #ffb300;
  box-shadow: 0 4px 12px #0006, inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  padding: 12px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.upgrade-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px #0008, inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: #ffd700;
}
.upgrade-icon::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.8em;
  z-index: 1;
  line-height: 1;
}
@media (max-width: 600px) {
  .upgrade-icon {
    width: 44px;
    height: 44px;
    font-size: 1.4em;
    padding: 6px;
  }
  .upgrade-icon::before {
    font-size: 1.2em;
  }
}

/* Стили для контейнера действий справа */
.upgrade-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 100px;
}

/* Стили для кнопок апгрейдов */
.buy-btn, .get-btn, .update-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 90px;
  cursor: pointer;
  background: linear-gradient(135deg, #6a543a 0%, #8b6f4a 100%);
  color: #ffe082;
  border: 2px solid #4a3d2e;
  border-radius: 16px;
  padding: 12px 20px;
  font-size: 1.1em;
  font-weight: bold;
  box-shadow: 0 3px 8px #0004, inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

.buy-btn::before, .get-btn::before, .update-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.buy-btn:hover::before, .get-btn:hover::before, .update-btn:hover::before {
  left: 100%;
}
/* Специальные стили для кнопки Get - зеленый цвет */
.get-btn {
  background: #4caf50 !important;
  color: #fff !important;
}
.get-btn:hover {
  background: #45a049 !important;
  color: #fff !important;
}
.buy-btn:hover, .update-btn:hover {
  background: #ffb300;
  color: #fff;
}
.buy-btn .coin-icon, .get-btn .coin-icon, .update-btn .coin-icon {
  font-size: 1.2em;
}
.buy-btn .cost-text, .get-btn .cost-text, .update-btn .cost-text {
  font-size: 0.9em;
  color: #ffe082;
  font-weight: normal;
}
/* Специальные стили для текста кнопки Get */
.get-btn .cost-text {
  color: #fff !important;
}

/* Стили для стоимости под кнопкой */
.upgrade-cost {
  text-align: center;
  font-size: 0.9em;
  color: #ffe082;
  font-weight: bold;
  margin-top: 0;
  line-height: 1.2;
  display: block;
  width: 100%;
}

.upgrade-info {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.upgrade-name {
  font-size: 1.3em;
  font-weight: bold;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 2px 4px #000a;
  margin-bottom: 4px;
}
.upgrade-level {
  font-size: 1.1em;
  color: #ffb300;
  margin-left: 8px;
  font-weight: bold;
  text-shadow: 0 1px 2px #000a;
}
.upgrade-desc {
  color: #d0d0d0;
  font-size: 1em;
  line-height: 1.4;
  text-shadow: 0 1px 2px #000a;
}
.upgrade-btn {
  background: #6a543a;
  color: #ffe082;
  border: none;
  border-radius: 12px;
  padding: 8px 18px;
  font-size: 1.1em;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 4px #0002;
  cursor: pointer;
  transition: background 0.2s;
}
.upgrade-btn:hover {
  background: #ffb300;
  color: #fff;
}
.coin-icon {
  font-size: 1.2em;
}
.upgrades-inner {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: #3a3126;
  border-radius: 0;
  box-shadow: 0 0 10px #0004;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-y: auto;
}
@media (max-width: 600px) {
  .upgrades-inner {
    border-radius: 0;
    margin: 0;
    padding: 0;
  }
  .upgrades-wrapper {
    margin: 0;
    border-radius: 0;
    padding: 0;
  }
  .upgrade-list {
    max-width: 100vw;
    gap: 10px;
    margin: 0;
    padding: 0;
  }
  .upgrade-item {
    padding: 10px 6px;
    border-radius: 8px;
    gap: 8px;
    margin: 0;
  }
  .upgrade-icon {
    width: 44px;
    height: 44px;
    font-size: 1.4em;
  }
}
@media (max-width: 480px) {
  .game-container {
    border-radius: 0;
    max-width: 100vw;
    height: 100vh;
  }
  .pet-image, .pet-image2 {
    width: 80vw;
    min-width: 120px;
  }
} 

/* --- TASKS PAGE --- */
.tasks-wrapper {
  position: absolute;
  top: 0px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: #3a3126;
  padding: 0;
  overflow: hidden;
}
.tasks-top-bar, .airdrop-top-bar, .friends-top-bar, .upgrades-top-bar, .rating-top-bar, .shop-top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  color: #fff;
  padding: 0;
  font-size: 1em;
  font-weight: normal;
  margin-bottom: 0;
  margin-top: 0;
  width: 100%;
}
/* --- Единый стиль для всех заголовков экранов --- */
.upgrades-title, .tasks-title, .friends-title, .airdrop-title, .shop-title, .rating-title {
  font-size: 2.2em;
  font-weight: bold;
  color: #fff;
  letter-spacing: 2px;
  margin: 0;
  text-align: center;
  text-shadow: 0 3px 6px #000a, 0 1px 0 #ffb300;
  background: linear-gradient(135deg, #2d241c 0%, #3a3126 100%);
  border-bottom: 3px solid #ffb300;
  padding: 20px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes glow {
  from { text-shadow: 0 0 15px #ffb300; }
  to { text-shadow: 0 0 25px #ffb300, 0 0 35px #ffb300; }
}
@media (max-width: 600px) {
  .upgrades-title, .tasks-title, .airdrop-title, .friends-title, .shop-title, .rating-title {
    font-size: 1.3em;
  }
}
.tasks-currency, .tasks-gems {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #6a543a;
  border-radius: 12px;
  padding: 4px 10px;
}
.tasks-gems {
  background: #2e2e3a;
  color: #7eeaff;
}
.tasks-list {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 12px 0 12px;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  min-height: 0;
}
.task-item {
  display: flex;
  align-items: center;
  background: #23201c;
  border-radius: 16px;
  box-shadow: 0 2px 8px #0002;
  padding: 16px 18px;
  gap: 18px;
  width: 100%;
  min-height: 80px;
}
.task-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2em;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 1px 4px #0002;
}
.task-info {
  flex: 1 1 auto;
  color: #fff;
  font-size: 1.2em;
  font-weight: 500;
  margin-left: 8px;
}
.task-reward {
  background: #2e2e3a;
  color: #7eeaff;
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 1.1em;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 4px #0002;
}
@media (max-width: 600px) {
  .tasks-top-bar, .airdrop-top-bar, .friends-top-bar {
    font-size: 1em;
  }
  .tasks-title {
    font-size: 1.3em;
  }
  .tasks-list {
    gap: 10px;
    padding: 12px 2px 0 2px;
  }
  .task-item {
    padding: 10px 6px;
    border-radius: 8px;
    gap: 8px;
    min-height: 60px;
  }
  .task-icon {
    width: 44px;
    height: 44px;
    font-size: 1.4em;
  }
  .task-info {
    font-size: 1em;
  }
  .task-reward {
    padding: 6px 10px;
    font-size: 1em;
  }
  .tasks-wrapper, .airdrop-wrapper, .friends-wrapper, .rating-wrapper, .shop-wrapper {
    padding-bottom: 0;
  }
}
@media (max-width: 480px) {
  .tasks-wrapper {
    border-radius: 0;
    max-width: 100vw;
    min-height: 100vh;
  }
  .task-icon {
    width: 36px;
    height: 36px;
    font-size: 1em;
  }
} 

/* --- СТИЛИ ДЛЯ ЗАДАНИЙ В СТИЛЕ ИГРЫ --- */
.tasks-inner {
  width: 100vw;
  max-width: 100vw;
  margin: 0 auto;
  padding: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  flex: 1 1 auto;
}
.task-list {
  width: 100vw;
  min-width: 100vw;
  max-width: 100vw;
  gap: 18px;
  justify-content: flex-start;
  align-items: stretch;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}
.task-item {
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  background: #23201c;
  border-radius: 16px;
  display: flex;
  align-items: center;
  padding: 16px 18px;
  box-shadow: 0 2px 8px #0002;
  gap: 16px;
  position: relative;
  min-height: 90px;
}
.task-pic {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  background: #3a332a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px #0002;
  flex-shrink: 0;
}
.task-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.task-info {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.task-name {
  font-size: 1.2em;
  font-weight: bold;
  color: #fff;
  margin-bottom: 2px;
}
.task-descript {
  font-size: 1em;
  color: #ffe082;
  opacity: 0.95;
}
.task-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-left: auto;
  min-width: 110px;
}
.task-btn {
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 8px 18px;
  font-size: 1.1em;
  font-weight: bold;
  box-shadow: 0 1px 4px #0002;
  cursor: pointer;
  transition: background 0.2s;
}
.task-btn:hover {
  background: #45a049;
}
.task-cost {
  text-align: center;
  font-size: 0.95em;
  color: #ffe082;
  font-weight: bold;
  margin-top: 0;
  line-height: 1.2;
  display: block;
  width: 100%;
}
@media (max-width: 600px) {
  .tasks-inner {
    padding: 0 0 12px 0;
  }
  .task-list {
    gap: 10px;
  }
  .task-item {
    padding: 10px 6px;
    gap: 8px;
    min-height: 60px;
  }
  .task-pic {
    width: 40px;
    height: 40px;
    border-radius: 8px;
  }
  .task-name {
    font-size: 1em;
  }
  .task-descript {
    font-size: 0.92em;
  }
  .task-actions {
    min-width: 70px;
  }
  .task-btn {
    padding: 6px 10px;
    font-size: 0.95em;
  }
  .task-cost {
    font-size: 0.85em;
  }
}
/* --- КОНЕЦ СТИЛЕЙ ДЛЯ ЗАДАНИЙ --- */

.airdrop-page {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  background: #3a3126;
  box-sizing: border-box;
  padding: 24px 12px 0 12px;
} 

.airdrop-wrapper {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: #3a3126;
  padding: 0;
  overflow: hidden;
}


.airdrop-inner {
  max-width: 100vw;
  width: 100vw;
  border-radius: 0;
  margin: 0;
  padding: 32px 0 24px 0;
}
@media (max-width: 600px) {
  .airdrop-inner {
    padding: 18px 0 12px 0;
    border-radius: 0;
    max-width: 100vw;
    width: 100vw;
  }
}
.airdrop-row {
  display: flex;
  align-items: center;
  background: #23201c;
  border-radius: 16px;
  box-shadow: 0 2px 8px #0002;
  padding: 16px 18px;
  gap: 18px;
  width: 100%;
  min-height: 80px;
  margin-bottom: 18px;
}
.airdrop-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2em;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 1px 4px #0002;
}
.airdrop-label {
  flex: 1 1 auto;
  color: #fff;
  font-size: 1.2em;
  font-weight: 500;
  margin-left: 8px;
}
.airdrop-value {
  background: #2e2e3a;
  color: #7eeaff;
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 1.1em;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 4px #0002;
  min-width: 48px;
  text-align: right;
  justify-content: center;
}
.airdrop-desc {
  margin-top: 24px;
  color: #ffe082;
  font-size: 1.25em;
  text-align: center;
  line-height: 1.3;
}
@media (max-width: 600px) {
  .airdrop-inner {
    padding: 18px 4px 12px 4px;
    border-radius: 12px;
    max-width: 100vw;
  }
  .airdrop-row {
    gap: 8px;
    margin-bottom: 10px;
  }
  .airdrop-icon {
    width: 44px;
    height: 44px;
    font-size: 1.4em;
    border-radius: 8px;
  }
  .airdrop-label {
    font-size: 1em;
  }
  .airdrop-value {
    font-size: 1.3em;
    min-width: 32px;
  }
  .airdrop-desc {
    font-size: 1em;
    margin-top: 14px;
  }
} 

/* Стили для неактивных кнопок */
.upgrade-btn.disabled {
  background: #4a4a4a !important;
  color: #888 !important;
  cursor: not-allowed !important;
  opacity: 0.6;
  pointer-events: none;
}
.upgrade-btn.disabled:hover {
  background: #4a4a4a !important;
  color: #888 !important;
}
.upgrade-btn.disabled .coin-icon,
.upgrade-btn.disabled .cost-text {
  color: #888 !important;
}
.upgrade-btn.disabled .cost-text {
  color: #888 !important;
}

/* Стили для стоимости под неактивной кнопкой */
.upgrade-cost.disabled {
  color: #888 !important;
  opacity: 0.6;
} 

/* Стили для прогресс-бара апгрейдов */
.upgrade-progress-container {
  margin-top: 8px;
  background: #2d241c;
  border-radius: 8px;
  overflow: hidden;
  height: 16px;
  position: relative;
  box-shadow: 0 1px 2px #0002;
}
.upgrade-progress-bar {
  background: linear-gradient(90deg, #4be04b 0%, #1fa01f 100%);
  height: 100%;
  transition: width 0.3s;
  box-shadow: 0 1px 4px #0002;
  position: relative;
  min-width: 0; /* Убираем минимальную ширину, чтобы прогресс мог начинаться с 0 */
}
.upgrade-progress-percent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7em;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 2px #000a;
  white-space: nowrap;
  z-index: 2;
  text-align: center;
  line-height: 1;
  padding: 0 2px;
}
.upgrade-timer {
  margin-top: 4px;
  font-size: 0.8em;
  font-weight: bold;
  color: #ffe082;
  text-align: center;
  text-shadow: 0 1px 2px #000a;
} 

/* Стили для страницы Friends */
.friends-wrapper {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: #3a3126;
  padding: 0;
  overflow: hidden;
}

.friends-top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  color: #fff;
  padding: 0;
  font-size: 1em;
  font-weight: normal;
  margin-bottom: 16px;
  margin-top: 8px;
}



.friends-count {
  font-size: 1em;
  color: #4CAF50;
  font-weight: bold;
  text-align: center;
  padding: 12px 16px;
  margin-bottom: 12px;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(76, 175, 80, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.friends-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 24px 12px;
}

.friend-item {
  display: flex;
  align-items: center;
  background: #23201c;
  border-radius: 16px;
  box-shadow: 0 2px 8px #0002;
  padding: 16px 18px;
  gap: 18px;
  width: 100%;
  min-height: 80px;
  margin-bottom: 12px;
}

.friend-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8em;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 1px 4px #0002;
}

.friend-info {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.friend-name {
  color: #fff;
  font-size: 1.1em;
  font-weight: 500;
}

.friend-level {
  color: #ffe082;
  font-size: 0.9em;
}

.friend-rubins {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: #fff;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.rubin-icon {
  font-size: 1.1em;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.rubin-count {
  font-size: 1em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.friends-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 3em;
  margin-bottom: 16px;
}

.empty-text {
  color: #fff;
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 8px;
}

.empty-desc {
  color: #ffe082;
  font-size: 1em;
}

/* Стили для страницы Rating */
.rating-wrapper {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: #3a3126;
  padding: 0;
  overflow: hidden;
}





.rating-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 24px 12px;
}

.rating-item {
  display: flex;
  align-items: center;
  background: #23201c;
  border-radius: 16px;
  box-shadow: 0 2px 8px #0002;
  padding: 16px 18px;
  gap: 18px;
  width: 100%;
  min-height: 80px;
  margin-bottom: 12px;
}

.rating-item.top-1 {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  border: 2px solid #FFD700;
}

.rating-item.top-2 {
  background: linear-gradient(135deg, #C0C0C0 0%, #A0A0A0 100%);
  border: 2px solid #C0C0C0;
}

.rating-item.top-3 {
  background: linear-gradient(135deg, #CD7F32 0%, #B8860B 100%);
  border: 2px solid #CD7F32;
}

.rating-item.current {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  border: 2px solid #4CAF50;
}

.rating-position {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  font-weight: bold;
  color: #fff;
  background: #333;
  flex-shrink: 0;
}

.rating-item.top-1 .rating-position {
  background: #FFD700;
  color: #000;
}

.rating-item.top-2 .rating-position {
  background: #C0C0C0;
  color: #000;
}

.rating-item.top-3 .rating-position {
  background: #CD7F32;
  color: #fff;
}

.rating-item.current .rating-position {
  background: #4CAF50;
  color: #fff;
}

.rating-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8em;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 1px 4px #0002;
}

.rating-info {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rating-name {
  color: #fff;
  font-size: 1.1em;
  font-weight: 500;
}

.rating-level {
  color: #ffe082;
  font-size: 0.9em;
}

.rating-score {
  color: #4CAF50;
  font-size: 1.1em;
  font-weight: bold;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 600px) {
  .friends-list, .rating-list {
    padding: 0 8px 16px 8px;
  }
  
  .friend-item, .rating-item {
    padding: 12px 14px;
    gap: 12px;
    margin-bottom: 8px;
  }
  
  .friend-avatar, .rating-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.5em;
  }
  
  .rating-position {
    width: 32px;
    height: 32px;
    font-size: 1em;
  }
  
  .friend-name, .rating-name {
    font-size: 1em;
  }
  
  .friend-level, .rating-level {
    font-size: 0.8em;
  }
  
  .friends-count {
    font-size: 0.9em;
    padding: 10px 12px;
    margin-bottom: 8px;
  }
  
  .friend-rubins {
    padding: 6px 10px;
  }
  
  .rubin-icon {
    font-size: 1em;
  }
  
  .rubin-count {
    font-size: 0.9em;
  }
  
  .rating-score {
    font-size: 1em;
  }
} 

/* Стили для страницы рейтинга в игровом стиле */

.rating-tabs {
  display: none;
  width: 97%;
  justify-content: center;
  background: linear-gradient(90deg, #3a3126 0%, #2d241c 100%);
  border-radius: 18px;
  box-shadow: 0 2px 8px #0004, 0 4px 16px #bfa76f22 inset;
  margin: 16px 16px 24px 16px;
  gap: 0;
  border: 2px solid #bfa76f;
  overflow: hidden;
  min-height: 54px;
  position: relative;
  z-index: 2;
}

.rating-tab {
  flex: 1 1 0;
  text-align: center;
  padding: 14px 0 14px 0;
  font-size: 1.1em;
  font-weight: bold;
  color: #ffe082;
  background: linear-gradient(180deg, #3a3126 60%, #23201c 100%);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  outline: none;
  border-right: 1px solid #bfa76f44;
  opacity: 1 !important;
  box-shadow: 0 1px 4px #0002 inset;
  letter-spacing: 1px;
  position: relative;
  text-shadow: 0 1px 2px #000a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.rating-tab:last-child {
  border-right: none;
}

.rating-tab:hover {
  background: linear-gradient(180deg, #4b3b2a 60%, #bfa76f33 100%);
  color: #fffbe6;
  box-shadow: 0 2px 12px #bfa76f44 inset, 0 1px 8px #0002;
  z-index: 3;
}

.rating-tab-active {
  background: linear-gradient(180deg, #ffe082 0%, #bfa76f 100%);
  color: #2d241c;
  box-shadow: 0 4px 24px #bfa76f66 inset, 0 2px 8px #bfa76f44 inset, 0 1px 8px #0002;
  z-index: 4;
  text-shadow: 0 1px 2px #000a;
  font-weight: bold;
}

.rating-tab .icon-img {
  width: 1.2em !important;
  height: 1.2em !important;
  filter: drop-shadow(0 1px 2px #000a);
}

.rating-tab-active .icon-img {
  filter: drop-shadow(0 1px 2px #000a);
}

@media (max-width: 600px) {
  .rating-tabs {
    font-size: 1em;
    margin: 12px 12px 20px 12px;
    border-radius: 12px;
    min-height: 48px;
  }
  
  .rating-tab {
    padding: 12px 0 10px 0;
    font-size: 0.9em;
  }
  
  .rating-tab .icon-img {
    width: 1em !important;
    height: 1em !important;
  }
}










.rating-leaderboard {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 24px 12px;
  margin-top: 12px
}



.leaderboard-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  padding: 16px 18px;
  gap: 16px;
  width: 100%;
  min-height: 80px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.leaderboard-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.leaderboard-item.champion {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.1) 100%);
  border: 2px solid #FFD700;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.leaderboard-item.silver {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.2) 0%, rgba(160, 160, 160, 0.1) 100%);
  border: 2px solid #C0C0C0;
  box-shadow: 0 4px 12px rgba(192, 192, 192, 0.3);
}

.leaderboard-item.bronze {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.2) 0%, rgba(184, 134, 11, 0.1) 100%);
  border: 2px solid #CD7F32;
  box-shadow: 0 4px 12px rgba(205, 127, 50, 0.3);
}

.leaderboard-item.current-player {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(69, 160, 73, 0.1) 100%);
  border: 2px solid #4CAF50;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.leaderboard-position {
  font-size: 1.2em;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  min-width: 40px;
  text-align: center;
}

.leaderboard-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8em;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.leaderboard-info {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.leaderboard-name {
  color: #fff;
  font-size: 1.1em;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.leaderboard-level {
  color: #ffe082;
  font-size: 0.9em;
  opacity: 0.8;
}

.leaderboard-score {
  color: #4CAF50;
  font-size: 1.1em;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  min-width: 100px;
  text-align: right;
}



/* Адаптивность для мобильных устройств */
@media (max-width: 600px) {

  
  .rating-leaderboard {
    padding: 16px 12px 20px 12px;
  }
  
  .leaderboard-item {
    padding: 12px 14px;
    gap: 12px;
    margin-bottom: 8px;
  }
  
  .leaderboard-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.5em;
  }
  
  .leaderboard-name {
    font-size: 1em;
  }
  
  .leaderboard-level {
    font-size: 0.8em;
  }
  
  .leaderboard-score {
    font-size: 1em;
    min-width: 80px;
  }
  
  .rating-title {
    font-size: 1.4em;
  }
  

} 
.shop-wrapper {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: #2d241c;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.shop-page {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: #2d241c;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.shop-tabs {
  display: flex;
  width: 97%;
  justify-content: center;
  background: linear-gradient(90deg, #3a3126 0%, #2d241c 100%);
  border-radius: 18px;
  box-shadow: 0 2px 8px #0004, 0 4px 16px #bfa76f22 inset;
  margin: 16px 16px 24px 16px;
  gap: 0;
  border: 2px solid #bfa76f;
  overflow: hidden;
  min-height: 54px;
  position: relative;
  z-index: 2;
}
.shop-tab {
  flex: 1 1 0;
  text-align: center;
  padding: 14px 0 14px 0;
  font-size: 1.5em;
  font-weight: bold;
  color: #ffe082;
  background: linear-gradient(180deg, #3a3126 60%, #23201c 100%);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  outline: none;
  border-right: 1px solid #bfa76f44;
  opacity: 1 !important;
  box-shadow: 0 1px 4px #0002 inset;
  letter-spacing: 1px;
  position: relative;
  text-shadow: 0 1px 2px #000a;
}
.shop-tab:last-child {
  border-right: none;
}
.shop-tab:hover {
  background: linear-gradient(180deg, #4b3b2a 60%, #bfa76f33 100%);
  color: #fffbe6;
  box-shadow: 0 2px 12px #bfa76f44 inset, 0 1px 8px #0002;
  z-index: 3;
}
.shop-tab-active {
  background: linear-gradient(180deg, #ffe082 0%, #bfa76f 100%);
  color: #2d241c;
  box-shadow: 0 4px 24px #bfa76f66 inset, 0 2px 8px #bfa76f44 inset, 0 1px 8px #0002;
  z-index: 4;
  text-shadow: 0 1px 2px #000a;
  font-weight: bold;
}

.shop-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 16px;
  box-sizing: border-box;
  flex: 1 1 auto;
  overflow-y: auto;
}
.shop-items-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  margin: 0 auto 16px auto;
  max-width: 100%;
  align-items: stretch;
}
.shop-item {
  flex: 0 0 calc(33.333% - 8px);
  min-width: 0;
  max-width: calc(33.333% - 8px);
  min-height: 120px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #2d241c 0%, #3a3126 100%);
  border: 2px solid #4a3d2e;
  border-radius: 16px;
  box-shadow: 0 4px 16px #0004, inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  width: calc(33.333% - 8px);
  position: relative;
  backdrop-filter: blur(5px);
  overflow: hidden;
  height: auto;
}
@media (max-width: 900px) {
  .shop-items-row {
    gap: 10px;
    width: 100%;
  }
  .shop-item {
    min-width: 0;
    max-width: calc(33.333% - 7px);
    min-height: 120px;
    padding: 0;
    flex: 0 0 calc(33.333% - 7px);
    width: calc(33.333% - 7px);
  }
  .shop-item-img {
    width: 100%;
    height: auto;
    min-height: 60px;
    flex: 1 1 auto;
  }
  .shop-select-btn {
    padding: 10px 14px;
    font-size: 0.95em;
  }
  .shop-select-btn .icon-img {
    width: 1.1em !important;
    height: 1.1em !important;
  }
}
@media (max-width: 600px) {
  .shop-title {
    font-size: 1.3em;
  }
  .shop-tabs {
    font-size: 1em;
    margin: 12px 12px 20px 12px;
    border-radius: 12px;
    min-height: 48px;
  }
  .shop-tab {
    padding: 14px 0 12px 0;
    font-size: 1.1em;
  }
  .shop-items-row {
    gap: 6px;
    justify-content: flex-start;
    width: 100%;
  }
  .shop-item {
    min-width: 0;
    max-width: calc(33.333% - 4px);
    min-height: 120px;
    padding: 0;
    flex: 0 0 calc(33.333% - 4px);
    width: calc(33.333% - 4px);
  }
  .shop-item-img {
    width: 100%;
    height: auto;
    min-height: 50px;
    flex: 1 1 auto;
  }
  .shop-select-btn {
    padding: 10px 12px;
    font-size: 0.9em;
  }
  .shop-select-btn .icon-img {
    width: 1em !important;
    height: 1em !important;
    margin-right: 3px;
  }
  .shop-bottom-bar {
    font-size: 0.9em;
    padding: 8px 0 6px 0;
  }
  .shop-bottom-btn .icon-img {
    width: 2em !important;
    height: 2em !important;
  }
}
.shop-item-img {
  width: 100%;
  height: auto;
  min-height: 250px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: none;
  box-shadow: none;
  flex: 1 1 auto;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}

.shop-coin-icon {
  font-size: 1.1em;
  filter: drop-shadow(0 1px 2px #000a);
  margin-right: 2px;
}

/* Стили для иконки в кнопке магазина */
.shop-select-btn .icon-img {
  width: 1.2em !important;
  height: 1.2em !important;
  margin-right: 4px;
  filter: drop-shadow(0 1px 2px #000a);
  display: inline-block;
  vertical-align: middle;
}
.shop-select-btn {
  margin: 0;
  background: linear-gradient(135deg, #bfa76f 0%, #ffe082 100%);
  color: #2d241c;
  border: none;
  border-radius: 0;
  padding: 12px 16px;
  font-size: 1em;
  font-weight: bold;
  box-shadow: 0 2px 8px #0004, inset 0 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
}

.shop-select-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.shop-select-btn:hover::before {
  left: 100%;
}
.shop-select-btn:hover {
  background: linear-gradient(135deg, #ffe082 0%, #ffd700 100%);
  color: #2d241c;
  box-shadow: 0 4px 12px #0006, inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Специальные стили для кнопки покупки */
.shop-select-btn.shop-buy-btn {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: #fff;
}

.shop-select-btn.shop-buy-btn:hover {
  background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
  color: #fff;
}



.shop-select-btn.shop-selected-btn {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
  color: #fff !important;
  cursor: not-allowed !important;
  opacity: 0.8;
}

.shop-select-btn.shop-selected-btn:hover {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px #0004, inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.shop-select-btn.shop-selected-btn::before {
  display: none !important;
}

/* Стили для состояния загрузки */
.shop-select-btn.loading {
  background: linear-gradient(135deg, #adb5bd 0%, #6c757d 100%) !important;
  color: #fff !important;
  cursor: wait !important;
  opacity: 0.7;
}

.shop-select-btn.loading:hover {
  background: linear-gradient(135deg, #adb5bd 0%, #6c757d 100%) !important;
  color: #fff !important;
}

.shop-select-btn.loading::before {
  display: none !important;
}

/* Стили для заблокированных кнопок */
.shop-select-btn:disabled {
  cursor: not-allowed !important;
  opacity: 0.6;
}

.shop-select-btn:disabled:hover {
  background: inherit !important;
  box-shadow: inherit !important;
}
.shop-bottom-bar {
  width: 100vw;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: linear-gradient(135deg, #3a3126 0%, #2d241c 100%);
  border-radius: 18px 18px 0 0;
  padding: 12px 0 8px 0;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 10;
  box-shadow: 0 -4px 16px #0004;
  border-top: 2px solid #1a120a;
}
.shop-bottom-btn {
  flex: 1 1 0;
  text-align: center;
  color: #fff;
  font-size: 1em;
  font-weight: bold;
  padding: 8px 0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-shadow: 0 1px 2px #000a;
}
.shop-bottom-btn-active {
  background: linear-gradient(135deg, #bfa76f 0%, #ffe082 100%);
  color: #2d241c;
  box-shadow: 0 2px 8px #0004, inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 2px #000a;
}


@media (max-width: 480px) {
  .shop-items-row {
    gap: 4px;
    width: 100%;
  }
  .shop-item {
    min-width: 0;
    min-height: 120px;
    width: calc(33.333% - 3px);
    max-width: calc(33.333% - 3px);
    flex: 0 0 calc(33.333% - 3px);
  }
  .shop-item-img {
    height: auto;
    min-height: 40px;
    flex: 1 1 auto;
  }
  .shop-select-btn {
    padding: 8px 10px;
    font-size: 0.85em;
  }
  .shop-select-btn .icon-img {
    width: 0.9em !important;
    height: 0.9em !important;
    margin-right: 2px;
  }
} 

/* --- ICONS --- */
.icon-img {
  display: inline-block;
  vertical-align: middle;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 1.5em;
  height: 1.5em;
}
.icon-coin { background-image: url('../img/icons/coin.png'); }
.icon-gem { background-image: url('../img/icons/gem.png'); }
.icon-shop { background-image: url('../img/icons/shop.png'); }
.icon-trophy { background-image: url('../img/icons/trophy.png'); }
.icon-home { background-image: url('../img/icons/home.png'); }
.icon-tools { background-image: url('../img/icons/tools.png'); }
.icon-tasks { background-image: url('../img/icons/tasks.png'); }
.icon-friends { background-image: url('../img/icons/friends.png'); }
.icon-gift { background-image: url('../img/icons/gift.png'); }
.icon-user { background-image: url('../img/icons/user.png'); }
.icon-group { background-image: url('../img/icons/group.png'); }
.icon-energy { background-image: url('../img/icons/energy.png'); }
.icon-rewarded { background-image: url('../img/icons/rewarded.png'); }
.icon-cursor { background-image: url('../img/icons/cursor.png'); }

/* Для top-bar и bottom-bar чуть увеличим */
.top-bar .icon-img, .bottom-bar .icon-img {
  width: 1.7em;
  height: 1.7em;
}

/* Для аватарок */
.friend-avatar .icon-img, .leaderboard-avatar .icon-img {
  width: 2.2em;
  height: 2.2em;
}


.shop-bottom-btn .icon-img {
  width: 2.5em !important;
  height: 2.5em !important;
  margin: 0;
  filter: drop-shadow(0 2px 4px #0006);
} 

/* Скины главного персонажа */
.skin_0 { background-image: url('../img/skin/skin_0.png'); pointer-events: none; }
.skin_1 { background-image: url('../img/skin/skin_1.png'); pointer-events: none; }
.skin_2 { background-image: url('../img/skin/skin_2.png'); pointer-events: none; }
.skin_3 { background-image: url('../img/skin/skin_3.png'); pointer-events: none; }
.skin_4 { background-image: url('../img/skin/skin_4.png'); pointer-events: none; }
.skin_5 { background-image: url('../img/skin/skin_5.png'); pointer-events: none; }
.skin_6 { background-image: url('../img/skin/skin_6.png'); pointer-events: none; }
.skin_7 { background-image: url('../img/skin/skin_7.png'); pointer-events: none; }
.skin_8 { background-image: url('../img/skin/skin_8.png'); pointer-events: none; }
.skin_9 { background-image: url('../img/skin/skin_9.png'); pointer-events: none; }
.skin_10 { background-image: url('../img/skin/skin_10.png'); pointer-events: none; } 

/* Скины для магазина */
.shop-item-img.skin_0 { background-image: url('../img/skin/skin_0.png'); }
.shop-item-img.skin_1 { background-image: url('../img/skin/skin_1.png'); }
.shop-item-img.skin_2 { background-image: url('../img/skin/skin_2.png'); }
.shop-item-img.skin_3 { background-image: url('../img/skin/skin_3.png'); }
.shop-item-img.skin_4 { background-image: url('../img/skin/skin_4.png'); }
.shop-item-img.skin_5 { background-image: url('../img/skin/skin_5.png'); }
.shop-item-img.skin_6 { background-image: url('../img/skin/skin_6.png'); }
.shop-item-img.skin_7 { background-image: url('../img/skin/skin_7.png'); }
.shop-item-img.skin_8 { background-image: url('../img/skin/skin_8.png'); }
.shop-item-img.skin_9 { background-image: url('../img/skin/skin_9.png'); }
.shop-item-img.skin_10 { background-image: url('../img/skin/skin_10.png'); }

/* Фоны за главным персонажем */
.bg_0 { background-image: url('../img/bg/bg_0.png'); pointer-events: none; }
.bg_1 { background-image: url('../img/bg/bg_1.png'); pointer-events: none; }
.bg_2 { background-image: url('../img/bg/bg_2.png'); pointer-events: none; }
.bg_3 { background-image: url('../img/bg/bg_3.png'); pointer-events: none; }
.bg_4 { background-image: url('../img/bg/bg_4.png'); pointer-events: none; }
.bg_5 { background-image: url('../img/bg/bg_5.png'); pointer-events: none; }
.bg_6 { background-image: url('../img/bg/bg_6.png'); pointer-events: none; }
.bg_7 { background-image: url('../img/bg/bg_7.png'); pointer-events: none; }
.bg_8 { background-image: url('../img/bg/bg_8.png'); pointer-events: none; }
.bg_9 { background-image: url('../img/bg/bg_9.png'); pointer-events: none; }
.bg_10 { background-image: url('../img/bg/bg_10.png'); pointer-events: none; }

/* Фоны для магазина */
.shop-item-img.bg_0 { background-image: url('../img/bg/bg_0.png'); }
.shop-item-img.bg_1 { background-image: url('../img/bg/bg_1.png'); }
.shop-item-img.bg_2 { background-image: url('../img/bg/bg_2.png'); }
.shop-item-img.bg_3 { background-image: url('../img/bg/bg_3.png'); }
.shop-item-img.bg_4 { background-image: url('../img/bg/bg_4.png'); }
.shop-item-img.bg_5 { background-image: url('../img/bg/bg_5.png'); }
.shop-item-img.bg_6 { background-image: url('../img/bg/bg_6.png'); }
.shop-item-img.bg_7 { background-image: url('../img/bg/bg_7.png'); }
.shop-item-img.bg_8 { background-image: url('../img/bg/bg_8.png'); }
.shop-item-img.bg_9 { background-image: url('../img/bg/bg_9.png'); }
.shop-item-img.bg_10 { background-image: url('../img/bg/bg_10.png'); }

.pet-bg {
  position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: bottom center;
    pointer-events: none;
}
.coin-float {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 2.5rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 2px 12px #000c, 0 0 2px #000a;
  pointer-events: none!important;
  animation: coin-float-up 1s ease-out forwards;
  z-index: 10;
  
}
@keyframes coin-float-up {
  0% {
    opacity: 1;
    transform: translate(-50%, 0) rotate(-5deg);
  }
  20% {
    transform: translate(-60%, -18px) rotate(7deg);
  }
  40% {
    transform: translate(-40%, -36px) rotate(-7deg);
  }
  60% {
    transform: translate(-55%, -54px) rotate(5deg);
  }
  80% {
    opacity: 1;
    transform: translate(-45%, -72px) rotate(-5deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -90px) rotate(0deg);
  }
}
.pet-bounce {
  animation: pet-bounce-anim 0.22s cubic-bezier(.4,1.6,.6,1) both;
  -webkit-animation: pet-bounce-anim 0.22s cubic-bezier(.4,1.6,.6,1) both;
  z-index: 0 !important;
}
@keyframes pet-bounce-anim {
  0% { transform: translateX(-50%) scale(1); }
  30% { transform: translateX(-50%) scale(0.98); }
  60% { transform: translateX(-50%) scale(1.01); }
  100% { transform: translateX(-50%) scale(1); }
}
@-webkit-keyframes pet-bounce-anim {
  0% { -webkit-transform: translateX(-50%) scale(1); }
  30% { -webkit-transform: translateX(-50%) scale(0.98); }
  60% { -webkit-transform: translateX(-50%) scale(1.01); }
  100% { -webkit-transform: translateX(-50%) scale(1); }
}

/* Иконки апгрейдов */
.upgrade-icon {
  background: #e6a23c;
  position: relative;
}

.item_1::before { content: ''; background-image: url('../img/upgrades/item_1.png'); }
.item_2::before { content: ''; background-image: url('../img/upgrades/item_2.png'); }
.item_3::before { content: ''; background-image: url('../img/upgrades/item_3.png'); }
.item_4::before { content: ''; background-image: url('../img/upgrades/item_4.png'); }
.item_5::before { content: ''; background-image: url('../img/upgrades/item_5.png'); }
.item_6::before { content: ''; background-image: url('../img/upgrades/item_6.png'); }
.item_7::before { content: ''; background-image: url('../img/upgrades/item_7.png'); }
.item_8::before { content: ''; background-image: url('../img/upgrades/item_8.png'); }
.item_9::before { content: ''; background-image: url('../img/upgrades/item_9.png'); }
.item_10::before { content: ''; background-image: url('../img/upgrades/item_10.png'); }
.item_11::before { content: ''; background-image: url('../img/upgrades/item_11.png'); }
.item_12::before { content: ''; background-image: url('../img/upgrades/item_12.png'); }
.item_13::before { content: ''; background-image: url('../img/upgrades/item_13.png'); }
.item_14::before { content: ''; background-image: url('../img/upgrades/item_14.png'); }
.item_15::before { content: ''; background-image: url('../img/upgrades/item_15.png'); }
.item_16::before { content: ''; background-image: url('../img/upgrades/item_16.png'); }
.item_17::before { content: ''; background-image: url('../img/upgrades/item_17.png'); }
.item_18::before { content: ''; background-image: url('../img/upgrades/item_18.png'); }
.item_19::before { content: ''; background-image: url('../img/upgrades/item_19.png'); }
.item_20::before { content: ''; background-image: url('../img/upgrades/item_20.png'); }

/* Общие стили для всех иконок апгрейдов */
.item_1::before, .item_2::before, .item_3::before, .item_4::before, .item_5::before, .item_6::before, .item_7::before, .item_8::before, .item_9::before, .item_10::before,
.item_11::before, .item_12::before, .item_13::before, .item_14::before, .item_15::before, .item_16::before, .item_17::before, .item_18::before, .item_19::before, .item_20::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  height: 110%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

/* Загрузочный экран */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #2d241c;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  width: 100%;
  height: 100%;
  /*background: #ffad08;*/
  background: rgba(26, 18, 10, 0.9);
  border: 2px solid #1a120a;
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.loading-logo {
  width: 300px;
  height: 300px;
  max-width: 80%;
  max-height: 60%;
  background-image: url('../img/screen/screen-logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.loading-progress {
  width: 250px;
  max-width: 80%;
}

.loading-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.loading-progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--progress-width, 0%);
  background: linear-gradient(90deg, #4CAF50, #45a049, #4CAF50);
  background-size: 200% 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
  animation: progress-glow 2s ease-in-out infinite;
}

@keyframes progress-glow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.loading-progress-text {
  text-align: center;
  color: #fff;
  font-size: 16px;
  margin-top: 12px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}


  
  .loading-logo {
    max-width: 90%;
    max-height: 90%;
  }
  
  .loading-progress {
    width: 220px;
  }


@media (max-width: 480px) {
  .loading-content {
    padding: 20px;
    gap: 20px;
  }
  
  .loading-logo {
    max-width: 95%;
    max-height: 95%;
  }
  
  .loading-progress {
    width: 200px;
  }
  
  .loading-progress-text {
    font-size: 14px;
  }
}

/* Стили для кнопки приглашения друзей */
.friends-invite {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  margin-bottom: 16px;
}

.friends-invite-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 16px 24px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  min-width: 200px;
  justify-content: center;
}

.friends-invite-btn:hover {
  background: linear-gradient(135deg, #45a049, #4CAF50);
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.friends-invite-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

.friends-invite-btn .icon-img {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.friends-invite-btn span:last-child {
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 600px) {
  .friends-invite-btn {
    min-width: 180px;
    padding: 14px 20px;
    font-size: 1em;
  }
  
  .friends-invite-btn .icon-img {
    width: 20px;
    height: 20px;
  }
}

/* Кнопка rewarded в левом нижнем углу */
.rewarded-btn {
  position: absolute;
  bottom: 20px;
  left: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: all 0.3s ease;
 
}


.rewarded-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 100%);
}

.rewarded-btn:active {
  transform: scale(0.95);
}

.rewarded-btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.rewarded-btn.disabled:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.rewarded-btn .icon-img {
  z-index: 5;
  width: 75px;
    height: 75px;
    border-radius: 50px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.rewarded-timer {
  position: absolute;
  top: 117%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  min-width: 50px;
  z-index: 10;
  pointer-events: none;
}

.rewarded-btn .rewarded-value {
  box-shadow: 0 0 3px 0 rgba(22, 22, 22, 0.8);
  position: absolute;
  top: 50%;
  left: 63px;
  width: auto;
  min-width: auto;
  text-align: right;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgb(168 86 10);
  padding: 4px 8px 4px 19px;
  border-radius: 12px;
  font-size: 1em;
  font-weight: bold;
  color: #fff;
  z-index: 4;
  pointer-events: none;
  white-space: nowrap;
}

.rewarded-btn .rewarded-value .icon-cursor {
  width: 18px;
  height: 18px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.rewarded-btn.pulsing {
  bottom: 30px;
  animation: rewarded-pulse 1s ease-in-out infinite;
}

@keyframes rewarded-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(255, 193, 7, 0.3);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
  }
}

/* Стиль для курсора обучения */
.cursor {
  position: absolute;
  width: 84px;
  height: 84px;
  background-image: url('../img/icons/cursor.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: 1001;
  transform: rotate(-30deg);
  filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.4));
}

/* Анимация курсора на коте - движение влево-вправо (поглаживание) */
.pet-image2 .cursor {
  top: 75%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  animation: cursorPet 2s infinite;
}

@keyframes cursorPet {
  0%, 100% {
    transform: translate(-100%, -50%) rotate(-30deg);
  }
  40% {
    transform: translate(75%, -50%) rotate(-30deg);
  }
}

/* Анимация курсора на rewarded кнопке - подпрыгивание */
.rewarded-btn .cursor {
  top: -65px;
  left: 55px;
  animation: cursorBounce 1.5s infinite;
}



@keyframes cursorBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) rotate(30deg) scaleY(-1);
  }
  40% {
    transform: translateY(-10px) rotate(30deg) scaleY(-1);
  }
  60% {
    transform: translateY(-5px) rotate(30deg) scaleY(-1);
  }
}


