body {
  background-color: #1a1a1a;
  color: #fff;
  font-family: 'Courier New', monospace;
  margin: 0;
  padding: 20px;
}

#game-container {
  max-width: 1000px;
  margin: 0 auto;
}

#stats-panel {
  background-color: #2a2a2a;
  padding: 15px;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.stat {
  font-size: 1.2em;
  font-weight: bold;
}

#main-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

#game-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#side-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#location-display {
  font-size: 1.3em;
  margin-bottom: 15px;
  color: #ffd700;
}

#game-log {
  height: 200px;
  overflow-y: auto;
  background-color: #1a1a1a;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 20px;
}

#game-log div {
  margin: 5px 0;
  padding: 5px;
}

.log-success {
  color: #4CAF50;
}

.log-failure {
  color: #f44336;
}

.log-warning {
  color: #ff9800;
}

#actions-panel, #location-panel {
  background-color: #2a2a2a;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}

button {
  background-color: #4a4a4a;
  color: white;
  border: none;
  padding: 10px 20px;
  margin: 5px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
  min-height: 45px;
  transition: all 0.3s ease;
}

button:hover {
  background-color: #666;
}

button:disabled {
  background-color: #333;
  cursor: not-allowed;
  opacity: 0.5;
}

#action-buttons, #location-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stat-bar {
  width: 150px;
  height: 20px;
  background-color: #333;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 5px;
}

.stat-bar-fill {
  height: 100%;
  background-color: #4CAF50;
  transition: width 0.3s ease;
}

.energy-bar .stat-bar-fill {
  background-color: #2196F3;
}

.low-energy .stat-bar-fill {
  background-color: #f44336;
}

.health-bar .stat-bar-fill {
  background-color: #4CAF50;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.health-bar.injured .stat-bar-fill {
  background-color: #f44336;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
  }
}

.action-locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
}

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

.inventory-panel {
  background-color: #2a2a2a;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.inventory-item {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
}

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #4CAF50;
  color: white;
  padding: 15px 25px;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.5s ease-out, fadeOut 0.5s ease-out 4.5s forwards;
  z-index: 1000;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

#market-panel {
  position: relative;
  background-color: #2a2a2a;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}

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

.close-market {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 0 10px;
  transition: color 0.3s;
}

.close-market:hover {
  color: #ff4444;
}

.market-title {
  color: #ffd700;
  margin-bottom: 15px;
  border-bottom: 1px solid #3a3a3a;
  padding-bottom: 10px;
}

.market-item {
  background-color: #333;
  margin: 10px 0;
  padding: 15px;
  border-radius: 5px;
  transition: background-color 0.3s;
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 10px;
  align-items: center;
}

.market-item:hover {
  background-color: #444;
}

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

.market-item span {
  white-space: nowrap;
}

.market-item-controls {
  display: flex;
  gap: 5px;
  align-items: center;
}

.market-item-controls input {
  width: 50px;
  background: #333;
  border: 1px solid #444;
  color: white;
  padding: 2px 5px;
  border-radius: 3px;
}

.market-item-controls button {
  padding: 5px 10px;
  font-size: 0.9em;
}

.drug-price {
  color: #4CAF50;
  font-weight: bold;
}

.drug-amount {
  color: #2196F3;
  font-weight: bold;
}

.gear-price {
  color: #ffd700;
  font-weight: bold;
}

.gear-owned {
  color: #4CAF50;
  font-weight: bold;
}

.gear-description {
  color: #999;
  font-size: 0.9em;
  margin-top: 5px;
  font-style: italic;
}

.market-panel button {
  background-color: #4a4a4a;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.market-panel button:hover {
  background-color: #666;
}

.market-panel button:disabled {
  background-color: #333;
  cursor: not-allowed;
}

.info-icon {
  position: fixed;
  top: 20px;
  right: 20px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  z-index: 1000;
  transition: transform 0.2s ease;
}

.info-icon:hover {
  transform: scale(1.1);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  overflow: auto;
}

.modal-content {
  background-color: #2a2a2a;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 800px;
  border-radius: 10px;
  color: #fff;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.help-section {
  margin-top: 20px;
}

.help-section h3 {
  color: #ffd700;
  margin-top: 20px;
  margin-bottom: 10px;
}

.help-section ul {
  list-style-type: none;
  padding-left: 0;
}

.help-section li {
  margin: 10px 0;
  padding-left: 20px;
  position: relative;
}

.help-section li:before {
  content: "•";
  color: #ffd700;
  position: absolute;
  left: 0;
}

.help-section strong {
  color: #4CAF50;
}

.help-section .health-info {
  color: #f44336;
  font-weight: bold;
}

.stat span#health-value {
  transition: color 0.3s ease;
}

.stat span#health-value.injured {
  color: #ff0000;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
}

.on-cooldown {
  background-color: #333 !important;
  opacity: 0.7;
  cursor: not-allowed;
  font-size: 0.9em;
  color: #999;
  line-height: 1.2;
  padding: 5px 10px;
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.on-cooldown:hover {
  background-color: #333 !important;
}

.on-cooldown::after {
  content: attr(title);
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
}

#dev-menu {
  position: fixed;
  right: -300px;
  top: 0;
  width: 280px;
  height: 100vh;
  background-color: #2a2a2a;
  padding: 20px;
  box-shadow: -2px 0 10px rgba(0,0,0,0.5);
  overflow-y: auto;
  transition: right 0.3s ease;
  z-index: 2000;
}

#dev-menu.active {
  right: 0;
}

#dev-toggle-button {
  position: fixed;
  top: 20px;
  right: 60px;
  background: #333;
  color: #ffd700;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
  z-index: 2001;
}

#dev-toggle-button:hover {
  background: #444;
}

#dev-menu h3 {
  color: #ffd700;
  margin-top: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #444;
}

.dev-control {
  margin: 15px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dev-control label {
  color: #ccc;
}

.dev-control input,
.dev-control select {
  background: #333;
  border: 1px solid #444;
  color: white;
  padding: 8px;
  border-radius: 3px;
  width: 100%;
}

.dev-control button {
  background: #4CAF50;
  color: white;
  padding: 8px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s;
}

.dev-control button:hover {
  background: #45a049;
}

.market-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #444;
}

.market-section h4 {
  color: #ffd700;
  margin: 0 0 15px 0;
}