/* ===== The Sky Right Now ===== */

.sky-screen {
  max-width: 860px;
}

.sky-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.sky-topbar .back-btn {
  margin-bottom: 0;
  text-decoration: none;
  display: inline-block;
}

.ar-btn {
  padding: 10px 22px;
  font-size: 1.05rem;
}

.loc-line {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 0.98rem;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.sky-card {
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  padding: 14px;
  margin-top: 18px;
  text-align: center;
}

#sky-canvas {
  width: 100%;
  cursor: pointer;
  touch-action: manipulation;
}

.sky-legend {
  color: var(--text-soft);
  font-size: 0.95rem;
  padding: 8px 4px 2px;
}

/* Time machine */
.time-card {
  background: var(--bg-card);
  border: 2px dashed rgba(155, 140, 255, 0.5);
  border-radius: 22px;
  padding: 16px 20px;
  margin-top: 18px;
}

.time-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.time-label { font-weight: bold; }

.time-display {
  color: var(--accent);
  font-weight: bold;
  font-size: 1.1rem;
}

#time-slider {
  width: 100%;
  accent-color: var(--accent);
  height: 28px;
}

.time-hints {
  display: flex;
  justify-content: space-between;
  color: var(--text-soft);
  font-size: 0.85rem;
}

/* Planet chips */
.chip-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  -webkit-overflow-scrolling: touch;
}

.sky-chip {
  font-family: inherit;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.07);
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  color: var(--text);
  padding: 10px 14px;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 96px;
  transition: transform 0.12s, border-color 0.12s;
}

.sky-chip:hover { transform: scale(1.05); border-color: var(--accent); }
.sky-chip.up { border-color: rgba(76, 175, 120, 0.7); }
.sky-chip .chip-emoji { font-size: 1.7rem; }
.sky-chip .chip-name { font-weight: bold; font-size: 0.95rem; }
.sky-chip .chip-dir { font-size: 0.78rem; color: var(--text-soft); }
.sky-chip.up .chip-dir { color: #7fdbab; }

/* APOD */
.apod-card { text-align: center; }
.apod-card img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 22px;
  border: 2px solid rgba(255, 255, 255, 0.18);
}
.apod-title { color: var(--text-soft); margin-top: 8px; font-size: 1rem; }

.sky-credit {
  color: rgba(195, 201, 236, 0.55);
  font-size: 0.8rem;
  margin-top: 10px;
}

/* ===== Detail bottom sheet ===== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
}

.detail-sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(680px, 100%);
  max-height: 82vh;
  overflow-y: auto;
  background: #141938;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-bottom: none;
  border-radius: 26px 26px 0 0;
  padding: 10px 22px 30px;
  z-index: 50;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
}

.sheet-handle {
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
  margin: 4px auto 10px;
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sheet-emoji { font-size: 3rem; }
.sheet-head h2 { font-size: 1.6rem; }
.sheet-close { margin-left: auto; }

.sheet-status {
  background: rgba(255, 210, 63, 0.12);
  border: 1px solid rgba(255, 210, 63, 0.35);
  border-radius: 14px;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 1.05rem;
  line-height: 1.5;
}

.detail-sheet .speak-btn {
  margin: 2px 0 14px;
  padding: 12px 26px;
  font-size: 1.05rem;
}

.sheet-facts { gap: 10px; }
.sheet-facts .fact-box { padding: 10px 12px; }

.sheet-desc {
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 14px 0 0;
}

.nasa-live {
  margin-top: 14px;
  background: linear-gradient(135deg, rgba(11, 61, 145, 0.35), rgba(252, 61, 33, 0.12));
  border: 1px solid rgba(110, 160, 255, 0.4);
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 1rem;
  line-height: 1.5;
}

.nasa-live-head {
  font-weight: bold;
  color: #8ab6ff;
  font-size: 0.85rem;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.sheet-more {
  display: inline-block;
  margin-top: 16px;
  text-decoration: none;
  font-size: 1.05rem;
  padding: 12px 26px;
}

/* ===== AR view ===== */
.ar-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
}

body.ar-open { overflow: hidden; }

#ar-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#ar-canvas {
  position: absolute;
  inset: 0;
}

.ar-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.8rem;
  pointer-events: none;
}

.ar-pointing {
  position: absolute;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 14, 40, 0.8);
  border: 1px solid rgba(255, 210, 63, 0.5);
  color: var(--text);
  border-radius: 40px;
  padding: 8px 18px;
  font-size: 1rem;
  max-width: 90%;
  text-align: center;
  pointer-events: none;
}

.ar-tip {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 14, 40, 0.75);
  color: var(--text-soft);
  border-radius: 40px;
  padding: 8px 18px;
  font-size: 0.92rem;
  max-width: 92%;
  text-align: center;
  pointer-events: none;
}

.ar-close {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 30px;
}

@media (max-width: 600px) {
  .sky-topbar { flex-direction: column; align-items: stretch; text-align: center; }
  .ar-btn { width: 100%; }
}
