        /* Стили модального окна */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.1);
            overflow: auto;
        }
        
        .modal-content {
            background-color: #fefefe;
            margin: 2% auto;
            padding: 20px;
            border: 1px solid #888;
            width: 90%;
            max-width: 900px;
            border-radius: 8px;
            position: relative;
        }
        
        .close-modal {
            position: absolute;
            right: 20px;
            top: 10px;
            font-size: 28px;
            font-weight: bold;
            color: #aaa;
            cursor: pointer;
        }

	h2 {
		text-align: center;
		margin: 0px;
	}

    .gallery-wrapper {
        max-width: 100%;
    }
	
    .gallery-container {
        max-width: 100%;
		height: 200px;
		display: flex;
    }
	
    .main-photo-container {
        padding: 5px;
        background: #f5f5f5;
        border-radius: 8px;
        text-align: center;
		width: 200px;
		height: 200px;
    }
	
    .main-photo {
        max-width: 100%;
        max-height: 150px;
        display: block;
        margin: 0 auto;
    }	
	
    .upload-form-container{
        margin: 10px 0;
        padding: 15px;
        background: #f5f5f5;
        border-radius: 8px;
        text-align: center;
		width: 100%;
    }
    .upload-form {
        margin: 5px 0;
        padding: 5px;
        background: #f0f0f0;
        border-radius: 8px;
    }
    
    .photos-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
        margin-top: 10px;
    }
    
    .photo-item {
        border: 1px solid #ddd;
        border-radius: 8px;
        overflow: hidden;
        position: relative;
		transition: transform 0.3s ease, opacity 0.3s ease;
    }

.photo-item.moving {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    z-index: 10;
}
 
    .photo-img {
        width: 100%;
        height: 100px;/**/
        object-fit: cover;
        display: block;
    }
    
    .photo-actions {
        padding: 10px;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    @media (max-width: 768px) {
        .photos-grid {
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        }
        
        .photo-img {
            height: 150px;
        }
    }
	/* анимация */
	.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}


/* Стили для галереи */
.photo-actions {
    display: flex;
    gap: 8px;
    padding: 8px;
    justify-content: center;
}

.main-badge {
    background: #4CAF50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
}

/* Стиль для главного фото */
.main-photo-item {
    border: 3px solid #4CAF50;
    position: relative;
}

.main-photo-item::after {
    content: 'Главное фото';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.main-badge {
    background: #4CAF50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}


.set-main-btn, .delete-btn {
    transition: opacity 0.3s ease;
}

.btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
}


.loading {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 18px;
}

.error {
    color: #d32f2f;
    padding: 10px;
    background: #ffebee;
    border-radius: 4px;
    margin-top: 10px;
}

.upload-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
}

.upload-status .success {
    color: #4CAF50;
}

.upload-status .error {
    color: #d32f2f;
}

.upload-status i {
    margin-right: 5px;
}


.main-photo-container-2 {
	position: fixed;
	bottom: 65px;
	left: 10px;
	width: 200px;
	height: 200px;
	border: 2px solid #333;
	padding: 10px;
	background: white;
	box-shadow: 0 0 10px rgba(0,0,0,0.5);
	z-index: 1000;
	/*display: none;*/
}
.main-photo-container-2-flex {
	display: flex;
	flex-direction: column;
    align-items: center;
}
.main-photo-2 {
	max-width: 100%;
	height: 160px;
}

.open-gallery-btn{
	background-color: aliceblue;
	border-radius: 30px;
	border: 2px solid #2f6690;/**/
	background: url(/tree/img/foto1.png) no-repeat  center;
	background-size: 80% 80%;
    position: absolute; 
	top: 60px; 
	left: 150px;
	height:54px; 
	width:54px;
	display:none;
	z-index: 1000;
	padding: 5px;
	cursor: pointer;
}

.open-gallery-btn-disabled{
	background-color: gray;
	border-radius: 30px;
	border: 2px solid gray;/**/
	background: url(/tree/img/nofoto1.png) no-repeat  center;
	background-size: 80% 80%;
    position: absolute; 
	top: 60px; 
	left: 150px;
	height:54px; 
	width:54px;
	display:none;
	z-index: 999;
	padding: 5px;
	cursor: pointer;
}