/* === Global === */
.building-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
}

.building-card {
  flex: 1 1 220px;
  background: #111;
  border: 1px solid gold;
  border-radius: 6px;
  padding: 10px;
  font-family: 'Courier New', monospace;
  color: #ddd;
  max-width: 300px;
  box-sizing: border-box;
  position: relative;
}

.building-header {
  font-weight: bold;
  color: gold;
  margin-bottom: 5px;
}

.building-status.ready { color: lightgreen; }
.building-status.inprogress { color: #f0c040; }

.requirement {
  color: #aaa;
  font-size: 0.9em;
  margin-top: 5px;
}

.building-time {
  font-size: 0.9em;
  margin-bottom: 5px;
}

.progress-container {
  background: #333;
  border: 1px solid #666;
  height: 12px;
  margin-bottom: 5px;
  position: relative;
  border-radius: 4px;
}

.progress-bar {
  background-color: gold;
  height: 100%;
  width: 0%;
  transition: width 0.5s;
  border-radius: 4px 0 0 4px;
}

.building-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 5px;
  flex-wrap: wrap;
}

.btn-gold {
  background-color: gold;
  color: black;
  border: none;
}

@media (max-width: 600px) {
  .building-card {
    flex: 1 1 100%;
  }
}

body {
  background-color: #000;
  color: #FFD700;
  font-family: 'Courier New', monospace;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  color: #FFD700;
  text-align: center;
  margin-top: 20px;
}

/* === Header-Stil === */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #000;
  color: #FFD700;
  border: 1px solid #FFD700;
  padding: 10px;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  box-shadow: 0 0 10px #FFD70055;
  margin-bottom: 20px;
}

.game-header .center {
  flex-grow: 1;
  text-align: center;
}

/* === Map-Stil === */
.map {
  display: inline-block;
  font-family: monospace;
  background: #111;
  border: 1px solid #FFD700;
  padding: 10px;
  margin: 10px;
}

.map-row {
  height: 20px;
}

.map-cell {
  display: inline-block;
  width: 20px;
  height: 20px;
  text-align: center;
  vertical-align: middle;
  font-size: 20px;
  background-color: #111;
  color: #FFD700;
  border: 1px solid #222;
}

.map-cell[data-username]:hover {
  cursor: crosshair;
  background-color: #222;
  box-shadow: 0 0 6px #FFD700;
}

/* === Tooltip für Userinfo === */
.user-info-box {
  position: absolute;
  background: rgba(0, 0, 0, 0.95);
  color: #FFD700;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 0 10px #FFD70055;
  border: 1px solid #FFD700;
}

/* === Fortschrittsbalken === */
.progress-container {
  background-color: #111;
  border: 1px solid #FFD700;
  border-radius: 4px;
  width: 120px;
  height: 18px;
  overflow: hidden;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

.progress-bar .fill {
  height: 100%;
  background: linear-gradient(to right, limegreen, gold);
  transition: width 1s linear;
}

.progress-time {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  line-height: 18px;
  text-align: center;
  font-size: 13px;
  color: black;
  font-weight: bold;
  pointer-events: none;
}

/* === Tabellen / Formulare === */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: #111;
  color: #FFD700;
  margin-top: 10px;
  border: 1px solid #FFD700;
}

th, td {
  border: 1px solid #FFD700;
  padding: 8px;
  text-align: center;
}

input, select {
  background-color: #111;
  border: 1px solid #FFD700;
  color: #FFD700;
  border-radius: 4px;
  padding: 4px 8px;
}

button {
  background-color: transparent;
  color: #FFD700;
  border: 1px solid #FFD700;
  padding: 6px 12px;
  border-radius: 5px;
  font-family: inherit;
  transition: background 0.3s ease;
  cursor: pointer;
}

button:hover {
  background-color: #FFD700;
  color: black;
}

/* === Layout-Container für Kauf/Anbau nebeneinander === */
.farm-container {
  display: flex;
  gap: 20px;
  padding: 20px;
}

.farm-left {
  width: 30%;
}

.farm-right {
  width: 70%;
}
:root, [data-bs-theme=light] {
  --bs-body-bg: #000000 !important;
  --bs-body-color: #FFD700 !important;
}
body {
  background-color: var(--bs-body-bg) !important;
  color: var(--bs-body-color) !important;
}
/* === Nachrichten-System === */
.message-entry {
  background: #111;
  border: 1px dashed #FFD700;
  padding: 10px 15px;
  margin-bottom: 8px;
  font-size: 0.95em;
  line-height: 1.4;
  border-radius: 0;
  box-shadow: none;
}
.message-entry.unread {
  background-color: #222;
  color: #00FF00;
}
.message-entry .subject {
  font-weight: bold;
  font-size: 1em;
  margin-bottom: 4px;
  color: #FFD700;
}
.message-entry .from {
  font-weight: normal;
  font-size: 0.9em;
  color: #00BFFF;
}
.message-entry .timestamp {
  font-size: 0.8em;
  color: #999;
  float: right;
  margin-left: 10px;
}
.message-tabs {
  margin: 10px 0 20px;
}
.message-tabs .btn {
  font-size: 0.9em;
  padding: 6px 10px;
  border-radius: 3px;
}
.message-form input,
.message-form textarea {
  width: 100%;
  background-color: #000;
  color: #FFD700;
  border: 1px solid #FFD700;
  padding: 8px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
}
.message-form button {
  margin-top: 10px;
}
.message-wrapper {
  padding: 20px;
  color: #FFD700;
  font-family: 'Courier New', monospace;
}

.message-tabs a {
  border: 1px dashed #FFD700;
  padding: 4px 10px;
  text-decoration: none;
  color: #FFD700;
  background: transparent;
  border-radius: 0;
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  transition: background 0.2s ease-in-out;
}
.message-tabs a:hover {
  background: #333;
}
.message-tabs a.active {
  background: #FFD700;
  color: black;
  font-weight: normal;
}

.retro-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
  margin-top: 20px;
}

.retro-form input,
.retro-form textarea {
  background: #111;
  color: #FFD700;
  border: 1px solid #FFD700;
  padding: 6px;
  font-family: inherit;
}

.retro-form button {
  align-self: flex-start;
}

.text-error {
  color: red;
}

.text-success {
  color: limegreen;
}

.text-link {
  color: #FFD700;
  text-decoration: none;
}
.message-tabs a {
  background: red !important;
}