/* 1. Cambia aquí los colores. Este archivo solo controla el aspecto de la interfaz. */
:root {
  color-scheme: dark;
  --page: #080d16;
  --panel: #0e1623;
  --line: #223044;
  --text: #edf2fa;
  --muted: #90a0b8;
  --gold: #f5c27b;
  --blue: #7bb5fb;
  --green: #92ddbd;
  --radius: 18px;
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
}
button,
input,
select {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  color: inherit;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
#viewport:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
a {
  color: var(--blue);
}
.app {
  max-width: 1720px;
  margin: auto;
  padding: 32px 36px 18px;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand-dot {
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 14px #f5c27b55;
}
h1 {
  font-size: clamp(25px, 3.3vw, 39px);
  font-weight: 500;
  letter-spacing: -0.04em;
  margin: 9px 0 0;
}
h1 > span {
  color: var(--gold);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  white-space: nowrap;
  color: var(--green);
}
.status > span {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status[data-mode='paused'],
.status[data-mode='simulated'] {
  color: var(--gold);
}
/* 2. Distribución: escena a la izquierda, datos a la derecha. */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 254px;
  gap: 22px;
}
.experience-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.experience-tabs button {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 9px;
  padding: 10px 16px;
  color: var(--muted);
  font-size: 13px;
}
.experience-tabs button.selected {
  color: var(--gold);
  border-color: #f5c27b38;
  background: #f5c27b0b;
}
.experience-tabs button span {
  font-size: 10px;
  margin-left: 10px;
  opacity: 0.7;
}
.sky-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0 16px;
}
#sky-clock {
  color: var(--muted);
  font-size: 12px;
}
.appearance-controls {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  grid-column: 1 / -1;
}
.appearance-controls summary {
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.appearance-controls .check {
  margin-top: 14px;
}
.appearance-controls p {
  line-height: 1.6;
}
.scene-shell {
  position: relative;
  min-width: 0;
  min-height: clamp(450px, 65vh, 770px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: radial-gradient(
    ellipse at 42% 45%,
    #111c31 0%,
    #080e19 48%,
    #040811 100%
  );
}
#viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline-offset: -4px;
}
#viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
}
#loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}
.view-tabs {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
  background: #080d16c9;
  border: 1px solid #ffffff0d;
  border-radius: 11px;
  backdrop-filter: blur(12px);
}
.view-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 13px;
  border-radius: 7px;
  font-size: 12px;
}
.view-tabs button:hover {
  color: var(--text);
}
.view-tabs button.selected {
  background: #283248;
  color: #f7f9ff;
}
.scene-footer {
  position: absolute;
  bottom: 17px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  font-size: 11px;
  color: #8494ad;
}
.scene-footer b {
  font-weight: 400;
  padding: 0 7px;
}
.scene-footer > span:first-child {
  color: #b3c1d6;
}
#body-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.body-label {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: auto;
  white-space: nowrap;
  border: 0;
  background: #090e18bd;
  padding: 6px 9px;
  border-radius: 7px;
  font-size: 11px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(5px);
}
.body-label::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--label-color);
}
.inspector {
  display: flex;
  flex-direction: column;
  padding: 9px 0 3px;
}
.inspector-top {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.date-display {
  font-size: 17px;
  margin-top: 17px;
}
.clock-display {
  font-size: 33px;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  margin: 3px 0 7px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 11px;
}
.reading {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.reading > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}
.reading strong {
  font-size: 18px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.scale-control {
  padding-top: 22px;
}
.scale-control select {
  margin-top: 12px;
  width: 100%;
  font-size: 12px;
}
.scale-control p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  margin: 10px 0 13px;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  margin: 7px 0 19px;
  cursor: pointer;
}
.check input {
  accent-color: var(--gold);
  width: 15px;
  height: 15px;
}
/* 3. Controles nativos: botones, selector y fecha. */
.button {
  border: 1px solid var(--line);
  background: #121c2b;
  padding: 11px 16px;
  border-radius: 9px;
  font-size: 12px;
  white-space: nowrap;
  transition: background 0.15s;
}
.button:hover {
  background: #213048;
}
.button.primary {
  background: var(--gold);
  color: #21180c;
  border-color: var(--gold);
  font-weight: 600;
}
.button.primary:hover {
  background: #ffcf91;
}
.button.subtle {
  background: transparent;
  color: #adbbcf;
}
.button.subtle:hover {
  background: #151f30;
  color: var(--text);
}
.button.full {
  width: 100%;
}
select,
input[type='datetime-local'] {
  min-width: 0;
  border: 1px solid var(--line);
  background: #0d1623;
  color: var(--text);
  border-radius: 9px;
  padding: 10px 11px;
  font-size: 12px;
  min-height: 38px;
}
select option {
  background: #101a29;
}
.timeline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 23px 0 8px;
}
.time-buttons {
  display: flex;
  gap: 8px;
  padding-top: 17px;
}
.speed-field,
.date-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
}
.speed-field select {
  min-width: 184px;
}
.date-field input {
  min-width: 215px;
}
.timeline-hint {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin-left: auto;
  padding-top: 17px;
}
.footnote {
  font-size: 10px;
  color: #63748c;
  margin-top: 20px;
  letter-spacing: 0.02em;
}
.footnote span {
  padding: 0 9px;
}
.error {
  padding: 15px;
  background: #38221e;
  border: 1px solid #6b3a2d;
  border-radius: 9px;
  line-height: 1.6;
  margin-top: 15px;
  font-size: 14px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* 4. Ventana de información y adaptación a móvil. */
dialog {
  width: min(620px, calc(100% - 32px));
  max-height: 85vh;
  overflow: auto;
  background: #101a29;
  color: var(--text);
  border: 1px solid #334158;
  border-radius: 18px;
  padding: 27px;
}
dialog::backdrop {
  background: #000a;
  backdrop-filter: blur(5px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.dialog-heading h2 {
  font-size: 22px;
  font-weight: 500;
  margin: 0;
}
dialog p {
  font-size: 14px;
  line-height: 1.75;
  color: #bcc8da;
}
.reference-links {
  display: flex;
  flex-direction: column;
  gap: 13px;
  font-size: 13px;
  margin-top: 24px;
}
@media (min-width: 1450px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 275px;
    gap: 28px;
  }
  .app {
    padding: 40px 48px 20px;
  }
}
@media (max-width: 1020px) {
  .app {
    padding: 24px;
  }
  .header-right {
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 17px;
  }
  .timeline-hint {
    display: none;
  }
  .view-tabs button {
    padding: 9px 10px;
  }
}
@media (max-width: 760px) {
  .experience-tabs button {
    padding: 10px 12px;
  }
  .experience-tabs button span {
    display: none;
  }
  .app {
    padding: 20px 14px;
  }
  .header {
    align-items: flex-start;
    gap: 12px;
  }
  .header-right > .button {
    font-size: 10px;
    padding: 7px 9px;
  }
  .status {
    font-size: 10px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .inspector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
    padding: 0 5px;
  }
  .inspector-top {
    grid-row: span 2;
    padding-top: 18px;
  }
  .clock-display {
    font-size: 29px;
  }
  .reading {
    padding: 13px 0;
  }
  .scale-control {
    grid-column: span 2;
  }
  .scale-control p {
    margin-bottom: 5px;
  }
  .check {
    margin-top: 17px;
  }
  .inspector > .button {
    align-self: center;
  }
  .scene-footer {
    font-size: 10px;
    left: 13px;
    right: 13px;
  }
  .scene-footer > span:last-child {
    display: none;
  }
  .scene-shell {
    height: 480px;
    min-height: 480px;
  }
  .view-tabs {
    top: 12px;
    left: 12px;
    right: 12px;
    justify-content: space-between;
  }
  .view-tabs button {
    font-size: 11px;
    padding: 8px 9px;
  }
  .timeline {
    gap: 13px;
    align-items: flex-end;
  }
  .time-buttons {
    padding: 0;
  }
  .speed-field {
    flex: 1;
  }
  .speed-field select {
    min-width: 160px;
  }
  .date-field {
    width: 100%;
  }
  .date-field input {
    width: 100%;
  }
  .footnote {
    line-height: 1.8;
  }
  .eyebrow {
    font-size: 9px;
  }
  .reading strong {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* Mantiene las instrucciones legibles también sobre el suelo lunar iluminado. */
.scene-footer {
  background: #080d16b8;
  border: 1px solid #ffffff0c;
  border-radius: 8px;
  padding: 9px 11px;
  bottom: 12px;
  left: 12px;
  right: 12px;
  backdrop-filter: blur(8px);
}
