/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Base */
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #0b0f1b 0%, #05070d 70%);
  color: #fff;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Control panel */
#info {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 100;
  background: linear-gradient(180deg, rgba(16,16,26,0.92), rgba(16,16,26,0.78));
  backdrop-filter: blur(3px);
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 600px;
}

h1 { margin-bottom: 8px; font-size: 20px; letter-spacing: 0.3px; font-weight: 700; }

#controls { display: flex; flex-direction: column; gap: 10px; }
.section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1.1px; opacity: 0.8; margin-top: 4px; }
.control-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.control-group { display: flex; flex-direction: column; gap: 8px; }
.control-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.control-group.toggles { display: flex; gap: 12px; align-items: center; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
label { font-size: 13px; opacity: 0.95; }
span { font-size: 12px; opacity: 0.9; }

/* Sliders */
input[type="range"] {
  appearance: none; -webkit-appearance: none; width: 100%; height: 6px;
  border-radius: 4px; background: #2b2f46; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: #58c26b; border: 2px solid #e6ffe9; cursor: pointer; box-shadow: 0 1px 0 rgba(0,0,0,0.3);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: #58c26b; border: 2px solid #e6ffe9; cursor: pointer;
}
input[type="range"]::-moz-range-track { background: #2b2f46; height: 6px; border-radius: 4px; }

/* Buttons */
button {
  padding: 8px 14px; color: white; border: none; border-radius: 8px; cursor: pointer;
  transition: transform 0.06s ease, background-color 0.25s ease; background-color: #2e7d32; font-size: 13px; font-weight: 600;
}
button:hover { background-color: #2a7030; }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: not-allowed; }

/* Status */
#status-row { display: flex; align-items: center; gap: 12px; }
#eclipseStatus { padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,0.1); font-weight: 700; min-width: 140px; }
#eclipseDetails { display: flex; gap: 12px; font-size: 12px; opacity: 0.92; }

/* Kid facts */
#edu { margin-top: 2px; }
#edu summary { cursor: pointer; font-weight: 700; }
#edu ul { padding-left: 18px; margin: 6px 0; line-height: 1.35; }

/* Scene container */
#scene-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; }
#fx-overlay { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,0.04), rgba(0,0,0,0.25) 70%); }

/* Ground view */
#ground-view {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to bottom, #87CEEB, #4a9eff);
  display: none; flex-direction: column; align-items: center; justify-content: center;
  z-index: 1000; transition: background 1s ease;
}
.ground-sun { width: 150px; height: 150px; background: radial-gradient(circle at 30% 30%, #fff, #ffd700); border-radius: 50%; position: absolute; top: 20%; box-shadow: 0 0 50px #ffd700; transition: all 1s ease; }
.ground-sun .sun-glow { position: absolute; inset: -40px; border-radius: 50%; box-shadow: 0 0 120px 30px rgba(255, 215, 0, 0.6), 0 0 220px 80px rgba(255, 215, 0, 0.25); pointer-events: none; }
.ground-moon { width: 160px; height: 160px; background: radial-gradient(circle at 30% 30%, #fff, #cccccc); border-radius: 50%; position: absolute; top: 20%; opacity: 0; transition: all 1s ease; transform: scale(0.8); }
.ground-scene { position: absolute; bottom: 0; width: 100%; height: 40%; background: linear-gradient(to bottom, #90EE90, #228B22); display: flex; justify-content: space-around; align-items: flex-end; padding: 20px; overflow: hidden; transition: all 1s ease; }
.building { width: 60px; height: 120px; background: #666; margin: 0 10px; position: relative; box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); transition: all 1s ease; }
.building::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 20px; background: #888; }
.tree { position: absolute; bottom: 0; width: 30px; height: 60px; transition: all 1s ease; }
.tree-trunk { width: 10px; height: 40px; background: #4a2f10; margin: 0 auto; }
.tree-leaves { width: 30px; height: 30px; background: #2d5a27; border-radius: 50%; margin: -15px auto 0; }
.person { position: absolute; bottom: 0; width: 20px; height: 40px; transition: all 1s ease; }
.person-head { width: 10px; height: 10px; background: #000; border-radius: 50%; margin: 0 auto; }
.person-body { width: 15px; height: 20px; background: #000; margin: 0 auto; }
.person-legs { width: 20px; height: 10px; background: #000; margin: 0 auto; display: flex; justify-content: space-between; }
.person-legs::before, .person-legs::after { content: ''; width: 5px; height: 10px; background: #000; }
.cloud { position: absolute; width: 100px; height: 40px; background: rgba(255, 255, 255, 0.8); border-radius: 20px; animation: float 20s linear infinite; transition: all 1s ease; }
.cloud::before, .cloud::after { content: ''; position: absolute; background: rgba(255, 255, 255, 0.8); border-radius: 50%; }
.cloud::before { width: 50px; height: 50px; top: -20px; left: 15px; }
.cloud::after { width: 30px; height: 30px; top: -10px; right: 15px; }
@keyframes float { from { transform: translateX(-100px); } to { transform: translateX(calc(100vw + 100px)); } }
#ground-view.eclipse-active { background: linear-gradient(to bottom, #000033, #000066); }
#ground-view.eclipse-active .ground-sun { opacity: 0.3; transform: scale(0.8); }
#ground-view.eclipse-active .ground-moon { opacity: 1; transform: scale(1); }
#ground-view.eclipse-active .ground-scene { background: linear-gradient(to bottom, #1a472a, #0a2315); }
#ground-view.eclipse-active .building { background: #444; }
#ground-view.eclipse-active .tree-leaves { background: #1a472a; }
#ground-view.eclipse-active .cloud { background: rgba(255, 255, 255, 0.4); }
#ground-view.eclipse-active .cloud::before, #ground-view.eclipse-active .cloud::after { background: rgba(255, 255, 255, 0.4); }
.person.eclipse-viewing { transform: translateY(-20px); }
#zoom-out-ground { position: absolute; bottom: 20px; right: 20px; z-index: 1001; }
#ground-caption { position: absolute; bottom: 20px; left: 20px; background: rgba(0,0,0,0.4); padding: 8px 12px; border-radius: 6px; font-size: 14px; }

/* Overlay labels for 3D objects */
.label { position: absolute; color: #fff; font-size: 12px; background: rgba(0,0,0,0.4); padding: 2px 6px; border-radius: 4px; pointer-events: none; transform: translate(-50%, -50%); white-space: nowrap; }