/* style.css — global styles for sss-webgpu */

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #1a1a1a;
  color: #eee;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}

/* nav tab bar */
#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  height: 36px;
  background: #111;
  border-bottom: 1px solid #333;
  gap: 2px;
  padding: 4px 6px;
  flex-shrink: 0;
}
.nav-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 12px;
  padding: 0 16px;
  cursor: pointer;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.nav-btn:hover {
  color: #ccc;
  background: #1e1e1e;
}
.nav-btn.active {
  color: #fff;
  background: #2a2a2a;
}

/* app */
#app {
  display: flex;
  flex-direction: row;
  width: 100vw;
  height: calc(100vh - 36px);
}
canvas {
  flex: 1;
  display: block;
  min-width: 0;
  position: relative;
  z-index: 1;
}
#instructions-panel {
  width: 260px;
  flex-shrink: 0;
  overflow-y: auto;
  background: #222;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#instructions-panel p {
  margin: 2px 0;
  font-size: 12px;
  color: #bbb;
  line-height: 1.5;
}
#controls {
  width: 260px;
  flex-shrink: 0;
  overflow-y: auto;
  background: #222;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* control group card */

.ctrl-group {
  background: #2a2a2a;
  border-radius: 6px;
  padding: 10px 12px;
}
.ctrl-group h3 {
  margin: 0 0 8px 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #aaa;
}
.ctrl-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 12px;
}
.ctrl-row label {
  flex: 0 0 90px;
  color: #ccc;
}
.ctrl-row input[type="range"] {
  flex: 1;
}
.ctrl-row span {
  flex: 0 0 36px;
  text-align: right;
  font-size: 11px;
  color: #aaa;
}
input[type="range"] {
  width: 100%;
}
.ctrl-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #ccc;
  margin-bottom: 4px;
}
.ctrl-group label span {
  font-size: 11px;
  color: #888;
  min-width: 36px;
  text-align: right;
}
.ctrl-group select, .ctrl-group button {
  width: 100%;
  padding: 4px 8px;
  background: #333;
  color: #eee;
  border: 1px solid #555;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
}
.color-presets {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}
.color-presets button {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border: 2px solid #555;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}
.color-presets button:hover {
  border-color: #fff;
}
.ctrl-group input[type="color"] {
  width: 100%;
  height: 24px;
  border: none;
  background: none;
  cursor: pointer;
}

#report {
  display: none;
  max-width: 900px;
  margin: 40px auto;
  padding: 0 24px;
  line-height: 1.7;
}
#report.visible {
  display: block;
}
#report h2 {
  border-bottom: 1px solid #444;
  padding-bottom: 8px;
}

#app,
#report {
  scroll-margin-top: 36px;
}

.report-meta {
  color: #999;
  font-size: 14px;
  margin-bottom: 24px;
}
.report-formula {
  background: #2a2a2a;
  padding: 10px 16px;
  border-radius: 4px;
  font-family: monospace;
  margin: 12px 0;
}
.report-table {
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}
.report-table th, .report-table td {
  border: 1px solid #555;
  padding: 4px 12px;
  text-align: center;
}
.report-table th {
  background: #333;
}
.report-figure {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
  align-items: flex-start;
}
.report-img-placeholder {
  background: #333;
  border: 1px dashed #666;
  padding: 40px 20px;
  text-align: center;
  color: #888;
  font-size: 12px;
  flex: 1;
  min-width: 200px;
}
.report-figure img {
  flex: 1;
  min-width: 200px;
  max-width: 48%;
  border: 1px solid #444;
}
.report-caption {
  width: 100%;
  font-size: 12px;
  color: #aaa;
  font-style: italic;
}
.report-refs {
  font-size: 13px;
  line-height: 1.8;
}
.report-refs a {
  color: #7ab;
}
