/* 진행률 트래커 UI - 메인 컨테이너용 (플로팅 제거됨) */
#result #progressContainer {
    display: none;
    /* position: fixed 제거 - 메인 컨테이너 안에 정적 배치 */
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 30px;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    #result #progressContainer {
        margin: 10px;
        padding: 20px;
    }
}

/* 진행률 헤더 */
.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.close-progress {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-progress:hover {
    background: #f0f0f0;
    color: #333;
}

/* 진행률 바 */
.progress-bar-container {
    margin-bottom: 20px;
}

.progress {
    height: 30px;
    border-radius: 8px;
    background: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
}

/* 단계 인디케이터 */
.phase-indicators {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.phase-indicator {
    flex: 1;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s;
}

.phase-indicator .phase-number {
    font-size: 1.2rem;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.phase-indicator .phase-status {
    font-size: 0.8rem;
    color: #6c757d;
}

/* 단계 상태별 스타일 */
.phase-indicator.phase-completed {
    background: #d4edda;
    border: 2px solid #28a745;
}

.phase-indicator.phase-completed .phase-number {
    color: #28a745;
}

.phase-indicator.phase-active {
    background: #fff3cd;
    border: 2px solid #ffc107;
    animation: pulse 2s infinite;
}

.phase-indicator.phase-active .phase-number {
    color: #ffc107;
}

.phase-indicator.phase-waiting {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 통계 정보 */
.progress-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.stat-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

/* 시간 정보 */
.time-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px;
    background: #e7f3ff;
    border-radius: 8px;
}

.time-item {
    text-align: center;
}

.time-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 3px;
}

.time-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0066cc;
}

/* 최근 검색 목록 */
.recent-searches {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.recent-searches-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 10px;
}

.recent-search-item {
    display: flex;
    align-items: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.recent-icon {
    color: #28a745;
    margin-right: 8px;
    font-weight: 700;
}

.recent-dong {
    font-weight: 600;
    color: #333;
}

.recent-region {
    color: #6c757d;
    margin-left: 5px;
}

.recent-count {
    margin-left: auto;
    color: #0066cc;
    font-weight: 600;
}

.no-recent {
    text-align: center;
    color: #6c757d;
    padding: 10px;
    font-size: 0.9rem;
}

/* 페이지네이션 UI */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.pagination-info-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
}

.pagination-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pagination-controls button {
    padding: 5px 12px;
}

.current-page-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: #333;
}

#pageInput {
    text-align: center;
}

/* 모바일 페이지네이션 */
@media (max-width: 768px) {
    .pagination-wrapper {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-controls button {
        padding: 4px 8px;
        font-size: 0.85rem;
    }
    
    .current-page-info {
        font-size: 0.9rem;
    }
    
    #pageInput {
        width: 60px !important;
    }
}

/* 단계 대기 메시지 */
.phase-delay-message {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #FF8A3D 0%, #FF6F0F 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(255, 111, 15, 0.3);
    animation: fadeInSlideUp 0.5s ease-out;
}

.delay-icon {
    text-align: center;
    font-size: 3rem;
    color: white;
    margin-bottom: 15px;
    animation: pulse 2s ease-in-out infinite;
}

.delay-content {
    text-align: center;
}

.delay-title {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.delay-description {
    margin: 0 0 15px 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.delay-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.delay-spinner .spinner-border {
    width: 2rem;
    height: 2rem;
}

/* 애니메이션 */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .phase-delay-message {
        padding: 15px;
    }
    
    .delay-icon {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .delay-title {
        font-size: 1rem;
    }
    
    .delay-description {
        font-size: 0.85rem;
    }
}

