body {
  margin: 0;
  color: black;
  font-family: Arial, sans-serif;
  background: #f4f7fb;
}

#sceneWrapper {
  position: relative;
  width: 100%;
  height: 640px;
  overflow: hidden;
  background: #dff1ff;
}

#container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#titleOverlay {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  text-align: center;
  background: rgba(30, 70, 115, 0.94);
  color: white;
  padding: 10px 28px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

#titleOverlay h1 {
  font-size: 30px;
  margin: 0;
  color: white;
}

#titleOverlay div {
  font-size: 15px;
  margin-top: 5px;
}

#leftPanel {
  position: absolute;
  top: 90px;
  left: 20px;
  z-index: 999999;
  width: 335px;
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: rgba(238, 238, 238, 0.96);
  border: 2px solid #333;
  border-radius: 10px;
  padding: 14px;
  font-family: Arial, sans-serif;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

#leftPanel {
  width: 360px;
  padding: 10px;
}

#leftPanel h2 {
  font-size: 19px;
  margin-bottom: 10px;
}

.controlGroup {
  display: grid;
  grid-template-columns: 118px 1fr 78px;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  text-align: left;
}

.controlGroup label {
  font-weight: bold;
  font-size: 13px;
  margin: 0;
  line-height: 1.2;
}

.controlGroup input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: blue;
}

.controlGroup .valueBox {
  margin-top: 0;
  padding: 5px 6px;
  border-radius: 6px;
  background: white;
  font-size: 13px;
  text-align: center;
  white-space: nowrap;
}

#leftPanel input[type="range"] {
  width: 100%;
  accent-color: blue;
}

.valueBox {
  margin-top: 5px;
  padding: 6px;
  border-radius: 7px;
  background: white;
  font-size: 13px;
  text-align: left;
  line-height: 1.35;
}
.button-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 6px;
  margin: 10px 0;
}

.button-row .btn {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 6px 9px;
  font-size: 13px;
}

#rightPanel {
  position: absolute;
  top: 90px;
  right: 20px;
  z-index: 999999;
  width: 335px;
  max-height: 520px;
  overflow-y: auto;
  background-color: rgba(238, 238, 238, 0.96);
  border: 2px solid #333;
  border-radius: 10px;
  padding: 14px;
  font-family: Arial, sans-serif;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

#rightPanel h2 {
  font-size: 20px;
  margin-top: 0;
  color: #222;
}

.graphBox {
  background: white;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 12px;
}

.graphBox canvas {
  width: 100%;
  height: 160px;
  background: #fafafa;
  border: 1px solid #ccc;
}

.energyBars {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  margin-top: 12px;
  height: 150px;
}

.energyCol {
  flex: 1;
  text-align: center;
}

.barFrame {
  width: 100%;
  height: 120px;
  border-radius: 10px;
  background: linear-gradient(to top, #e8edf3, #ffffff);
  border: 1px solid #bbb;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.energyFill {
  width: 100%;
  height: 0%;
  border-radius: 8px 8px 0 0;
  transition: height 0.1s linear;
}

.keFill {
  background: linear-gradient(to top, #1e90ff, #6ec6ff);
}

.peFill {
  background: linear-gradient(to top, #8e44ad, #d2a8ff);
}

.meFill {
  background: linear-gradient(to top, #27ae60, #7bed9f);
}

.barLabel {
  font-size: 12px;
  margin-top: 6px;
  font-weight: bold;
  color: #333;
}

#seoContent {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 18px;
  background: white;
}

#seoContent h1 {
  text-align: center;
  font-size: 34px;
  margin-bottom: 15px;
  color: #1d3557;
}

#seoContent h2 {
  font-size: 24px;
  margin-top: 28px;
  color: #003366;
}

#seoContent p,
#seoContent li {
  font-size: 17px;
  line-height: 1.6;
}

.formula-box {
  text-align: center;
  font-size: 23px;
  font-weight: bold;
  background: #eef5ff;
  border-left: 6px solid #1d70b8;
  padding: 14px;
  margin: 18px 0;
}

footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  background: #1d3557;
  color: white;
  text-align: center;
}

footer a {
  color: #ffd166;
}

@media (max-width: 900px) {
  #sceneWrapper {
    height: 850px;
  }

  #leftPanel {
    top: 100px;
    left: 10px;
    width: 305px;
    max-height: 340px;
  }

  #rightPanel {
    top: 455px;
    left: 10px;
    right: auto;
    width: 305px;
    max-height: 340px;
  }

  #titleOverlay h1 {
    font-size: 23px;
  }
}
@media (max-width: 900px) {
  .controlGroup {
    grid-template-columns: 100px 1fr 70px;
    gap: 5px;
  }

  .controlGroup label {
    font-size: 12px;
  }

  .controlGroup .valueBox {
    font-size: 12px;
    padding: 4px;
  }
}
