body {
  font-family: 'Orbitron', sans-serif;
  background: #0d0d1a;
  color: #e0e0e0;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://www.transparenttextures.com/patterns/dark-mosaic.png') repeat, radial-gradient(circle at center, #1a1a2e 0%, #0d0d1a 100%);
  opacity: 0.8;
  z-index: -1;
}

.neon-glow {
  text-shadow: 0 0 5px #0ff, 0 0 10px #0ff, 0 0 15px #0ff, 0 0 20px #0ff, 0 0 25px #0ff, 0 0 30px #0ff;
  animation: pulse-neon 1.5s infinite alternate;
}

@keyframes pulse-neon {
  from { text-shadow: 0 0 5px #0ff, 0 0 10px #0ff, 0 0 15px #0ff; }
  to { text-shadow: 0 0 10px #0ff, 0 0 20px #0ff, 0 0 30px #0ff; }
}

.neon-text {
  color: #0ff;
  text-shadow: 0 0 8px #0ff;
}

.game-container {
  background: rgba(13, 13, 26, 0.9);
  border: 2px solid #0ff;
  box-shadow: 0 0 20px #0ff, inset 0 0 10px #0ff;
  border-radius: 15px;
  padding: 20px;
  width: 90%;
  max-width: 1200px;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 2px solid #0ff;
  width: 100%;
}

h1 {
  color: #fff;
  font-size: 2.5em;
  margin-bottom: 10px;
}

p {
  font-size: 1.1em;
}

.game-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
}

.game-section.hidden {
  display: none;
}

.neon-button {
  background: linear-gradient(45deg, #0f0, #0ff);
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 1.2em;
  color: #0d0d1a;
  text-transform: uppercase;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px #0ff;
  position: relative;
  overflow: hidden;
  margin: 10px;
}

.neon-button::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 0;
  height: 200%;
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(45deg);
  transition: all 0.5s ease;
  z-index: 0;
}

.neon-button:hover::before {
  width: 200%;
}

.neon-button:hover {
  box-shadow: 0 0 20px #0ff, 0 0 30px #0ff;
  transform: translateY(-2px);
}

.neon-button:active {
  transform: translateY(0);
  box-shadow: 0 0 5px #0ff;
}

.neon-button.disabled {
  background: #555;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}
.neon-button.disabled:hover {
  box-shadow: none;
  transform: none;
}

.neon-button.prestige-button {
  background: linear-gradient(45deg, #f0f, #ff0);
  box-shadow: 0 0 10px #f0f;
  color: #0d0d1a;
}

.neon-button.prestige-button:hover {
  box-shadow: 0 0 20px #f0f, 0 0 30px #f0f;
}


.top-panel {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin-bottom: 20px;
  background: rgba(0, 255, 255, 0.1);
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.resource-display {
  font-size: 1.5em;
  font-weight: bold;
  color: #fff;
}

.main-content {
  display: flex;
  width: 100%;
  flex-grow: 1;
}

.sidebar {
  width: 250px;
  padding: 20px;
  border-right: 2px solid #0ff;
  box-shadow: 5px 0 15px rgba(0, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 30px;
}

.sidebar .nav-button {
  width: 100%;
  margin: 5px 0;
  background: #2a2a40;
  color: #0ff;
  border: 1px solid #0ff;
  box-shadow: none;
}

.sidebar .nav-button.active {
  background: #0ff;
  color: #0d0d1a;
  box-shadow: 0 0 10px #0ff;
}

.global-jackpot {
  background: rgba(255, 0, 255, 0.1);
  border: 1px solid #f0f;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  width: 100%;
  margin-top: auto;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

.global-jackpot h3 {
  color: #f0f;
  margin-top: 0;
  font-size: 1.2em;
}

.global-jackpot p {
  font-size: 1.8em;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 8px #f0f;
}

.save-button {
  margin-top: 20px;
  width: 100%;
  background: #4CAF50;
  box-shadow: 0 0 10px #4CAF50;
  color: #fff;
}
.save-button:hover {
  box-shadow: 0 0 20px #4CAF50;
}


.game-area {
  flex-grow: 1;
  padding: 20px;
  position: relative;
}

.tab-content {
  width: 100%;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tab-content.hidden {
  display: none;
}

h2 {
  color: #fff;
  font-size: 2em;
  margin-bottom: 20px;
  text-shadow: 0 0 10px #0ff;
}

.mining-options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

.mining-options label {
  font-size: 1.1em;
  color: #fff;
}

.neon-input {
  background: rgba(0, 255, 255, 0.05);
  border: 1px solid #0ff;
  color: #fff;
  padding: 10px;
  border-radius: 5px;
  font-size: 1em;
  width: 200px;
  text-align: center;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
  appearance: none;
}
.neon-input option {
  background: #1a1a2e;
  color: #fff;
}


.mining-result {
  margin-top: 30px;
  font-size: 1.3em;
  font-weight: bold;
  color: #0f0;
  text-shadow: 0 0 10px #0f0;
  min-height: 50px;
  text-align: center;
}

.upgrades-grid, .planets-grid, .achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  width: 100%;
  margin-top: 20px;
}

.neon-panel {
  background: rgba(30, 30, 50, 0.8);
  border: 1px solid #0ff;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.neon-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.8);
}

.neon-panel h3 {
  color: #0ff;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.3em;
}

.neon-panel p {
  font-size: 0.95em;
  color: #ccc;
  margin-bottom: 10px;
}

.buy-upgrade, .unlock-planet, .buy-prestige-upgrade {
  margin-top: 10px;
  padding: 8px 15px;
  font-size: 0.9em;
}

#start-screen {
  text-align: center;
}

#start-screen .neon-button {
  margin-top: 50px;
  font-size: 1.8em;
  padding: 20px 40px;
}

.prestige-info {
  margin-top: 20px;
  width: 80%;
  max-width: 600px;
}

.prestige-info h3 {
  color: #f0f;
  font-size: 1.5em;
}

.prestige-info ul {
  list-style: none;
  padding: 0;
  margin: 15px 0;
  font-size: 1.1em;
  text-align: left;
}

.prestige-info ul li {
  margin-bottom: 8px;
  color: #e0e0e0;
}

.prestige-shop {
  margin-top: 40px;
  width: 100%;
}

.prestige-shop h3 {
  color: #fff;
  text-shadow: 0 0 10px #f0f;
  margin-bottom: 20px;
}

.prestige-shop .upgrade-item h3 {
  color: #f0f;
}
.prestige-shop .upgrade-item .neon-button {
  background: linear-gradient(45deg, #f0f, #ff0);
  box-shadow: 0 0 10px #f0f;
  color: #0d0d1a;
}
.prestige-shop .upgrade-item .neon-button:hover {
  box-shadow: 0 0 20px #f0f;
}

/* Event Message Styles */
.event-message {
  background: rgba(255, 165, 0, 0.1); /* Оранжевый неоновый фон */
  border: 1px solid #ffa500; /* Оранжевая неоновая рамка */
  box-shadow: 0 0 15px rgba(255, 165, 0, 0.5);
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.2em;
  color: #fff;
  position: relative;
  width: 80%;
  max-width: 700px;
  animation: fadeInOutEvent 8s forwards; /* Анимация появления и исчезновения */
}

@keyframes fadeInOutEvent {
  0% { opacity: 0; transform: translateY(-20px); }
  10% { opacity: 1; transform: translateY(0); }
  90% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); display: none; }
}

.event-message.hidden {
  display: none;
}

.event-message h3 {
  color: #ffa500;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.5em;
  text-shadow: 0 0 10px #ffa500;
}

.event-message .event-action-buttons {
  margin-top: 15px;
}

.event-message .event-action-buttons .neon-button {
  margin: 5px;
  padding: 8px 15px;
  font-size: 0.9em;
}

/* Achievement Item Styles */
.achievement-item {
  background: rgba(50, 50, 70, 0.8);
  border: 1px solid #9933ff; /* Фиолетовый неон для достижений */
  box-shadow: 0 0 15px rgba(153, 51, 255, 0.5);
}

.achievement-item.unlocked {
  border: 2px solid #0f0; /* Зеленый, если разблокировано */
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.7), inset 0 0 8px rgba(0, 255, 0, 0.4);
}

.achievement-item h3 {
  color: #9933ff;
}

.achievement-item.unlocked h3 {
  color: #0f0;
}

.achievement-item p {
  font-size: 0.9em;
  color: #bbb;
}

.achievement-reward {
  font-weight: bold;
  color: #0ff;
  text-shadow: 0 0 5px #0ff;
}


@media (max-width: 900px) {
  .main-content {
      flex-direction: column;
  }
  .sidebar {
      width: 100%;
      border-right: none;
      border-bottom: 2px solid #0ff;
      padding-bottom: 20px;
      margin-bottom: 20px;
  }
  .sidebar nav {
      flex-direction: row;
      justify-content: space-around;
      flex-wrap: wrap;
  }
  .sidebar .nav-button {
      width: auto;
      flex-grow: 1;
      margin: 5px;
  }
  .global-jackpot {
      margin-top: 20px;
  }
  .event-message {
      width: 90%;
  }
}

@media (max-width: 600px) {
  h1 {
      font-size: 1.8em;
  }
  .resource-display {
      font-size: 1.2em;
  }
  .neon-button {
      padding: 10px 15px;
      font-size: 1em;
  }
  .upgrades-grid, .planets-grid, #prestigeUpgradesList, .achievements-grid {
      grid-template-columns: 1fr;
  }
  .prestige-info {
      width: 95%;
  }
}