/* The original used Consolas 11 bold italic (reference/original/gravity.css).
   By the owner's request this port uses the system UI font at regular weight,
   which stays crisp on modern screens. */
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
}

body {
  font: 12px/1.3 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  color: #000;
  -webkit-user-select: none;
  user-select: none;
}

#stage {
  position: fixed;
  inset: 0;
  background: #000;
}

#sim {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Flex labels let clicks through to the container underneath. */
#labels {
  position: absolute;
  left: 0;
  top: 0;
  padding: 3px 4px;
  color: #fff;
  line-height: 16px;
  white-space: nowrap;
  pointer-events: none;
}

#labels .gap { margin-top: 6px; }

/* Back link and credit, inserted by the ahdimel.com build. */
#home {
  margin-bottom: 6px;
  color: #8a8a8a;
}

#home a {
  color: #fff;
  text-decoration: none;
  pointer-events: auto;
}

#home a:hover { text-decoration: underline; text-underline-offset: 2px; }
#home .credit a { color: #8a8a8a; }

/* 200x200 bottom-left control box. Its transparent background still swallows
   clicks (Flash hit-tests alpha-0 fills), so no particles spawn under it. */
#panel {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 200px;
  height: 200px;
}

#panel > * {
  position: absolute;
  margin: 0;
}

#panel .text {
  color: #fff;
  white-space: nowrap;
}

#reality {
  left: 4px;
  top: 8px;
  color: #0000FF;
  font-size: 15px;
  white-space: nowrap;
}

#mass {
  left: 37px;
  top: 38px;
  width: 96px;
  height: 15px;
  box-sizing: border-box;
  padding: 0 0 0 1px;
  font: inherit;
  color: #fff;
  background: #2B2B2B;
  border: 1px solid rgba(181, 181, 181, 0.38);
  border-radius: 0;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}

/* Spark's default button skin, approximately. */
.btn {
  left: 2px;
  width: 60px;
  height: 15px;
  box-sizing: border-box;
  padding: 0;
  font: inherit;
  font-size: 11px;
  line-height: 13px;
  color: #000;
  background: linear-gradient(#fff, #d8d8d8);
  border: 1px solid rgba(0, 0, 0, 0.62);
  border-radius: 2px;
  cursor: default;
  outline: none;
  white-space: nowrap;
}

.btn:hover { background: linear-gradient(#ececec, #bbbdbd); }
.btn:active { background: linear-gradient(#aaa, #929496); }

#clear { left: 151px; top: 135px; }

#proto {
  left: 0;
  top: 178px;
  width: auto;
  height: 21px;
  line-height: 19px;
  padding: 0 7px;
}

#particle-quantity { left: 3px; top: 149px; }

#paths-box {
  left: 2px;
  top: 160px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  white-space: nowrap;
  cursor: default;
}

#paths-box input {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin: 0;
  background: linear-gradient(#fff, #d8d8d8);
  border: 1px solid rgba(0, 0, 0, 0.62);
  border-radius: 0;
  outline: none;
  position: relative;
}

#paths-box input:checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  width: 3px;
  height: 7px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(40deg);
}

/* Additions, kept out of the original's way in the opposite corner. */
#extras {
  position: fixed;
  right: 6px;
  bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  opacity: 0.55;
  white-space: nowrap;
}

#extras:hover { opacity: 1; }

#extras select, #extras input {
  font: inherit;
  color: #fff;
  background: #2B2B2B;
  border: 1px solid rgba(181, 181, 181, 0.38);
  border-radius: 0;
  outline: none;
  height: 15px;
  padding: 0 1px;
}

#extras input { width: 48px; }

/* Pan (a port addition): a latching button beside the mass presets. */
#pan { left: 66px; top: 53px; }

.btn.on,
.btn.on:hover {
  background: linear-gradient(#9fa0a1, #c4c5c6);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
}

#sim.pan { cursor: grab; }
#sim.pan.grabbing { cursor: grabbing; }

/* Play/pause (a port addition), first in the extras row. */
#play {
  position: static;
  width: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

#play i {
  width: 6px;
  height: 7px;
  box-sizing: border-box;
  border-left: 2px solid #000;
  border-right: 2px solid #000;
}

#play.paused i {
  width: 0;
  height: 0;
  border-style: solid;
  border-color: transparent transparent transparent #000;
  border-width: 4px 0 4px 6px;
}
