* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #e6e6e6;
  background: #0f1115;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #161922;
  border-bottom: 1px solid #232734;
  flex: 0 0 auto;
}
.brand { font-weight: 600; letter-spacing: 0.2px; }
.actions { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-block;
  padding: 6px 12px;
  background: #2c5cff;
  color: white;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: #232734; color: #cfd3dc; }
.btn.small { padding: 4px 8px; font-size: 12px; }

.status { font-size: 12px; color: #8a93a6; }

.split {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}
.pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #0f1115;
}
.pane.left { flex: 1 1 60%; }
.pane.right { flex: 1 1 40%; }

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #131722;
  border-bottom: 1px solid #232734;
  font-size: 12px;
  color: #aab1c0;
  flex: 0 0 auto;
}
.pane-header a { color: #6da0ff; text-decoration: none; }
.pane-header a:hover { text-decoration: underline; }

.log-controls { display: flex; gap: 6px; align-items: center; }
.log-controls select {
  background: #232734;
  color: #e6e6e6;
  border: 1px solid #2e3344;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 12px;
}

#emu { width: 100%; height: 100%; border: 0; flex: 1 1 auto; background: #000; }

.logs {
  flex: 1 1 auto;
  margin: 0;
  padding: 10px 12px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d6dae3;
  background: #0b0d12;
}

.resizer {
  width: 6px;
  cursor: col-resize;
  background: #1a1d27;
  flex: 0 0 auto;
}
.resizer:hover { background: #2c5cff; }

.toast {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: #1c2030;
  border: 1px solid #2e3344;
  color: #e6e6e6;
  padding: 10px 14px;
  border-radius: 6px;
  max-width: 420px;
  font-size: 13px;
  white-space: pre-wrap;
}
.toast.error { border-color: #5a2230; background: #2a1820; }
.toast.ok { border-color: #1f4a31; background: #14241c; }
