/* style.css — schlichtes dunkles Layout. Das Spielfeld ist ein Canvas. */
:root {
  --bg: #0d1016;
  --panel: #161b24;
  --panel-2: #1e2430;
  --line: #2a303c;
  --text: #d7dce4;
  --muted: #8a93a3;
  --accent: #d7963f;
  --accent-2: #3d7ea6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.topbar h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--accent);
}
.stat { display: flex; flex-direction: column; align-items: flex-end; }
.stat-value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat.small .stat-value { font-size: 16px; color: var(--muted); }
.stat.big .stat-value { font-size: 30px; color: var(--accent); }

/* --- Schritt 3: Auftrag, Budget, Toast, Freischaltungen --- */
.order {
  min-width: 220px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 12px;
}
.order-head { font-size: 14px; margin-bottom: 6px; }
.order-tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: .5px;
  color: #12151b; background: var(--accent); padding: 1px 6px; border-radius: 4px; margin-right: 6px;
}
#order-desc { font-weight: 600; }
.order-bar { height: 7px; background: #0c0f14; border-radius: 4px; overflow: hidden; }
.order-fill { height: 100%; width: 0%; background: var(--accent); transition: width .25s ease; }
.order-foot { display: flex; justify-content: space-between; margin-top: 5px; font-size: 11px; color: var(--muted); }
.order-reward { color: var(--accent-2); }

#budget.flash { animation: budgetflash .45s ease; }
@keyframes budgetflash { 0%, 100% { color: var(--muted); } 40% { color: #e08a80; } }

.toast {
  position: fixed; top: 68px; left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--accent); color: #12151b; font-weight: 600;
  padding: 10px 18px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.45);
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.recipe-btn.locked { opacity: .45; cursor: not-allowed; }
.recipe-btn.locked::after { content: ' 🔒'; }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }

.layout { display: flex; gap: 20px; padding: 20px; align-items: flex-start; }

.panel {
  width: 220px;
  flex: 0 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.panel h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin: 16px 0 8px;
}
.panel h2:first-child { margin-top: 0; }

.tools { display: flex; flex-direction: column; gap: 6px; }
.tool-btn, .speed-btn, .actions button {
  cursor: pointer;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  text-align: left;
  font-size: 13px;
}
.tool-btn:hover, .speed-btn:hover, .actions button:hover { border-color: #3a4354; }
.tool-btn.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tool-btn.disabled { opacity: 0.4; cursor: not-allowed; }

kbd {
  display: inline-block;
  min-width: 16px;
  text-align: center;
  background: #0c0f14;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
  font: 11px/1.6 ui-monospace, monospace;
  color: var(--muted);
}

.active-line { margin: 0; color: var(--text); }
.active-line .hint { color: var(--muted); }
#tool-name { color: var(--accent); font-weight: 600; }

.rotate-btn {
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 13px;
  text-align: center;
}
.rotate-btn:hover { border-color: #3a4354; }

.recipes { display: flex; flex-direction: column; gap: 6px; }
.recipe-btn {
  cursor: pointer;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
  text-align: left;
  font-size: 12px;
}
.recipe-btn:hover { border-color: #3a4354; }
.recipe-btn.active { border-color: var(--accent-2); box-shadow: inset 0 0 0 1px var(--accent-2); }
#recipe-section.dim { opacity: 0.5; }
.recipe-hint { margin: 8px 0 0; font-size: 11px; }

.legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.legend li { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.legend .dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,0.4); }

.speeds { display: flex; gap: 6px; }
.speed-btn { flex: 1; text-align: center; padding: 8px 0; }
.speed-btn.active { border-color: var(--accent-2); box-shadow: inset 0 0 0 1px var(--accent-2); }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.actions button { text-align: center; }
.actions .danger:hover { border-color: #b5453a; color: #e08a80; }

.help ul { margin: 0; padding-left: 16px; color: var(--muted); }
.help li { margin: 3px 0; }

.board-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  line-height: 0;
}
#board { display: block; border-radius: 4px; cursor: crosshair; }
