:root {
  --bg-dark: #121416;
  --bg-card: #1c1f22;
  --text-main: #e0e6ed;
  --text-highlight: #ff9f43;
  --accent-green: #2ed573;
  --accent-red: #ff4757;
  --border-color: #2f3542;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Courier New', Courier, monospace;
  margin: 0;
  padding: 20px;
}

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

header {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

h1 {
  color: var(--text-highlight);
  margin: 0 0 10px 0;
  font-size: 1.8em;
}

#stats-bar {
  display: flex;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 10px 15px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  font-size: 0.95em;
}

/* Tab Navigation Styling */
#tabs-navigation {
  display: flex;
  flex-wrap: wrap; /* Allows wrapping on narrower monitors */
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

.tab-btn {
  background: #1c1f22;
  color: #a4b0be;
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
  border-radius: 4px 4px 0 0;
}

.tab-btn:hover {
  color: var(--text-highlight);
}

.tab-btn.active {
  background: var(--text-highlight);
  color: var(--bg-dark);
  border-color: var(--text-highlight);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.info-box {
  background: #1a221d !important;
  border-left: 5px solid var(--accent-green) !important;
  margin-bottom: 20px;
}

.info-box p {
  margin: 5px 0 0 0;
  font-size: 0.88em;
  color: #a4b0be;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 20px;
}

h2 {
  color: var(--text-highlight);
  font-size: 1.2em;
  margin-top: 0;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

h3 {
  font-size: 1em;
  color: #ff9f43;
  margin: 0 0 5px 0;
}

.building-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed #2f3542;
}

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

button {
  background: #2f3542;
  color: white;
  border: 1px solid #57606f;
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
}

button:hover {
  background: var(--text-highlight);
  color: var(--bg-dark);
}

button:disabled {
  background: #1e2224;
  color: #57606f;
  border-color: #2f3542;
  cursor: not-allowed;
}

select, input[type="text"], input[type="number"] {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px;
  margin-bottom: 12px;
  box-sizing: border-box;
  font-family: inherit;
}

label {
  display: block;
  font-size: 0.85em;
  margin-bottom: 4px;
  color: #a4b0be;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  padding: 8px 10px;
  margin-bottom: 6px;
  background: var(--bg-dark);
  border-left: 3px solid var(--text-highlight);
  font-size: 0.9em;
}

.empty-list {
  border-left: 3px solid #57606f;
  color: #747d8c;
  font-style: italic;
}

.alert-box {
  background: #2f3542;
  padding: 12px;
  border-left: 5px solid var(--text-highlight);
  margin-bottom: 15px;
  font-size: 0.9em;
  line-height: 1.4;
}

.mission-row {
  display: flex;
  justify-content: space-between;
  background: var(--bg-dark);
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.mission-row.selected {
  border-color: var(--text-highlight);
  background: #25282b;
}

/* Squad Management Styling */
.squad-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 4px;
}

.squad-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 5px;
  margin-bottom: 10px;
}

.squad-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px;
  background: #25282b;
  margin-bottom: 6px;
  font-size: 0.85em;
}

.slot-actions {
  display: flex;
  gap: 5px;
}

.slot-actions select {
  margin-bottom: 0;
  padding: 3px;
  font-size: 0.95em;
  width: auto;
}

.slot-actions button {
  padding: 3px 8px;
  font-size: 0.95em;
}

/* FLOATING NOTIFICATION SYSTEM */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  width: calc(100% - 40px);
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--text-highlight);
  color: var(--text-main);
  padding: 14px 18px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82em;
  line-height: 1.4;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
  animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  opacity: 0;
  white-space: pre-line;
}

.toast.success {
  border-left-color: var(--accent-green);
}

.toast.danger {
  border-left-color: var(--accent-red);
}

.toast.fade-out {
  animation: toastFadeOut 0.4s ease-in forwards;
}

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

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