/* ============================================================
   Tab4 星迹·个人宇宙 - 晨昏流动天空
   ============================================================ */

.tab4-stars {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #b8a8d4 0%, #f4c5a8 60%, #f8d4b8 100%);
}

.tab4-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.7;
  mix-blend-mode: lighten;
}

/* 漂浮的星点层 */
.stars-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #fff8d8 0%, #f8d878 40%, #d8a858 70%, transparent 100%);
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  box-shadow:
    0 0 8px 2px rgba(255, 240, 200, 0.6),
    0 0 16px 4px rgba(255, 220, 180, 0.3);
  animation: star-twinkle 3s ease-in-out infinite;
  transition: transform 0.2s ease;
}

.star.big {
  width: 14px;
  height: 14px;
  background: radial-gradient(circle, #fff8d8 0%, #f8c878 50%, #d88058 80%, transparent 100%);
  box-shadow:
    0 0 12px 4px rgba(255, 220, 180, 0.8),
    0 0 28px 8px rgba(248, 200, 120, 0.4);
}

.star.huge {
  width: 22px;
  height: 22px;
  background: radial-gradient(circle, #ffffff 0%, #f8d488 40%, #e89878 80%, transparent 100%);
  box-shadow:
    0 0 16px 6px rgba(255, 230, 200, 0.9),
    0 0 36px 12px rgba(248, 200, 160, 0.4);
}

.star:active { transform: scale(0.8); }

@keyframes star-twinkle {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.15); }
}

/* 飘动云絮 */
.stars-clouds {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 35% 8% at 20% 25%, rgba(255, 255, 255, 0.4), transparent 70%),
    radial-gradient(ellipse 40% 10% at 75% 50%, rgba(255, 240, 240, 0.35), transparent 70%),
    radial-gradient(ellipse 30% 6% at 40% 80%, rgba(255, 220, 200, 0.4), transparent 70%);
  animation: cloud-drift 40s linear infinite;
}

@keyframes cloud-drift {
  0%   { transform: translateX(0); }
  100% { transform: translateX(40px); }
}

/* 流星（周期性划过） */
.shooting-star {
  position: absolute;
  top: 12%;
  left: 70%;
  width: 90px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 250, 230, 0) 0%, rgba(255, 250, 230, 0.9) 100%);
  border-radius: 2px;
  transform: rotate(-28deg);
  transform-origin: right center;
  opacity: 0;
  animation: shoot 9s ease-in infinite;
  pointer-events: none;
}
.shooting-star::before {
  content: '';
  position: absolute;
  left: -4px;
  top: -2.5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8e0 0%, #f8d878 60%, transparent 100%);
  box-shadow: 0 0 10px 2px rgba(255, 240, 200, 0.7);
}

@keyframes shoot {
  0%, 78%   { opacity: 0; transform: translate(0, 0) rotate(-28deg) scaleX(0.3); }
  82%       { opacity: 1; transform: translate(-40px, 24px) rotate(-28deg) scaleX(0.8); }
  90%       { opacity: 0; transform: translate(-120px, 70px) rotate(-28deg) scaleX(1); }
  91%, 100% { opacity: 0; }
}

/* 顶部文案 */
.tab4-stars::before {
  content: '✦  你一路走过的星星  ✦';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: bold;
  color: rgba(80, 50, 60, 0.7);
  letter-spacing: 2px;
  z-index: 3;
  pointer-events: none;
  white-space: nowrap;
}

/* 中心物件 */
.stars-objects {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sobj {
  position: absolute;
  background: rgba(255, 250, 240, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 3px solid rgba(180, 140, 160, 0.5);
  border-radius: var(--r-md);
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  pointer-events: auto;
  color: #5a4060;
  font-family: var(--font-body);
  box-shadow: 0 6px 18px rgba(120, 80, 100, 0.25);
  transition: all 0.2s ease;
  min-width: 70px;
}

.sobj:active { transform: scale(0.92); }

.sobj-icon {
  font-size: 30px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.sobj-name {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.sobj-nebula {
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  animation: nebula-float 6s ease-in-out infinite;
}
.sobj-nebula:active { transform: translateX(-50%) scale(0.92); }

.sobj-book {
  bottom: 14%;
  right: 8%;
  animation: gentle-float 5s ease-in-out infinite 1s;
}

@keyframes nebula-float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-10px); }
}
