/* Космос: планети, дошка підказок, карта Сонячної системи, ефекти */
/* planets (CSS) */
.pl { width: 70px; height: 70px; border-radius: 50%; position: relative; flex: none; box-shadow: inset -10px -8px 16px rgba(0,0,0,.45); }
.pl.sm { width: 46px; height: 46px; }
.pl.moon { background: radial-gradient(circle at 35% 35%, #e8e8e8, #9c9c9c); }
.pl.mercury { background: radial-gradient(circle at 35% 35%, #c9b8a6, #7d6a5a); }
.pl.venus { background: radial-gradient(circle at 35% 35%, #ffe6a6, #d9a441); }
.pl.earth { background: radial-gradient(circle at 35% 35%, #8fd3ff, #2a6fd1 60%, #2c8f4a); }
.pl.mars { background: radial-gradient(circle at 35% 35%, #ff9a6b, #b2401d); }
.pl.jupiter { background: repeating-linear-gradient(0deg, #f3dcb5 0 8px, #d29b64 8px 13px, #efe0c8 13px 19px); }
.pl.saturn { background: radial-gradient(circle at 35% 35%, #fbe9b9, #c9a45a); }
.pl.saturn::after { content: ""; position: absolute; left: -16px; right: -16px; top: 42%; height: 16%; border-radius: 50%; border: 4px solid #e8d39a; transform: rotate(-14deg); }
.pl.uranus { background: radial-gradient(circle at 35% 35%, #d8fbff, #6fd0d9); }
.pl.neptune { background: radial-gradient(circle at 35% 35%, #8fb4ff, #2b4bc4); }

/* stars */
.sky { background: radial-gradient(ellipse at 50% 120%, #1c2a66, #070a1d 70%); border-radius: 22px; position: relative; overflow: hidden; }

/* board */
#board .panel { width: 1460px; height: 830px; padding: 26px 34px; display: flex; flex-direction: column; }
#board h2 { margin: 0 0 4px; font-size: 40px; color: #ffe9a8; }
#board .instr { font-size: 28px; color: #eaf1ff; min-height: 40px; margin-bottom: 10px; }
#board .instr b { color: #ffcf4a; }
#board .cols { display: flex; gap: 26px; flex: 1; min-height: 0; }
#board .clues { width: 520px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
#board .clue { font-size: 23px; line-height: 1.3; background: rgba(255,255,255,.07); border-radius: 14px; padding: 10px 14px; border-left: 6px solid #5fb3ff; }
#board .clue.new { border-left-color: #ffcf4a; background: rgba(255,207,74,.15); animation: pop .4s; }
#board .clue.empty { color: #8796bd; border-left-color: #3a4a80; }
#board .places { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.place { position: relative; background: rgba(255,255,255,.07); border: 3px solid rgba(160,200,255,.4); border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 26px; font-weight: 800; cursor: default; }
#board.pick .place:not(.out) { cursor: pointer; }
#board.pick .place:not(.out):hover { border-color: #ffcf4a; }
.place .why { font-size: 18px; font-weight: 600; color: #ffb3b3; min-height: 22px; text-align: center; padding: 0 6px; }
.place.out .pl { opacity: .45; }
.place.out > div:nth-child(2) { color: #9aa6c8; }
.plw { position: relative; }
.plw .x { position: absolute; inset: -8px; pointer-events: none; background:
  linear-gradient(45deg, transparent 45%, #ff5d5d 45%, #ff5d5d 55%, transparent 55%),
  linear-gradient(-45deg, transparent 45%, #ff5d5d 45%, #ff5d5d 55%, transparent 55%); }
.place.cross-anim .x { animation: pop .4s; }

#board .bfoot { display: flex; justify-content: flex-end; margin-top: 14px; gap: 16px; align-items: center; }
#board .bfoot .fb { flex: 1; font-size: 28px; font-weight: 800; color: #ff8f8f; }

/* ненав'язливі зорі на панелях */
.panel::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .9;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.9) 0 1.2px, transparent 2px),
    radial-gradient(circle at 67% 71%, rgba(255,255,255,.7) 0 1px, transparent 1.8px),
    radial-gradient(circle at 42% 58%, rgba(255,240,200,.8) 0 1.4px, transparent 2.2px),
    radial-gradient(circle at 83% 14%, rgba(200,220,255,.8) 0 1px, transparent 1.8px),
    radial-gradient(circle at 8% 84%, rgba(255,255,255,.6) 0 .9px, transparent 1.6px),
    radial-gradient(ellipse at 88% 92%, rgba(140,90,220,.22), transparent 45%),
    radial-gradient(ellipse at 6% 4%, rgba(70,140,255,.18), transparent 40%);
  background-size: 230px 190px, 170px 260px, 310px 240px, 270px 150px, 140px 210px, 100% 100%, 100% 100%;
}
.panel > * { position: relative; }

/* сяйво хвоста комети (кінець уроку 1) */
.glow { position: absolute; inset: 0; z-index: 24; pointer-events: none; opacity: 0; transition: opacity 1.5s ease;
  background:
    radial-gradient(circle at 22% 30%, rgba(255,255,255,.95) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 22%, rgba(255,255,255,.9) 0 2px, transparent 3px),
    radial-gradient(circle at 55% 70%, rgba(255,246,210,.95) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 85% 60%, rgba(255,255,255,.85) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 35% 80%, rgba(255,255,255,.85) 0 1.5px, transparent 2.5px),
    radial-gradient(ellipse at 40% 45%, rgba(255,244,214,.97), rgba(240,214,160,.92) 32%, rgba(150,160,230,.9) 68%, rgba(60,70,150,.95) 100%);
  background-size: 180px 160px, 230px 210px, 260px 190px, 150px 230px, 200px 170px, 100% 100%; }
.glow.on { opacity: 1; }
#endcard .t1, #endcard .t2 { text-shadow: 0 3px 18px rgba(10,14,50,.9), 0 0 4px rgba(10,14,50,.8); }

/* карта Сонячної системи */
#map { z-index: 45; background: radial-gradient(ellipse at 30% 50%, #18245e, #070a1f 75%); cursor: pointer; }
#map::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .9;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.9) 0 1.2px, transparent 2px),
    radial-gradient(circle at 67% 71%, rgba(255,255,255,.7) 0 1px, transparent 1.8px),
    radial-gradient(circle at 42% 58%, rgba(255,240,200,.8) 0 1.4px, transparent 2.2px),
    radial-gradient(circle at 83% 14%, rgba(200,220,255,.8) 0 1px, transparent 1.8px);
  background-size: 230px 190px, 170px 260px, 310px 240px, 270px 150px; }
#map svg { position: absolute; inset: 0; }
#map .mtitle { position: absolute; top: 34px; left: 0; right: 0; text-align: center; font-size: 46px; font-weight: 900; color: #ffe9a8; text-shadow: 0 4px 20px rgba(0,0,0,.7); }
#map .msub { position: absolute; top: 100px; left: 220px; right: 220px; text-align: center; font-size: 28px; color: #d6e4ff; line-height: 1.35; text-shadow: 0 2px 10px rgba(0,0,0,.8); }
#map .mnote { position: absolute; left: 30px; bottom: 26px; font-size: 20px; color: #8796bd; }
#map .mlabel { position: absolute; left: 30px; top: 30px; font-size: 22px; font-weight: 800; color: #9fb6e8; letter-spacing: 1px; text-transform: uppercase; }
#map .mnext { position: absolute; right: 40px; bottom: 34px; }
.mring { animation: mring 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes mring { 50% { transform: scale(1.25); opacity: .4; } }
#map .mtxt { paint-order: stroke; stroke: rgba(7,10,31,.85); stroke-width: 5px; stroke-linejoin: round; }
#map .mnote b { color: #ff6b6b; display: inline-block; width: 24px; height: 24px; border: 2.5px solid #ff6b6b; border-radius: 50%; background: #1a1f45; text-align: center; line-height: 20px; font-size: 14px; vertical-align: 1px; }

/* зліт ракети */
.launchbox { position: absolute; z-index: 3; }
.launchbox img { position: relative; display: block; height: 100%; width: auto; }
.launchbox .flame { position: absolute; left: 50%; top: 84%; width: 46%; height: 34%; transform: translateX(-50%) scaleY(0); transform-origin: 50% 0;
  background: radial-gradient(ellipse at 50% 15%, #fffbe0 0 18%, #ffd34a 38%, #ff8a1a 62%, rgba(255,80,0,0) 72%);
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%; transition: transform .5s ease-out; }
.launchbox .flame.on { transform: translateX(-50%) scaleY(1); animation: flick .12s ease-in-out infinite alternate; }
@keyframes flick { from { filter: brightness(1); height: 34%; } to { filter: brightness(1.25); height: 40%; } }
.launchbox.rumble { animation: rumble .09s linear infinite; }
@keyframes rumble { 0% { translate: 0 0; } 25% { translate: -3px 1px; } 50% { translate: 2px -1px; } 75% { translate: -1px 2px; } 100% { translate: 3px 0; } }
.smoke { position: absolute; z-index: 2; border-radius: 50%; background: radial-gradient(circle, rgba(245,245,250,.95), rgba(220,225,235,.75) 55%, rgba(220,225,235,0) 72%);
  animation: smoke 1.8s ease-out both; }
@keyframes smoke { from { transform: scale(.2); opacity: 0; } 30% { opacity: 1; } to { transform: translate(var(--dx), -30px) scale(1.5); opacity: .85; } }
.smoke.dust { background: radial-gradient(circle, rgba(236,170,130,.9), rgba(214,130,90,.65) 55%, rgba(214,130,90,0) 72%); }
.pointer-ring { animation: pring 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pring { 50% { transform: scale(1.3); opacity: .35; } }

.meteor { position: absolute; width: 220px; height: 3px; background: linear-gradient(90deg, rgba(255,255,255,0), #fff); border-radius: 3px; transform: rotate(150deg); opacity: 0; animation: meteor 2.6s linear infinite; }
@keyframes meteor { 0% { opacity: 0; transform: rotate(150deg) translateX(-200px); } 10% { opacity: 1; } 60% { opacity: 0; transform: rotate(150deg) translateX(700px); } 100% { opacity: 0; } }
