*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: #0a0a2e;
  color: #e0e0ff;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.app {
  display: grid;
  grid-template-rows: 3fr 4fr auto;
  height: 100vh;
  gap: 0;
}

/* Top row: orbital view */
.orbital-panel {
  padding: 8px 8px 4px 8px;
  min-height: 0;
}

/* Bottom row: two equal columns */
.bottom-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px 8px 4px 8px;
  min-height: 0;
}

.canvas-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  min-height: 0;
}

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

/* Control bar */
.controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 20px 18px 20px;
  background: #12123a;
}

/* Play/Pause Button */
.play-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid #6060cc;
  background: #3a3a8a;
  color: white;
  font-size: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
  flex-shrink: 0;
  line-height: 1;
}

.play-btn:hover {
  background: #4a4a9a;
  transform: scale(1.05);
}

.play-btn:active {
  transform: scale(0.95);
}

/* Slider area */
.slider-area {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-row .emoji {
  font-size: 24px;
  flex-shrink: 0;
}

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: #2a2a4a;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #b0b0ff;
  cursor: pointer;
  margin-top: -7px;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #b0b0ff;
  cursor: pointer;
  border: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #7070dd, #2a2a4a);
  height: 6px;
  border-radius: 3px;
}

.phase-label {
  font-size: 20px;
  font-weight: bold;
  color: #f0e0ff;
  text-align: center;
}

.time-label {
  font-size: 16px;
  color: #c0c0e0;
  text-align: center;
}

/* Speed display */
.speed-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.speed-value {
  font-size: 18px;
  font-weight: bold;
  color: #9090cc;
}

.speed-unit {
  font-size: 11px;
  color: #606080;
}
