/* splash.css — 歲玥靜好 康復之家 交班系統
 * FR-100c：心跳脈動啟動畫面
 */

#splash {
  position: fixed;
  inset: 0;
  background: #f4e8d8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

#splash.hidden {
  opacity: 0;
  pointer-events: none;
}

.splash-logo-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.splash-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
}

/* 小愛心：rotate(45deg) + scale 脈動
 * 疊在 logo 中央（視覺上對應 logo 的心型圖案）
 */
.splash-heart {
  position: absolute;
  width: 28px;
  height: 28px;
  background: #c8584a;
  border-radius: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  animation: heartbeat 1.5s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.85;
}

.splash-heart::before,
.splash-heart::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  background: #c8584a;
  border-radius: 50%;
}

.splash-heart::before {
  left: -50%;
  top: 0;
}

.splash-heart::after {
  top: -50%;
  left: 0;
}

@keyframes heartbeat {
  0%   { transform: translate(-50%, -50%) rotate(45deg) scale(1.0); }
  30%  { transform: translate(-50%, -50%) rotate(45deg) scale(1.15); }
  60%  { transform: translate(-50%, -50%) rotate(45deg) scale(1.0); }
  80%  { transform: translate(-50%, -50%) rotate(45deg) scale(1.08); }
  100% { transform: translate(-50%, -50%) rotate(45deg) scale(1.0); }
}

.splash-name {
  font-family: "PingFang TC", "PingFang SC", -apple-system, BlinkMacSystemFont,
               "Microsoft JhengHei", "Noto Sans TC", "Segoe UI", Roboto, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #5a4a3a;
  letter-spacing: 3px;
  margin-bottom: 6px;
}

.splash-sub {
  font-family: "PingFang TC", "PingFang SC", -apple-system, BlinkMacSystemFont,
               "Microsoft JhengHei", "Noto Sans TC", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: #a89070;
  letter-spacing: 4px;
  /* 「用心 · 守候」 */
}

.splash-loading {
  margin-top: 32px;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(90, 113, 88, 0.2);
  border-top-color: #5a7158;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
