/* ---------- SPOTIFY NOW PLAYING ---------- */
.np-body { padding: 8px; background: #141a22; }
.np {
  display: flex; gap: 9px; align-items: center;
}
.np-art {
  flex: 0 0 auto; width: 48px; height: 48px;
  background: #0c1408 center/cover no-repeat;
  border: 1px solid #2a3a22; image-rendering: auto;
  display: grid; place-items: center; color: #3a5a2a; font-size: 16px;
}
.np-info { flex: 1 1 auto; min-width: 0; }
.np-title {
  font-family: "Courier New", monospace; font-size: 11px; font-weight: bold; color: #6fe66f;
  white-space: nowrap; overflow: hidden;
}
.np-title .scroll { display: inline-block; }
.np-title.is-long .scroll { animation: npscroll 9s linear infinite; }
@keyframes npscroll { 0%,12%{transform:translateX(0)} 100%{transform:translateX(-100%)} }
.np-artist {
  font-family: "Courier New", monospace; font-size: 10px; color: #cfe2a0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px;
}
.np-state {
  display: flex; align-items: center; gap: 5px; font-size: 9px; color: #8fbf6a; margin-top: 3px;
  text-transform: uppercase; letter-spacing: .4px;
}
.np-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b6ff7a, #5fa015 60%, #3a6b08);
  animation: npblink 1.4s ease-in-out infinite;
}
.np-dot.off { background: #5a6675; animation: none; }
@keyframes npblink { 0%,100%{opacity:1} 50%{opacity:.4} }
/* progress bar */
.np-prog { height: 5px; background: #0c1408; border: 1px solid #2a3a22; margin-top: 7px; padding: 1px; }
.np-prog-fill {
  height: 100%; width: 0%;
  background: linear-gradient(to bottom, #b6ff7a, #5fa015);
  transition: width 1s linear;
}
.np-times {
  display: flex; justify-content: space-between;
  font-family: "Courier New", monospace; font-size: 9px; color: #6f8f4f; margin-top: 3px;
}
.np a { color: inherit; text-decoration: none; }
.np a:hover { text-decoration: underline; }

/* ---------- SPACE WIDGET ---------- */
.space-body { padding: 0; background: #fff; }

/* NASA Astronomy Picture of the Day */
.apod { display: block; text-decoration: none; color: inherit; }
.apod:hover { text-decoration: none; }
.apod-img {
  width: 100%; height: 122px;
  background: #0a1024 center/cover no-repeat;
  border-bottom: 1px solid #2c63a4;
  display: grid; place-items: center;
}
.apod-img.apod-empty {
  font-size: 30px;
  background: linear-gradient(to bottom, #0c1838, #0a1024);
}
.apod-cap {
  background: linear-gradient(to bottom, #0c1838, #0a1024);
  padding: 7px 10px; border-bottom: 1px solid #2c63a4;
}
.apod-label {
  font-family: Arial, sans-serif; font-size: 9px; font-weight: bold; letter-spacing: .5px;
  text-transform: uppercase; color: #9fc0ee;
}
.apod-title {
  font-family: Georgia, serif; font-size: 12px; font-weight: bold; color: #fff;
  line-height: 1.25; margin-top: 2px;
}
.apod:hover .apod-title { color: #ffd86a; }
.space-iss {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 10px; font-size: 10px; color: var(--ink);
}
.space-iss .sat { font-size: 14px; animation: orbit 4s linear infinite; }
@keyframes orbit { 0%,100%{transform:translateX(0)} 50%{transform:translateX(3px)} }
.space-iss b { color: var(--module-deep); }

@media (prefers-reduced-motion: reduce) {
  .np-title.is-long .scroll, .np-dot, .space-iss .sat { animation: none !important; }
}