html, body {
  width: 100%;
  height: 100%;
  margin: 0; padding: 0;
  background: #000 url('https://circularearth.itisadome.com/Real-Flat-Earth-Representation_v2.jpg') no-repeat center center fixed;
  background-size: cover;
  font-family: Arial, sans-serif;
  color: #fff;
  box-sizing: border-box;
  min-height: 100vh;
}
.header-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.2em;
  margin-bottom: 0.3em;
  gap: 24px;
}
.header-flex img {
  height: 46px;
  vertical-align: middle;
}
.header-flex h1 {
  text-align: left;
  font-size: 2em;
  color: #fff;
  letter-spacing: 0.02em;
  text-shadow: 0 0 10px #000b;
  margin: 0;
  padding: 0;
}
.header-flex .x-link {
  display: flex;
  align-items: center;
  margin-left: 12px;
  text-decoration: none;
  gap: 7px;
}
.header-flex .x-link img {
  height: 32px;
  width: 32px;
  border-radius: 6px;
  background: #000;
  box-shadow: 0 1px 5px #0008;
  display: inline-block;
}
.header-flex .x-link span {
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  white-space: nowrap;
}
canvas {
  touch-action: none;
}
.container {
  width: 100vw;
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin-top: 30px;
  position: relative;
  z-index: 2;
}
.panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 0;
  background: rgba(0,0,0,0.32);
  border-radius: 14px;
  min-width: 200px;
  max-width: 270px;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 0 9px #0006;
  align-items: center;
  text-align: center;
  position: sticky;
  top: 16px;
  height: fit-content;
  z-index: 10;
  transition: background 0.2s;
}
.panel label, .panel select, .panel input {
  color: #fff;
  background: #000;
}
.panel label {
  margin-bottom: 2px;
  font-weight: bold;
  font-size: 14px;
}
.panel input[type="number"], .panel select {
  border: 1px solid #fff;
  background: #111;
  color: #fff;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  margin-bottom: 4px;
  width: 120px;
  text-align: center;
  display: block;
  box-sizing: border-box;
}
.panel select {
  width: 134px;
}
.panel input[type="range"] {
  width: 120px;
}
.sim-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 320px;
  min-height: 320px;
}
#sim-canvas {
  background: #101018;
  display: block;
  border-radius: 50%;
  box-shadow: 0 0 24px #000b;
  margin: 0 auto;
  width: 100%;
  height: auto;
  max-width: 90vw;
  max-height: 90vw;
  aspect-ratio: 1/1;
}
.sim-area button, .panel button {
  margin: 18px auto 0 auto;
  display: block;
  padding: 8px 18px;
  font-size: 14px;
  border-radius: 7px;
  border: none;
  background: #111;
  color: #fff;
  box-shadow: 0 0 7px #0007;
  cursor: pointer;
  transition: background 0.2s;
}
.sim-area button:hover, .panel button:hover {
  background: #333;
}
.about-section {
  max-width: 900px;
  margin: 60px auto 32px auto;
  padding: 14px 26px 24px 26px;
  background: rgba(0,0,0,0.18);
  border-radius: 14px;
  text-align: center;
}
.about-section h1 {
  font-size: 2em;
  color: #fff;
  letter-spacing: 0.02em;
  text-shadow: 0 0 10px #000b;
  margin: 0 0 20px 0;
  padding: 0;
}
.about-section .about-text {
  font-size: 14px;
  font-weight: normal;
  color: #eee;
  line-height: 1.8;
  margin: 0 auto;
}
.footerbar {
  width: 100vw;
  height: 40px;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  box-sizing: border-box;
  padding: 0 100px;
  font-size: 14px;
}
.footerbar img {
  height: 38px;
  margin-right: 12px;
  vertical-align: middle;
}
.footerbar a {
  color: #fff; text-decoration: none; font-weight: bold;
  transition: color 0.15s;
}
.footerbar a:hover {
  color: #ff0;
  text-decoration: underline;
}
.footerbar .footer-center {
  flex: 1;
  text-align: center;
}
.footerbar .footer-right {
  text-align: right;
  min-width: 120px;
}
@media (max-width: 1100px) {
  .panel.left { margin-left:10px;}
  .panel.right { margin-right: 50px;}
  .footerbar { padding: 0 50px;}
}
@media (max-width: 850px) {
  .container {flex-direction: column; align-items: center;}
  .panel.left, .panel.right {margin: 0 0 12px 0;}
  .footerbar {padding: 0 24px;}
  .sim-area {width: 100vw;}
  #sim-canvas {width: 90vw; height: 90vw;}
  .panel {top:8px;}
  .about-section {margin: 40px auto 24px auto;}
}
@media (max-width: 600px) {
  .panel {max-width: 100vw; min-width: unset; width: 90vw; margin: 0 auto 12px auto;}
  .container {padding-left: 0 !important;padding-right: 0 !important;}
  .footerbar {padding: 0 8px;}
  .header-flex {flex-direction: column; gap: 10px;}
  .header-flex img {margin-bottom: 6px;}
  .panel {top:6px;}
  .about-section {padding: 12px 9vw 20px 9vw;}
}