/* =====================================================================
   Signup Progress Loader — 회원가입 맞춤 혜택 준비 로더
   - 풀스크린, 불투명 배경 (뒷 화면 완전 차단)
   - 원형 프로그레스 + 5단계 체크리스트 + 문구 로테이션
   ===================================================================== */

#signupProgressLoader {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: linear-gradient(180deg, #F8FAFC 0%, #EEF6F8 100%);
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    color: #1a1a1a;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

#signupProgressLoader.spl-active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    animation: spl-fade-in 0.4s ease-out;
}

@keyframes spl-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---------- 전체 컨테이너 ---------- */
.spl-container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

/* ---------- 상단: 원형 프로그레스 ---------- */
.spl-ring-wrap {
    position: relative;
    width: 180px;
    height: 180px;
}

.spl-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.spl-ring-bg {
    fill: none;
    stroke: rgba(60, 141, 153, 0.1);
    stroke-width: 8;
}

.spl-ring-fill {
    fill: none;
    stroke: #3C8D99;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 534.07; /* 2 * PI * 85 */
    stroke-dashoffset: 534.07;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.spl-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.spl-percent {
    font-size: 42px;
    font-weight: 700;
    color: #3C8D99;
    line-height: 1;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}

.spl-percent-sub {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* 돌아가는 링(pulse) */
.spl-ring-wrap::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(60, 141, 153, 0.15);
    animation: spl-pulse 2.4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes spl-pulse {
    0%, 100% { transform: scale(1);    opacity: 0.55; }
    50%      { transform: scale(1.04); opacity: 0.15; }
}

/* ---------- 타이틀 & 메시지 ---------- */
.spl-title {
    text-align: center;
    font-size: 19px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -0.3px;
}

.spl-message {
    text-align: center;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.55;
    min-height: 44px;
    padding: 0 12px;
    transition: opacity 0.4s ease;
    font-weight: 500;
}

.spl-message.spl-fading {
    opacity: 0;
}

/* ---------- 5단계 체크리스트 ---------- */
.spl-steps {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.spl-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    color: #9ca3af;
    transition: color 0.3s ease;
}

.spl-step-icon {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.spl-step-label {
    flex: 1;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* 진행 중 단계 */
.spl-step.spl-step-current {
    color: #3C8D99;
}

.spl-step.spl-step-current .spl-step-icon {
    background: #ffffff;
    border-color: #3C8D99;
}

.spl-step.spl-step-current .spl-step-icon::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3C8D99;
    animation: spl-step-blink 1.2s ease-in-out infinite;
}

.spl-step.spl-step-current .spl-step-label {
    color: #1a1a1a;
    font-weight: 600;
}

@keyframes spl-step-blink {
    0%, 100% { opacity: 1;    transform: scale(1); }
    50%      { opacity: 0.4;  transform: scale(0.7); }
}

/* 완료 단계 */
.spl-step.spl-step-done {
    color: #3C8D99;
}

.spl-step.spl-step-done .spl-step-icon {
    background: #3C8D99;
    border-color: #3C8D99;
    animation: spl-step-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spl-step.spl-step-done .spl-step-icon::after {
    content: '';
    width: 10px;
    height: 6px;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(-45deg) translate(1px, -1px);
}

.spl-step.spl-step-done .spl-step-label {
    color: #3C8D99;
}

@keyframes spl-step-pop {
    0%   { transform: scale(0.6); }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* ---------- 라이브 스탯 바 ---------- */
.spl-live-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    opacity: 0;
    max-height: 0;
    transform: translateY(-6px);
    overflow: hidden;
    transition: opacity 0.5s ease, max-height 0.5s ease, transform 0.5s ease;
}

.spl-live-stats.visible {
    opacity: 1;
    max-height: 60px;
    transform: translateY(0);
    margin-top: -4px;
}

.spl-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 90px;
}

.spl-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #3C8D99;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    transition: transform 0.3s ease;
}

.spl-stat-label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
    letter-spacing: -0.2px;
}

.spl-stat-divider {
    width: 1px;
    height: 28px;
    background: #e5e7eb;
}

/* ---------- 하단 보조 텍스트 ---------- */
.spl-footnote {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    font-weight: 500;
    margin-top: 4px;
    letter-spacing: -0.2px;
}

/* ---------- 완료 상태 ---------- */
#signupProgressLoader.spl-complete .spl-title {
    color: #3C8D99;
}

#signupProgressLoader.spl-complete .spl-ring-fill {
    stroke: #3C8D99;
}

#signupProgressLoader.spl-complete .spl-ring-wrap::before {
    animation: none;
    border-color: rgba(60, 141, 153, 0.3);
}

/* ---------- 반응형 (작은 화면) ---------- */
@media (max-height: 680px) {
    #signupProgressLoader.spl-active { padding: 20px 20px; }
    .spl-container { gap: 20px; }
    .spl-ring-wrap { width: 150px; height: 150px; }
    .spl-percent { font-size: 36px; }
    .spl-steps { padding: 14px 18px; gap: 11px; }
    .spl-step { font-size: 13px; }
    .spl-title { font-size: 17px; }
    .spl-message { font-size: 13px; min-height: 40px; }
}
