/* v0.31 · 食现象双视角：空间关系与从地球上看到的效果同步演示 */
.observer-view {
  --eclipse-strength: 0;
  position: absolute;
  z-index: 17;
  right: max(18px, env(safe-area-inset-right));
  top: 172px;
  width: min(330px, calc(100vw - 36px));
  overflow: hidden;
  border: 1px solid rgba(183, 222, 255, .3);
  border-radius: 28px;
  background: linear-gradient(155deg, rgba(16, 35, 72, .9), rgba(3, 8, 23, .94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .12);
  backdrop-filter: blur(22px) saturate(145%);
  transition: width .32s, height .32s, top .32s, right .32s, transform .32s;
}
.observer-view[hidden] { display: none; }
.observer-header {
  height: 48px;
  padding: 0 9px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.observer-title { display: flex; align-items: center; gap: 9px; font-size: 12px; letter-spacing: .06em; }
.observer-eye {
  position: relative;
  width: 25px;
  height: 15px;
  border: 2px solid #8eeaff;
  border-radius: 70% 20%;
  transform: rotate(45deg);
  box-shadow: 0 0 13px rgba(110, 231, 255, .36);
}
.observer-eye::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  left: 7px;
  top: 2px;
  border-radius: 50%;
  background: #ffe164;
  box-shadow: 0 0 8px #ffe164;
}
.observer-expand {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 13px;
  background: rgba(255, 255, 255, .07);
  cursor: pointer;
  font-size: 18px;
}
.observer-expand:active { transform: scale(.92); }
.observer-sky {
  position: relative;
  height: 205px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 48%, rgba(64, 93, 153, .19), transparent 42%), radial-gradient(circle at 20% 25%, #fff 0 1px, transparent 1.6px), radial-gradient(circle at 76% 69%, #bce6ff 0 1px, transparent 1.7px), radial-gradient(circle at 82% 24%, #fff 0 1px, transparent 1.5px), radial-gradient(circle at 30% 77%, #fff 0 1px, transparent 1.5px), #01040d;
  background-size: auto, 82px 82px, 119px 119px, 93px 93px, 137px 137px, auto;
}
.observer-solar-scene, .observer-lunar-scene { position: absolute; inset: 0; }
.observer-view[data-mode="solar-eclipse"] .observer-lunar-scene,
.observer-view[data-mode="lunar-eclipse"] .observer-solar-scene { display: none; }
.observer-corona, .observer-sun, .observer-solar-moon, .observer-lunar-moon, .observer-lunar-shadow {
  position: absolute;
  display: block;
  left: 50%;
  top: 50%;
  border-radius: 50%;
}
.observer-corona {
  width: 154px;
  height: 154px;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 240, 164, .96) 0 2deg, rgba(255, 165, 48, .2) 4deg 8deg, transparent 10deg 17deg);
  filter: blur(2px) drop-shadow(0 0 22px rgba(255, 172, 44, .94));
  animation: observerCorona 22s linear infinite;
}
.observer-sun {
  width: 104px;
  height: 104px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #fffbd3, #ffd85c 30%, #ff9b32 67%, #dc4925);
  box-shadow: 0 0 28px #ffbd41, 0 0 58px rgba(255, 126, 28, .65), inset -11px -12px 19px rgba(164, 38, 11, .35);
}
.observer-solar-moon {
  z-index: 2;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at 38% 31%, #273348, #070b14 62%, #000);
  box-shadow: inset 5px 5px 11px rgba(144, 174, 209, .15), 0 0 0 1px rgba(164, 197, 231, .12);
  will-change: transform;
}
.observer-lunar-moon {
  width: 118px;
  height: 118px;
  overflow: hidden;
  transform: translate(-50%, -50%);
  background: #dadde1 url('./textures/moon.webp') center/cover no-repeat;
  box-shadow: 0 0 28px rgba(215, 231, 255, .52), inset -13px -14px 22px rgba(35, 44, 63, .42);
  transition: filter .12s;
  will-change: filter;
}
.observer-lunar-shadow {
  z-index: 2;
  width: 126px;
  height: 126px;
  background: radial-gradient(circle at 38% 35%, rgba(105, 22, 15, .74), rgba(13, 7, 12, .93) 72%);
  box-shadow: 0 0 21px rgba(188, 55, 25, .38);
  will-change: transform, opacity;
}
.observer-view > p {
  height: 51px;
  margin: 0;
  padding: 14px 16px;
  color: rgba(236, 245, 255, .79);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.observer-view.is-expanded {
  position: fixed;
  z-index: 32;
  top: 50%;
  right: 50%;
  width: min(760px, calc(100vw - 24px));
  transform: translate(50%, -50%);
  border-radius: 36px;
}
.observer-view.is-expanded .observer-sky { height: min(60vh, 520px); }
.observer-view.is-expanded .observer-corona { width: 260px; height: 260px; }
.observer-view.is-expanded .observer-sun { width: 176px; height: 176px; }
.observer-view.is-expanded .observer-solar-moon { width: 170px; height: 170px; }
.observer-view.is-expanded .observer-lunar-moon { width: 210px; height: 210px; }
.observer-view.is-expanded .observer-lunar-shadow { width: 222px; height: 222px; }
.observer-expanded #space, .observer-expanded .aurora { filter: brightness(.38) blur(1px); }
@keyframes observerCorona { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (max-width: 720px) {
  .observer-view { top: 194px; right: 10px; width: 190px; border-radius: 22px; }
  .observer-header { height: 42px; padding-left: 12px; }
  .observer-title { font-size: 10px; }
  .observer-sky { height: 148px; }
  .observer-corona { width: 112px; height: 112px; }
  .observer-sun { width: 76px; height: 76px; }
  .observer-solar-moon { width: 73px; height: 73px; }
  .observer-lunar-moon { width: 84px; height: 84px; }
  .observer-lunar-shadow { width: 91px; height: 91px; }
  .observer-view > p { height: auto; min-height: 43px; padding: 11px 9px; font-size: 9px; }
  .observer-view.is-expanded { top: 50%; right: 50%; width: calc(100vw - 20px); border-radius: 27px; }
  .observer-view.is-expanded .observer-sky { height: 56vh; }
  .observer-view.is-expanded .observer-corona { width: 220px; height: 220px; }
  .observer-view.is-expanded .observer-sun { width: 150px; height: 150px; }
  .observer-view.is-expanded .observer-solar-moon { width: 146px; height: 146px; }
  .observer-view.is-expanded .observer-lunar-moon { width: 180px; height: 180px; }
  .observer-view.is-expanded .observer-lunar-shadow { width: 190px; height: 190px; }
}
