/* upload.css - 이미지 업로드 영역 스타일 */

/* 이미지 업로드 영역 */
.upload-section {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.upload-area {
    border-radius: 16px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-area.has-image {
    padding: 10px;
}

.upload-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.upload-area h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.upload-area p {
    color: #666;
    font-size: 0.9rem;
}

#imageInput {
    display: none;
}

#previewImage {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    display: none;
    margin: 0 auto;
}

#previewVideo {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    display: none;
    margin: 0 auto;
}

.image-info {
    margin-top: 10px;
    color: #666;
    font-size: 0.85rem;
    text-align: center;
}

/* 멀티 이미지 미리보기 - 새로운 순차 업로드 UX */
.uploaded-images-container {
    display: none;
    margin-top: 15px;
}

.uploaded-images-container.show {
    display: block;
}

/* 업로드된 이미지 리스트 (가로 스크롤) */
.uploaded-images-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* 각 이미지 카드 */
.image-card {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: cardPop 0.3s ease-out;
}

@keyframes cardPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-card .card-number {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3f 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.image-card .remove-btn,
.image-card .card-remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(196, 30, 58, 0.95);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.image-card .remove-btn:hover,
.image-card .card-remove-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* + 추가 버튼 */
.add-image-btn {
    width: 100px;
    height: 100px;
    border: 2px solid #ddd;
    border-radius: 12px;
    background: #f8f8f8;
    cursor: pointer;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s;
    animation: cardPop 0.3s ease-out;
}

.add-image-btn.show {
    display: flex;
}

.add-image-btn:hover {
    border-color: #c41e3a;
    background: #fff;
    transform: scale(1.05);
}

.add-image-btn:active {
    transform: scale(0.98);
}

.add-image-btn .add-icon {
    font-size: 2rem;
    color: #999;
}

.add-image-btn:hover .add-icon {
    color: #c41e3a;
}

.add-image-btn .add-text {
    font-size: 0.7rem;
    color: #c41e3a;
    font-weight: 600;
}

/* 업로드 액션 버튼 영역 */
.upload-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.upload-actions.column {
    flex-direction: column;
    align-items: center;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.action-btn.primary {
    background: linear-gradient(135deg, #c41e3a 0%, #a01830 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #2d5a3f 0%, #1a472a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(45, 90, 63, 0.3);
}

.action-btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 90, 63, 0.4);
}

.action-btn:active {
    transform: translateY(0);
}

/* 초기 업로드 선택 화면 */
.initial-upload-choice {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 280px;
    margin: 10px auto 0;
}

.choice-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 280px;
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.choice-btn.camera {
    background: linear-gradient(135deg, #c41e3a 0%, #a01830 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

.choice-btn.gallery {
    background: linear-gradient(135deg, #2d5a3f 0%, #1a472a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(45, 90, 63, 0.3);
}

.choice-btn:hover {
    transform: translateY(-3px);
}

.choice-btn:active {
    transform: translateY(0);
}

.choice-btn .btn-icon,
.choice-btn .choice-icon {
    font-size: 1.3rem;
}

/* 업로드 타입 선택 버튼 */
.upload-type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.upload-type-btn {
    padding: 10px 20px;
    border: 2px solid #c41e3a;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    color: #c41e3a;
}

.upload-type-btn.active {
    background: #c41e3a;
    color: white;
}

.upload-type-btn:hover:not(.active) {
    background: #fff0f0;
}

/* 분석 버튼 */
.analyze-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #c41e3a 0%, #a01830 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.5);
}

.analyze-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}
