/* ============================================================
   Loaders & Decorative Components (loaders.jsx)
   ============================================================
   1. OrganicLoader  — 모핑 블롭 (size 의존 keyframe만 인라인 유지)
   2. GlobeLoader    — 회전 와이어프레임 globe
   3. CosmicScale    — 동심원 스캐너
   4. CalcKey        — 두께감 있는 계산기 키
   5. PulseBars      — 이퀄라이저 (LIVE / 미니 플레이어)
   6. Aurora         — 슬로우 드리프팅 백그라운드

   글로벌 keyframes (cp-pulse, cp-eq, cp-drift1~3, cp-globe-spin,
   cp-city-pulse, cp-cosmic-ring) → app.css에 정의.
   ============================================================ */

/* ----- 공용 squared loader 컨테이너 ----- */
.cp-loader-frame {
  position: relative;
}

/* ----- 1. OrganicLoader ----- */
.cp-organic__halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.cp-organic__blob {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
}
.cp-organic__core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: #fff;
}

/* ----- 2. GlobeLoader ----- */
.cp-globe__svg {
  display: block;
  overflow: visible;
}
.cp-globe__longs {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.cp-globe__longs-svg {
  display: block;
  position: absolute;
  inset: 0;
}
.cp-globe__city {
  position: absolute;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: #FF1077;
  box-shadow: 0 0 6px #FF1077;
}
.cp-globe__city-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid #FF1077;
}

/* ----- 3. CosmicScale ----- */
.cp-cosmic__svg { display: block; }
.cp-cosmic__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  animation: cp-cosmic-ring 2.4s ease-out infinite;
  will-change: transform, opacity;
  pointer-events: none;
}
.cp-cosmic__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.cp-cosmic__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}
.cp-cosmic__sublabel {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  margin-top: 2px;
}

/* ----- 4. CalcKey (계산기 버튼) ----- */
.cp-calc-key {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
  font-family: Pretendard, system-ui;
  font-weight: 700;
  transition:
    transform 80ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 80ms cubic-bezier(0.16, 1, 0.3, 1);
}
.cp-calc-key__shine {
  position: absolute;
  top: 1px;
  left: 8%;
  right: 8%;
  height: 40%;
  border-radius: 999px / 100%;
  pointer-events: none;
  opacity: 0.7;
}
.cp-calc-key__label {
  position: relative;
  z-index: 1;
}

/* ----- 5. PulseBars (이퀄라이저) ----- */
.cp-pulse-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
}
.cp-pulse-bars__bar {
  width: 2px;
  border-radius: 1px;
  height: 40%;
  animation-name: cp-eq;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

/* ----- 6. Aurora (배경 분위기) ----- */
.cp-aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.cp-aurora__blob {
  position: absolute;
  filter: blur(28px);
  will-change: transform;
}
.cp-aurora__blob--1 {
  width: 80%;
  height: 60%;
  top: -15%;
  left: -10%;
  background: radial-gradient(ellipse at center, rgba(255, 16, 119, 0.45), transparent 60%);
  animation: cp-drift1 18s ease-in-out infinite alternate;
}
.cp-aurora__blob--2 {
  width: 70%;
  height: 60%;
  bottom: -20%;
  right: -15%;
  background: radial-gradient(ellipse at center, rgba(31, 210, 255, 0.45), transparent 60%);
  animation: cp-drift2 22s ease-in-out infinite alternate;
}
.cp-aurora__blob--3 {
  width: 60%;
  height: 50%;
  top: 30%;
  right: -10%;
  background: radial-gradient(ellipse at center, rgba(123, 73, 255, 0.40), transparent 60%);
  animation: cp-drift3 26s ease-in-out infinite alternate;
}
