body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #1a2a3a, #0d1a26);
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  box-sizing: border-box;
  overflow-x: hidden;
}

body.space-bg {
  background: url('images/space-bg.jpg') no-repeat center center fixed;
  background-size: cover;
}

body.forest-bg {
  background: url('images/forest-bg.jpg') no-repeat center center fixed;
  background-size: cover;
}

body.city-bg {
  background: url('images/city-bg.jpg') no-repeat center center fixed;
  background-size: cover;
}


.profile {
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  flex-shrink: 0;
}

.profile-info {
  display: flex;
  justify-content: flex-end; /* Это выравнивает контейнер баланса по правому краю */
  width: 100%;
}

.balance-container {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap; /* Запрещает перенос элементов на новую строку */
  white-space: nowrap; /* Запрещает перенос текста внутри элементов */
}

.balance-ton, .tgr-balance, .energy-display {
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.balance-ton {
  background: rgba(0, 150, 255, 0.2);
  border: 1px solid #0096ff;
}
.balance-ton::before {
  content: "💎";
}

.tgr-balance {
  background: rgba(255, 215, 0, 0.2);
  border: 1px solid gold;
}

.tgr-balance::before {
  content: "✨";
}

.main-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  overflow-y: auto;
}

.click-area {
  width: 150px;
  height: 150px;
  margin: 15px auto;
  position: relative;
  cursor: pointer;
  border-radius: 50%;
  background: none;
  border: none;
  box-shadow: none;
  transition: transform 0.2s ease-out;
  overflow: hidden;
}

.click-area:active {
  transform: scale(0.95);
}

.main-character {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: transform 0.2s ease-out;
}

.click-area:active .main-character {
  transform: scale(0.95);
}

.click-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: bold;
  color: gold;
  opacity: 0;
  pointer-events: none;
  animation: floatUp 1s forwards;
}

@keyframes floatUp {
  0% { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -150%); }
}


.main-balance {
  font-size: 30px;
  font-weight: bold;
  margin: 5px 0;
}

.stats {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  min-width: 90px;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  padding: 8px 5px;
  display: flex;
  justify-content: space-around;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 90;
  backdrop-filter: blur(5px);
  flex-shrink: 0;
}

.nav-btn {
  background: transparent;
  border: none;
  color: white;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: background 0.3s ease-out;
  min-width: 50px;
}


.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}


 .nav-icon {
    font-size: 16px;
  }

.nav-text {
    font-size: 10px;
  }


.bottom-menu {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  background: #1a2a3a;
  border-radius: 15px 15px 0 0;
  padding: 15px;
  transition: bottom 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 100;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.5);
  max-height: 60vh;
  overflow-y: auto;
}

.bottom-menu.active {
  bottom: 60px;
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  background: #1a2a3a;
  padding: 5px 0;
  z-index: 1;
}

.menu-header h3 {
  margin: 0;
  color: gold;
  font-size: 16px;
}

.close-menu {
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  padding: 2px 8px;
}

.menu-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.3s ease-out;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.item-info h4 {
  margin: 0 0 3px 0;
  color: #fff;
  font-size: 14px;
}

.item-info p {
  margin: 0;
  color: #ccc;
  font-size: 12px;
}

.buy-btn {
  background: linear-gradient(135deg, #00cc88, #00aa66);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  font-weight: bold;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.3s ease-out;
}

.buy-btn:hover {
  background: linear-gradient(135deg, #00dd99, #00bb77);
}

.buy-btn:disabled {
  background: #555;
  cursor: not-allowed;
}

.stat-display {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 10px;
  text-align: center;
}

.stat-display h4 {
  margin: 0 0 5px 0;
  color: #ccc;
  font-size: 14px;
}

.stat-display p {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
  color: gold;
}

.click-fx {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease-out;
}

.click-fx:active {
  transform: scale(0.95);
}

.click-fx::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
}

.click-fx:active::after {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% { transform: scale(0, 0); opacity: 1; }
  100% { transform: scale(20, 20); opacity: 0; }
}

.roulette-container {
  position: relative;
  width: 100%;
  height: 220px;
  margin: 30px 0;
  overflow: hidden;
}

.roulette-wheel {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

.roulette-track {
  display: flex;
  position: absolute;
  height: 100%;
  left: 0;
  align-items: center;
  gap: 10px;
  will-change: transform;
}

.roulette-item {
  flex: 0 0 110px;
  height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-sizing: border-box;
}

.roulette-item img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.center-indicator {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, gold, transparent);
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}

.center-indicator::before,
.center-indicator::after {
  content: '';
  position: absolute;
  left: -20px;
  width: 40px;
  height: 40px;
  border: 4px solid gold;
  border-radius: 50%;
}

.center-indicator::before {
  top: -20px;
  border-bottom: none;
  transform: rotate(45deg);
}

.center-indicator::after {
  bottom: -20px;
  border-top: none;
  transform: rotate(45deg);
}

.roulette-wheel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 120px;
  height: 100%;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
}

.spin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  padding: 12px 20px;
  background: linear-gradient(135deg, #ff9500, #ff5e00);
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease-out, transform 0.3s ease-out;
  font-size: 16px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.spin-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
  background: linear-gradient(135deg, #ffa500, #ff6a00);
}

.spin-btn:disabled {
  background: #555;
  cursor: not-allowed;
  opacity: 0.7;
}

.spin-icon {
  margin-right: 8px;
  font-size: 22px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.roulette-stats {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 10px;
  margin-top: 20px;
}

.roulette-stats p {
  margin-top: 0;
  font-weight: bold;
  color: #ccc;
}

.roulette-stats ul {
  padding-left: 20px;
  margin-bottom: 0;
}

.roulette-stats li {
  margin-bottom: 5px;
  color: #ddd;
  display: flex;
  align-items: center;
}

.common-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #4CAF50;
  border-radius: 50%;
  margin-right: 8px;
}

.rare-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #2196F3;
  border-radius: 50%;
  margin-right: 8px;
}

.epic-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #9C27B0;
  border-radius: 50%;
  margin-right: 8px;
}

.legendary-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #FF9800;
  border-radius: 50%;
  margin-right: 8px;
}

.mythical-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #F44336;
  border-radius: 50%;
  margin-right: 8px;
}

.winner-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
  border: 2px solid gold;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease-out;
  text-align: center;
  max-width: 90%;
}

.winner-content h3 {
  margin: 10px 0 5px;
  color: gold;
  font-size: 22px;
  text-shadow: 0 0 5px black;
}

.winner-content p {
  margin: 0;
  color: white;
  font-size: 18px;
  text-shadow: 0 0 5px black;
}

.winner-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-top: 10px;
}

.nav-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.gifts-display {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  margin-top: 15px;
}

.rarity-section {
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px;
}

.rarity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
}

.rarity-name {
  font-weight: bold;
  font-size: 14px;
}

.rarity-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.gifts-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.gifts-container::-webkit-scrollbar {
  height: 6px;
}

.gifts-container::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}

.gift-item {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 5px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease-out, border 0.15s ease-out, box-shadow 0.15s ease-out;
  will-change: transform, border, box-shadow;
}

.gift-item:active {
  transform: scale(0.98);
}

.gift-item:hover {
  transform: none !important;
  animation: none !important;
}

.gift-item.active {
  border: 2px solid #00cc88;
}

.gift-item.replaceable {
  border: 2px solid gold;
  box-shadow: 0 0 10px gold;
  cursor: pointer;
}

.gift-item.selectable {
  border: 2px solid #00cc88;
  box-shadow: 0 0 10px #00cc88;
  cursor: pointer;
}

.gift-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.gift-income {
  font-size: 10px;
  color: #00cc88;
  margin-top: 5px;
  text-align: center;
}

.gift-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 1px 5px;
  border-radius: 50%;
  font-size: 10px;
}

.remove-gift {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: rgba(255,0,0,0.7);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
}

.empty-slot {
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(255,255,255,0.3);
}

.empty-text {
  color: #ccc;
  font-size: 12px;
}

.slot-number {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0,0,0,0.5);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.premium-roulette-container {
  margin-top: 40px;
  border-top: 2px solid gold;
  padding-top: 20px;
}

.premium-roulette .roulette-item {
  border: 2px solid gold;
}

.premium-spin-btn {
  background: linear-gradient(135deg, #ffd700, #c98910);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.premium-spin-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffe44b, #d99a1a);
}

.roulette-section {
  margin-bottom: 30px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  padding: 15px;
}

.roulette-title {
  text-align: center;
  margin: 0 0 15px 0;
  color: #fff;
  font-size: 18px;
}

.premium-roulette-section {
  border: 2px solid gold;
  background: rgba(255, 215, 0, 0.05);
}

.premium-title {
  color: gold;
}

.roulette-controls {
  margin-top: 15px;
  text-align: center;
}

.buy-slot-btn {
  background: linear-gradient(135deg, #ffd700, #c98910);
  border: none;
  color: #1a2a3a;
  padding: 10px 15px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease-out, transform 0.3s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.buy-slot-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffe44b, #d99a1a);
  transform: scale(1.05);
}

.buy-slot-btn:disabled {
  background: #555;
  cursor: not-allowed;
  color: #ccc;
}

.buy-slot-icon {
  font-size: 18px;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.album-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  position: relative;
  transition: transform 0.3s ease-out;
}

.album-item:hover {
  transform: scale(1.05);
}

.album-item.unlocked {
  background: rgba(0, 255, 100, 0.1);
  border: 1px solid #00ff64;
}

.album-item.locked {
  opacity: 0.5;
  filter: grayscale(80%);
}

.album-item img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.album-item .gift-name {
  font-size: 10px;
  margin-top: 5px;
  word-break: break-word;
}

.progress-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

.progress-bar {
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00cc88, #00aaff);
  transition: width 0.5s ease-out;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 3px;
}

.inventory-tabs {
  display: flex;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.tab-btn {
  background: none;
  border: none;
  color: #ccc;
  padding: 8px 15px;
  cursor: pointer;
  position: relative;
}

.tab-btn.active {
  color: gold;
  font-weight: bold;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: gold;
}

.tab-content {
  display: none;
  padding: 10px;
}

.tab-content.active {
  display: block;
}
.inventory-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.inventory-filters select {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 5px;
  border-radius: 5px;
}

.replace-mode {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gifts-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  overflow-y: auto;
  max-height: 300px;
}

.gift-item.inventory {
  cursor: pointer;
  border: 2px solid transparent;
}

.gift-item.inventory:hover {
  border-color: gold;
}

.gift-info {
  font-size: 12px;
}

.slot-upgrade {
  background: rgba(255, 215, 0, 0.1);
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 15px;
  text-align: center;
  border: 1px solid rgba(255, 215, 0, 0.3);
}
.sell-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}
.sell-controls select {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 5px;
  border-radius: 5px;
}
.slot-info {
  margin-top: 8px;
  font-size: 14px;
  color: #ccc;
}

.inventory-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.inventory-btn {
  background: rgba(255, 215, 0, 0.2);
  border: 1px solid gold;
  color: gold;
  padding: 10px 15px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s ease-out;
}

.inventory-btn:hover {
  background: rgba(255, 215, 0, 0.3);
}

.inventory-btn.active {
  background: gold;
  color: #1a2a3a;
  font-weight: bold;
}

.replace-instruction {
  text-align: center;
  margin: 10px 0;
  font-size: 14px;
  color: gold;
}

@media (max-width: 400px) {
  .nav-btn {
    padding: 5px;
    min-width: 40px;
  }

  .stat-item {
    padding: 8px 10px;
    min-width: 80px;
    font-size: 12px;
  }

  .click-area {
    width: 130px;
    height: 130px;
  }

  .main-balance {
    font-size: 26px;
  }
}

  .bottom-menu {
    padding: 15px;
  }

  .menu-item {
    padding: 10px 12px;
  }

  .buy-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .spin-btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  .gift-item {
    width: 80px;
    height: 80px;
  }

  .rarity-name {
    font-size: 13px;
  }
}

@media (max-height: 700px) {
  .bottom-menu {
    max-height: 50vh;
  }
}
  .bottom-menu.active {
    bottom: 60px;
  }

  .main-screen {
    padding-top: 10px;
  }
}
/* Добавляем в конец файла */
.upgrade-count {
  font-size: 12px;
  color: #ccc;
  margin-top: 5px;
}

.price-tooltip {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.9);
  padding: 10px;
  border-radius: 8px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.menu-item:hover .price-tooltip {
  opacity: 1;
}

.price-graph {
  width: 100%;
  margin-top: 10px;
}

.graph-title {
  font-size: 12px;
  color: gold;
  margin-bottom: 5px;
}

.graph-bars {
  display: flex;
  justify-content: space-between;
  height: 100px;
  align-items: flex-end;
}

.graph-bar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.graph-bar {
  width: 60%;
  background: linear-gradient(to top, #00cc88, #00aaff);
  border-radius: 3px 3px 0 0;
  transition: height 0.5s ease-out;
}

.graph-label {
  font-size: 10px;
  color: #ccc;
  margin-top: 5px;
}

.graph-price {
  font-size: 10px;
  color: white;
  margin-top: 3px;
  font-weight: bold;
}
/* Exchange Menu Styles */
.exchange-section {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.exchange-direction {
  display: flex;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.exchange-tab {
  background: none;
  border: none;
  color: #ccc;
  padding: 8px 15px;
  cursor: pointer;
  position: relative;
}

.exchange-tab.active {
  color: gold;
  font-weight: bold;
}

.exchange-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: gold;
}

.exchange-input {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.exchange-input input {
  flex: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 10px;
  border-radius: 10px;
}

.exchange-btn {
  background: linear-gradient(135deg, #00cc88, #00aa66);
  border: none;
  color: white;
  padding: 10px 15px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
}

.exchange-result {
  background: rgba(255,255,255,0.1);
  padding: 10px;
  border-radius: 10px;
  text-align: center;
}

.exchange-history {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 10px;
}

.history-list {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 10px;
}

.history-item {
  padding: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
}

.history-item:last-child {
  border-bottom: none;
}

.history-ton {
  color: #0096ff;
}

.history-tgr {
  color: gold;
}
.combos-display {
  background: rgba(255,255,255,0.1);
  padding: 15px;
  border-radius: 10px;
  margin-top: 15px;
}

.combo-item {
  background: rgba(0,0,0,0.3);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 3px solid gold;
}

.combo-name {
  font-weight: bold;
  color: gold;
}

.combo-desc {
  font-size: 12px;
  color: #ccc;
}
.energy-display {
  background: rgba(0, 200, 100, 0.2);
  border: 1px solid #00c864;
}

.energy-display::before {
  content: "⚡";
}

.slot-progress {
  font-size: 0.8em;
  color: #888;
  margin-left: 5px;
}

#buy-slot-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Sell Tab Styles */
.sell-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.sell-filters select {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 5px;
  border-radius: 5px;
}

.gift-item.selected {
  border: 2px solid gold;
  box-shadow: 0 0 10px gold;
}

.gift-checkbox {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 16px;
  height: 16px;
  z-index: 10;
}

.coin-animation {
  position: fixed;
  width: 20px;
  height: 20px;
  background-image: url('images/coin.png');
  background-size: contain;
  z-index: 1000;
  pointer-events: none;
  animation: flyToCounter 1s forwards;
}

@keyframes flyToCounter {
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty));
    opacity: 0;
  }
}

.sell-confirmation {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  padding: 20px;
  border-radius: 15px;
  z-index: 1000;
  text-align: center;
  border: 2px solid gold;
  max-width: 80%;
}

.sell-confirmation-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
}

.sell-confirm-btn {
  background: linear-gradient(135deg, #00cc88, #00aa66);
  border: none;
  color: white;
  padding: 8px 15px;
  border-radius: 10px;
  cursor: pointer;
}

.sell-cancel-btn {
  background: linear-gradient(135deg, #ff3333, #cc0000);
  border: none;
  color: white;
  padding: 8px 15px;
  border-radius: 10px;
  cursor: pointer;
}
/* Auction Styles */
.auction-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.auction-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  gap: 10px;
  position: relative;
  transition: transform 0.2s ease-out;
}

.auction-item:hover {
  transform: translateY(-2px);
}

.auction-item-gift {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.auction-item-gift img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auction-item-info {
  flex: 1;
}

.auction-item-title {
  font-weight: bold;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
}

.auction-item-rarity {
  font-size: 12px;
  color: #ccc;
}

.auction-item-price {
  font-size: 14px;
  color: gold;
  margin: 5px 0;
}

.auction-item-time {
  font-size: 12px;
  color: #ccc;
  display: flex;
  justify-content: space-between;
}

.auction-item-bids {
  font-size: 11px;
  color: #aaa;
}

.auction-item-actions {
  display: flex;
  gap: 5px;
  margin-top: 5px;
}

.auction-item-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.auction-item-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.auction-item-btn.bid {
  background: rgba(0, 200, 100, 0.2);
  color: #00cc88;
}

.auction-item-btn.bid:hover {
  background: rgba(0, 200, 100, 0.3);
}

.auction-item-btn.cancel {
  background: rgba(255, 50, 50, 0.2);
  color: #ff6666;
}

.auction-item-btn.cancel:hover {
  background: rgba(255, 50, 50, 0.3);
}

.auction-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.auction-filters select {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 5px;
  border-radius: 5px;
  flex: 1;
}

.create-lot-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 14px;
  color: #ccc;
}

.form-group input,
.form-group select {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 10px;
  border-radius: 8px;
}

.gift-select {
  height: 150px;
}

.gift-select option {
  padding: 5px;
}

/* Auction Popup */
.auction-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
}

.auction-popup.active {
  opacity: 1;
  pointer-events: all;
}

.auction-popup-content {
  background: #1a2a3a;
  border-radius: 15px;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.auction-popup-gift {
  width: 100px;
  height: 100px;
  margin: 0 auto 15px;
  border-radius: 10px;
  overflow: hidden;
}

.auction-popup-gift img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auction-popup-info {
  background: rgba(0,0,0,0.3);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.auction-popup-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.auction-popup-row:last-child {
  margin-bottom: 0;
}

.auction-popup-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.auction-popup-buttons button {
  flex: 1;
}

/* NFT Popup */
.nft-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
}

.nft-popup.active {
  opacity: 1;
  pointer-events: all;
}

.nft-popup-content {
  background: #1a2a3a;
  border-radius: 15px;
  padding: 20px;
  width: 90%;
  max-width: 350px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  text-align: center;
}

.nft-image-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 15px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid gold;
}

.nft-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nft-watermark {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  color: white;
  font-size: 12px;
  text-shadow: 0 0 5px black;
  opacity: 0.7;
}

.nft-info {
  background: rgba(0,0,0,0.3);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  text-align: left;
}

.nft-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.nft-row:last-child {
  margin-bottom: 0;
}

.nft-row span:first-child {
  color: #ccc;
}

/* Timer animation */
@keyframes pulseTimer {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.auction-timer {
  animation: pulseTimer 1s infinite;
}

.auction-timer.ending {
  color: #ff6666;
  animation: pulseTimer 0.5s infinite;
}

/* Flying coins animation */
.coin-flight {
  position: fixed;
  width: 20px;
  height: 20px;
  background-image: url('images/coin.png');
  background-size: contain;
  z-index: 1000;
  pointer-events: none;
  animation: flyToTarget 1s forwards;
}

@keyframes flyToTarget {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0.5);
    opacity: 0;
  }
}

/* Seller rating */
.seller-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.seller-rating .stars {
  color: gold;
}

/* Notification styles */

.nft-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  background: linear-gradient(135deg, #ffd700, #c98910);
  color: #1a2a3a;
  padding: 1px 5px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: bold;
}
.nav-icon.emoji {
  font-size: 20px;
}
.auction-timer.ending {
  color: #ff0000;
  font-weight: bold;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}
.bottom-menu {
  display: none;
}

.bottom-menu.active {
  display: block;
}
/* Добавьте эти стили в конец файла style.css */

.menu-header {
  position: sticky;
  top: 0;
  background: #1a2a3a;
  padding: 10px 0;
  z-index: 10;
  margin-bottom: 10px;
}

.inventory-tabs {
  position: sticky;
  top: 50px; /* Высота menu-header */
  background: #1a2a3a;
  z-index: 9;
  padding: 5px 0;
  margin-bottom: 10px;
}

.bottom-menu {
  overflow-y: auto;
  max-height: 60vh;
  padding-top: 0;
}

/* Для аукциона добавьте дополнительные стили */
.auction-filters {
  position: sticky;
  top: 100px; /* Высота menu-header + inventory-tabs */
  background: #1a2a3a;
  z-index: 8;
  padding: 5px 0;
  margin-bottom: 10px;
}
.menu-item.active-custom {
  border: 2px solid gold;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.select-btn {
  background: linear-gradient(135deg, #2196F3, #1976D2) !important;
}

.select-btn:hover {
  background: linear-gradient(135deg, #42A5F5, #1E88E5) !important;
}
.virtualized-list {
  height: 300px;
  overflow-y: auto;
  will-change: transform;
}

.virtualized-item {
  position: absolute;
  width: 100%;
}
html {
  touch-action: manipulation;
}
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: rgba(0,0,0,0.9);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Улучшенные кнопки */
.btn-enhanced {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.btn-enhanced:hover {
  box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}

/* Progress bars */
.progress-container {
  width: 100%;
  background-color: #f1f1f1;
  border-radius: 10px;
  margin: 10px 0;
}

.progress-bar-enhanced {
  height: 20px;
  border-radius: 10px;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  text-align: center;
  line-height: 20px;
  color: white;
  transition: width 0.5s ease-in-out;
}
.menu-transition-enter {
  opacity: 0;
  transform: translateY(20px);
}

.menu-transition-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: all 300ms ease-out;
}

.menu-transition-exit {
  opacity: 1;
  transform: translateY(0);
}

.menu-transition-exit-active {
  opacity: 0;
  transform: translateY(20px);
  transition: all 300ms ease-in;
}

/* Анимация появления */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

/* Анимация нажатия */
@keyframes clickAnimation {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.click-animation {
  animation: clickAnimation 0.3s ease;
}
.tutorial-tooltip {
  position: fixed;
  z-index: 10000;
  background: rgba(0,0,0,0.9);
  border: 2px solid gold;
  border-radius: 10px;
  padding: 15px;
  max-width: 300px;
  color: white;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.tutorial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tutorial-header h3 {
  margin: 0;
  color: gold;
}

.tutorial-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

.tutorial-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}

.tutorial-next {
  background: linear-gradient(135deg, #00cc88, #00aa66);
  border: none;
  color: white;
  padding: 5px 15px;
  border-radius: 15px;
  cursor: pointer;
}
@media (max-width: 768px) {
  .bottom-nav {
    padding: 5px;
  }

  .nav-btn {
    padding: 5px 3px;
    font-size: 10px;
  }

  .nav-icon {
    font-size: 18px;
  }

  .click-area {
    width: 120px;
    height: 120px;
  }

  .main-balance {
    font-size: 24px;
  }

  .stat-item {
    min-width: 70px;
    font-size: 11px;
    padding: 6px 8px;
  }

  .bottom-menu {
    max-height: 50vh;
  }

  .menu-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .buy-btn {
    margin-top: 8px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .balance-container {
    flex-wrap: wrap;
    justify-content: center;
  }

  .balance-ton, .tgr-balance, .energy-display {
    font-size: 11px;
    padding: 4px 8px;
  }

  .stats {
    gap: 5px;
  }

  .stat-item {
    min-width: 60px;
    font-size: 10px;
    padding: 4px 6px;
  }

  .tutorial-tooltip {
    max-width: 90%;
    left: 5% !important;
    transform: none !important;
  }
}
/* Достижения */
.achievements-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.achievements-categories {
  display: flex;
  gap: 5px;
  padding: 10px;
  border-bottom: 1px solid #333;
}

.category-btn {
  padding: 5px 10px;
  border: none;
  border-radius: 5px;
  background: #2a2a2a;
  color: #fff;
  cursor: pointer;
}

.category-btn.active {
  background: #4CAF50;
}

.achievements-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.achievement-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
  background: #2a2a2a;
}

.achievement-item.unlocked {
  background: #1e3a1e;
}

.achievement-icon {
  font-size: 24px;
}

.achievement-info {
  flex: 1;
}

.achievement-name {
  font-weight: bold;
  margin-bottom: 5px;
}

.achievement-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar {
  flex: 1;
  height: 10px;
  background: #333;
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #4CAF50;
  transition: width 0.3s;
}

.progress-text {
  font-size: 12px;
  color: #aaa;
}

/* Лидерборды */
.leaderboard-tabs {
  display: flex;
  gap: 5px;
  padding: 10px;
  border-bottom: 1px solid #333;
}

.leaderboard-content {
  height: calc(100% - 50px);
  overflow-y: auto;
  padding: 10px;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  margin-bottom: 5px;
  background: #2a2a2a;
  border-radius: 5px;
}

.leaderboard-row.highlight {
  background: #1e3a1e;
}

.leaderboard-position {
  width: 30px;
  font-weight: bold;
  text-align: center;
}

.leaderboard-name {
  flex: 1;
}

.leaderboard-value {
  width: 80px;
  text-align: right;
}

.notification.achievement {
  background: #1e3a1e;
  border-left: 4px solid gold;
}
.profile-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px;
}

.balance-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

.profile-buttons {
  display: flex;
  gap: 10px;
}

.profile-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.profile-btn .nav-icon {
  font-size: 20px;
}

.profile-btn .nav-icon img {
  width: 20px;
  height: 20px;
}