/* style.css — dark theme matching the original black+teal Java applet */
:root {
  --bg: #1a1a2e;
  --panel: #0a4a8f;  /* teal: Color(10,180,230) ~ rgb(20,74,143) from original */
  --text: #e0e0e0;
  --accent: #e94560;
  --input-bg: #fff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: #1a1a2e;
  color: var(--text);
  font-family: 'Segoe UI', Arial, sans-serif;
  min-height: 100vh;
}
.app { max-width: 1100px; margin: 0 auto; padding: 12px; }

/* Tabs at bottom (matching original style where tabs are navigation) */
.tabs {
  display: flex; gap: 4px; justify-content: center; margin-top: 16px;
}
.tb {
  padding: 8px 24px; border: none; cursor: pointer;
  background: #16213e; color: #8899aa;
  font-size: 0.9rem; font-weight: 500; border-radius: 4px 4px 0 0;
}
.tb:hover { color: #fff; }
.tb.active { background: var(--accent); color: #fff; }

/* Main layout */
.main-layout {
  display: grid;
  grid-template-columns: 680px 1fr;
  gap: 0;
  border-radius: 6px;
  overflow: hidden;
}
.graph-panel {
  background: #000;
  padding: 4px;
}
.graph-panel canvas { display: block; }

.legend {
  display: flex; gap: 14px; padding: 6px 8px;
  font-size: 0.75rem; color: #aaa;
}
.leg { display: flex; align-items: center; gap: 4px; }
.leg i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }

/* Controls */
.ctrl {
  background: #16213e;
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
  min-width: 220px;
}
.ctrl h3 { font-size: 1rem; color: #fff; font-weight: 600; margin-bottom: 2px; }
.row { display: flex; align-items: center; gap: 6px; }
.row label { font-size: 0.78rem; color: #aab; min-width: 80px; }
.row input {
  flex: 1; padding: 5px 8px; background: #fff; color: #000;
  border: 1px solid #555; border-radius: 3px; font-size: 0.82rem; font-family: inherit;
}
.row input[readonly] { background: #e8f0e8; font-weight: 600; }

.btn {
  padding: 6px 12px; border: none; border-radius: 4px;
  cursor: pointer; font-size: 0.8rem; font-family: inherit;
  background: #0f3460; color: #fff;
  transition: background 0.15s;
}
.btn:hover { background: #1a4a8a; }
.btn.prim { background: var(--accent); font-weight: 600; }
.btn.prim:hover { background: #d63850; }
.btn.sm { padding: 4px 8px; font-size: 0.75rem; }

.sep { height: 1px; background: #2a2a4a; margin: 2px 0; }

.credits { font-size: 0.68rem; color: #778; margin-top: 4px; line-height: 1.4; }

.tab { display: none; }
.tab.active { display: block; }

@media (max-width: 960px) {
  .main-layout { grid-template-columns: 1fr; }
  .graph-panel canvas { width: 100%; height: auto; aspect-ratio: 680/400; }
}
