/* components.css - 로딩, 토스트, 에러 메시지 등 공통 컴포넌트 */

/* 로딩 애니메이션 */
.loading {
    display: none;
    text-align: center;
    padding: 60px 20px;
    min-height: 200px;
}

.loading.show {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.loading-spinner::before {
    content: '🎁';
    font-size: 3.5rem;
    animation: giftBounce 1s ease-in-out infinite;
    display: block;
}

@keyframes giftBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-25px) scale(1.1);
    }
    50% {
        transform: translateY(0) scale(1);
    }
    75% {
        transform: translateY(-15px) scale(1.05);
    }
}

.loading p {
    color: #ffd700;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

/* Gemini 분석 결과 표시 영역 */
.loading-analysis {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px 0;
    max-width: 350px;
    width: 100%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.loading-analysis-title {
    color: #ffd700;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.loading-analysis-content {
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
    max-height: 150px;
    overflow-y: auto;
}

.loading-analysis-content::-webkit-scrollbar {
    width: 4px;
}

.loading-analysis-content::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.5);
    border-radius: 2px;
}

.loading-analysis-content strong {
    color: #ffd700;
    font-weight: 600;
}

/* 관찰 문장 개별 스타일 */
.observation-sentence {
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border-left: 3px solid #ffd700;
}

.observation-sentence:last-child {
    margin-bottom: 0;
}

.observation-sentence strong {
    display: inline-block;
    min-width: 20px;
    margin-right: 6px;
}

/* 진행률 표시 */
.progress-container {
    width: 100%;
    max-width: 300px;
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
    background-size: 200% 100%;
    border-radius: 12px;
    transition: width 0.3s ease;
    animation: shimmer 2s linear infinite;
    width: 0%;
}

@keyframes shimmer {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

.progress-text {
    text-align: center;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 복사 완료 토스트 */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 에러 메시지 */
.error-message {
    background: #ffe6e6;
    color: #c41e3a;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    display: none;
    font-size: 0.9rem;
}

.error-message.show {
    display: block;
}
