* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  overflow: hidden;
  background-color: #0a0a0a;
  color: #ffffff;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

#game-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  color: #ffffff;
  z-index: 100;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow-y: auto;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background-color: #1e1e1e;
  margin: 30px auto;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  color: #ffffff;
  max-height: 85vh;
  overflow-y: auto;
}

.close-button {
  position: absolute;
  top: 15px;
  right: 15px;
  color: #aaaaaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  border-radius: 50%;
}

.close-button:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

h2 {
  color: #4ed9ff;
  margin-bottom: 20px;
  text-align: center;
}

/* Shop items styling */
#shop-items {
  padding: 10px 0;
}

.shop-item {
  background-color: rgba(40, 40, 40, 0.8);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.shop-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.shop-item h3 {
  margin: 0 0 5px 0;
  color: #ffffff;
}

.shop-item p {
  margin: 0 0 10px 0;
  font-size: 14px;
  opacity: 0.8;
}

.price {
  color: #ffad4d;
  font-weight: bold;
}

.shop-item button {
  padding: 5px 10px;
  border-radius: 4px;
  border: none;
  background-color: #0088CC;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s;
}

.shop-item button:hover:not([disabled]) {
  background-color: #0077b5;
}

.shop-item button[disabled] {
  background-color: #666;
  cursor: default;
}

/* Leaderboard styling */
#leaderboard-items {
  padding: 10px 0;
}

.leaderboard-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  margin-bottom: 5px;
  border-radius: 4px;
  background-color: rgba(40, 40, 40, 0.8);
}

.leaderboard-rank {
  width: 30px;
  font-weight: bold;
}

.leaderboard-name {
  flex-grow: 1;
  padding: 0 10px;
}

.leaderboard-score {
  font-weight: bold;
  color: #ffad4d;
}

/* TON Connect Button */
.ton-connect-button {
  background-color: #0088CC;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto;
  transition: background-color 0.2s;
}

.ton-connect-button:hover {
  background-color: #0077B5;
}

.ton-connect-button img {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

/* Game UI elements */
.game-button {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(30, 30, 30, 0.8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  font-size: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background-color 0.2s;
}

.game-button:hover {
  background-color: rgba(40, 40, 40, 0.9);
}

.menu-button {
  top: 10px;
  right: 10px;
}

/* Popup Menu */
.popup-menu {
  position: absolute;
  top: 50px;
  right: 10px;
  background-color: rgba(30, 30, 30, 0.9);
  border-radius: 8px;
  padding: 10px 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.popup-menu-item {
  padding: 10px 20px;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s;
}

.popup-menu-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Success message */
.payment-success {
  text-align: center;
  padding: 20px;
}

.payment-success h3 {
  color: #4CAF50;
  margin-bottom: 10px;
}

.payment-success img {
  width: 64px;
  height: 64px;
  margin-bottom: 15px;
}

/* Telegram specific styles */
.telegram-app {
  background-color: var(--tg-theme-bg-color, #0a0a0a);
  color: var(--tg-theme-text-color, #ffffff);
}

.telegram-button {
  background-color: var(--tg-theme-button-color, #0088CC);
  color: var(--tg-theme-button-text-color, #ffffff);
}

.telegram-link {
  color: var(--tg-theme-link-color, #4fa9e6);
}

.telegram-hint {
  color: var(--tg-theme-hint-color, #aaaaaa);
}

/* Game HUD */
.hud-element {
  position: absolute;
  z-index: 10;
  pointer-events: none;
}

.score-display {
  top: 10px;
  left: 10px;
  font-size: 20px;
  font-weight: bold;
  text-shadow: 0 0 3px #000000;
}

.lives-display {
  top: 40px;
  left: 10px;
  display: flex;
  align-items: center;
}

.life-icon {
  width: 20px;
  height: 20px;
  margin-right: 5px;
  filter: drop-shadow(0 0 3px #000000);
}

.minimap-container {
  bottom: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 5px;
  padding: 5px;
  width: 150px;
  height: 150px;
}

.powerup-indicator {
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 15px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
}

.powerup-icon {
  width: 24px;
  height: 24px;
  margin-right: 5px;
}

.powerup-timer {
  font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 20px auto;
    padding: 15px;
  }
  
  .minimap-container {
    width: 100px;
    height: 100px;
  }
  
  .score-display {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    margin: 10px auto;
    padding: 10px;
  }
  
  .minimap-container {
    width: 80px;
    height: 80px;
  }
} 