/* Blazor Loading Spinner Styles */

/* 로딩 스피너 컨테이너 */
#app-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* 로딩 컨테이너 */
.loading-container {
    text-align: center;
    animation: pulse 1.5s ease-in-out infinite;
}

/* 로딩 텍스트 스타일 */
.loading-container p {
    color: #0056b3;
    font-weight: 500;
    font-size: 1.1rem;
    margin-top: 1rem;
    font-family: 'Noto Sans KR', sans-serif;
}

/* 스피너 커스터마이징 */
.spinner-border {
    border-width: 0.3rem;
    animation: spinner-border 0.75s linear infinite;
}

/* 로고 추가 (옵션) */
.loading-logo {
    width: 120px;
    height: auto;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* 펄스 애니메이션 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Blazor 연결 후 애니메이션 */
.blazor-connected #app-loading {
    opacity: 0;
    pointer-events: none;
}

/* Hero 섹션 애니메이션 - Blazor 연결 후에만 실행 */
body:not(.blazor-connected) .hero-title,
body:not(.blazor-connected) .hero-subtitle,
body:not(.blazor-connected) .hero-description {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

body.blazor-connected .hero-title {
    animation: fadeInUp 1s ease forwards;
}

body.blazor-connected .hero-subtitle {
    animation: fadeInUp 1s ease 0.2s forwards;
}

body.blazor-connected .hero-description {
    animation: fadeInUp 1s ease 0.4s forwards;
}

/* 초기 상태 숨김 */
body.blazor-connected .hero-title,
body.blazor-connected .hero-subtitle,
body.blazor-connected .hero-description {
    opacity: 0;
    animation-fill-mode: forwards;
}

/* 프로그레스 바 (옵션) */
.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(0, 86, 179, 0.2);
    border-radius: 2px;
    margin: 1rem auto;
    overflow: hidden;
}

.loading-progress-bar {
    width: 30%;
    height: 100%;
    background: #0056b3;
    border-radius: 2px;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% {
        width: 0%;
        margin-left: 0;
    }
    50% {
        width: 70%;
        margin-left: 0;
    }
    100% {
        width: 100%;
        margin-left: 100%;
    }
}

/* Blazor 기본 재연결 UI 완전 숨김 */
#components-reconnect-modal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 다크 모드 지원 (옵션) */
@media (prefers-color-scheme: dark) {
    #app-loading {
        background: linear-gradient(135deg, #1a1b3a 0%, #2d2d5f 100%);
    }
    
    .loading-container p {
        color: #7cabf7;
    }
    
    .loading-progress {
        background: rgba(124, 171, 247, 0.2);
    }
    
    .loading-progress-bar {
        background: #7cabf7;
    }
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .loading-container p {
        font-size: 1rem;
        padding: 0 20px;
    }
    
    .spinner-border {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
}
