/* Space for Kids — shared stylesheet (dark space theme, kid-friendly, mobile-first) */
* { box-sizing: border-box; }
:root {
  --bg: #0a0e27; --bg2: #101736; --card: #1a2247; --card2: #232c5c;
  --text: #f4f6f9; --muted: #a9b8ca; --gold: #ffd166; --cyan: #4cc9f0;
  --pink: #f72585; --green: #06d6a0; --blue: #3478f6; --border: #2a3a52;
}
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: "Nunito", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: var(--text); line-height: 1.75; font-size: 1.05rem;
  background:
    radial-gradient(1px 1px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 68%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 48% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 64% 38%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 72%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 88%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 85%, #fff 50%, transparent 51%),
    linear-gradient(180deg, #070a1d 0%, var(--bg) 40%, #0d1233 100%);
  background-attachment: fixed;
}
h1, h2, h3 { font-family: "Fredoka", "Trebuchet MS", "Segoe UI", sans-serif; line-height: 1.3; }
h1 { font-size: 2.1rem; margin: 0 0 .5rem; color: #fff; }
h2 { font-size: 1.5rem; color: var(--gold); margin: 2rem 0 .6rem; }
h3 { font-size: 1.2rem; color: var(--cyan); margin: 1.4rem 0 .4rem; }
p { margin: 0 0 1rem; }
a { color: var(--cyan); }
img { max-width: 100%; height: auto; border-radius: 14px; }
.container { max-width: 860px; margin: 0 auto; padding: 0 1rem; }
.lead { font-size: 1.2rem; color: #e8ecf5; }

/* Header + nav */
.site-header { background: rgba(7, 10, 29, .92); border-bottom: 1px solid var(--border); padding: 1rem 0 .6rem; position: sticky; top: 0; z-index: 10; }
.site-title { font-family: "Fredoka", sans-serif; font-size: 1.6rem; font-weight: 700; color: #fff; text-decoration: none; display: block; text-align: center; margin-bottom: .5rem; }
.site-title span { color: var(--gold); }
.main-nav { display: flex; flex-wrap: wrap; gap: .35rem .6rem; justify-content: center; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 700; padding: .25rem .55rem; border-radius: 999px; border: 1px solid transparent; }
.main-nav a:hover { color: #fff; border-color: var(--border); background: var(--card); }
.main-nav a.current { color: var(--bg); background: var(--gold); }

/* Hero image + figures */
.hero-img { width: 100%; border-radius: 16px; margin: 1.2rem 0; box-shadow: 0 8px 32px rgba(0,0,0,.5); }
figure { margin: 1.2rem 0; }
figcaption { color: var(--muted); font-size: .9rem; text-align: center; margin-top: .4rem; }

/* Fact boxes, tables, glossary */
.wow-box { background: #2b2103; border: 2px solid var(--gold); border-radius: 14px; padding: 1rem 1.2rem; margin: 1.4rem 0; }
.wow-box strong { color: var(--gold); }
.fact-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem; background: var(--card); border-radius: 12px; overflow: hidden; font-size: .98rem; }
.fact-table th, .fact-table td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--border); }
.fact-table th { background: var(--card2); color: var(--gold); width: 42%; }
.fact-table tr:last-child th, .fact-table tr:last-child td { border-bottom: 0; }
.glossary { background: var(--card); border-inline-start: 4px solid var(--cyan); border-radius: 10px; padding: .8rem 1.1rem; margin: 1.4rem 0; }
.glossary strong { color: var(--cyan); }
.check { background: var(--card); border: 1px dashed var(--green); border-radius: 12px; padding: 1rem 1.2rem; margin: 1.4rem 0; }
.check strong { color: var(--green); }
ul.fun-list { padding-inline-start: 1.2rem; }
ul.fun-list li { margin-bottom: .5rem; }

/* Videos */
.video { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 14px; margin: 1.2rem 0; background: #000; }
.video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.video-cap { color: var(--muted); font-size: .9rem; text-align: center; margin: -.5rem 0 1.4rem; }

/* Homepage planet cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.planet-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.1rem; text-decoration: none; color: var(--text); display: block; }
.planet-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.planet-card h3 { margin: 0 0 .3rem; color: #fff; }
.planet-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.planet-card .emoji { font-size: 2rem; }

/* Related links */
.related { margin: 2rem 0; }
.related h2 { font-size: 1.25rem; }
.related ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.related a { display: inline-block; background: var(--card); border: 1px solid var(--border); color: var(--text); text-decoration: none; padding: .45rem .9rem; border-radius: 999px; font-size: .95rem; }
.related a:hover { border-color: var(--cyan); color: #fff; }

/* Quiz */
.quiz-q { background: var(--card); border-radius: 14px; padding: 1rem 1.2rem; margin: 1.2rem 0; }
.quiz-q h3 { margin-top: 0; }
.quiz-q button { display: block; width: 100%; text-align: left; margin: .4rem 0; padding: .65rem .9rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg2); color: var(--text); font: inherit; font-size: 1rem; cursor: pointer; }
.quiz-q button:hover { border-color: var(--cyan); }
.quiz-q button.correct { background: #0a3d2e; border-color: var(--green); }
.quiz-q button.wrong { background: #4d1020; border-color: var(--pink); }
.quiz-q .answer { font-weight: 700; margin-top: .5rem; display: none; }
.quiz-score { font-size: 1.3rem; font-weight: 700; color: var(--gold); text-align: center; margin: 1.5rem 0; }

/* Book promo (same pattern as the other network sites) */
.hr-books-promo{display:flex;gap:1.25rem;align-items:center;background:#101722;border:1px solid #2a3a52;border-inline-start:4px solid #c9a227;border-radius:14px;padding:1.1rem 1.25rem;margin:2rem auto;max-width:860px;color:#f4f6f9;font-family:inherit}
.hr-books-promo__cover{width:92px;height:138px;object-fit:cover;border-radius:8px;flex:none;box-shadow:0 4px 16px rgba(0,0,0,.45)}
.hr-books-promo__body{min-width:0}
.hr-books-promo__badge{display:inline-block;font-size:.8rem;font-weight:700;color:#101722;background:#c9a227;border-radius:999px;padding:.15rem .7rem;margin-bottom:.5rem}
.hr-books-promo__title{font-size:1.15rem;line-height:1.5;margin:0 0 .35rem;color:#fff}
.hr-books-promo__text{font-size:.95rem;line-height:1.7;margin:0 0 .8rem;color:#a9b8ca}
.hr-books-promo__cta{display:inline-block;background:#3478f6;color:#fff !important;text-decoration:none;font-weight:700;font-size:.95rem;padding:.6rem 1.3rem;border-radius:999px}
.hr-books-promo__cta:hover{background:#2a63d6}
@media(max-width:560px){.hr-books-promo{flex-direction:column;text-align:center}.hr-books-promo__cover{width:110px;height:165px}}

/* Footer */
footer { text-align: center; color: var(--muted); font-size: .9rem; padding: 1.6rem 1rem 2.2rem; border-top: 1px solid var(--border); margin-top: 1rem; }
footer a { color: var(--muted); }
footer nav { margin-bottom: .8rem; }
footer nav a { margin: 0 .4rem; }

@media(max-width:600px){
  h1 { font-size: 1.7rem; }
  body { font-size: 1rem; }
  .site-title { font-size: 1.35rem; }
  .fact-table th { width: 45%; }
}
