/* 轉換後圖片容器樣式 */
.transformed-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 轉換後圖片樣式 */
.transformed-image {
    max-width: 300px;
    max-height: 300px;
    object-fit: contain;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 20px auto;
}

/* 選中的圖片樣式 */
.transformed-image.selected {
    border-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* 圖片懸停效果 */
.transformed-image:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

/* 確保原始預覽圖片也有合適的大小 */
#original-preview {
    max-width: 300px;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin: 20px auto;
}

/* 預覽容器樣式 */
#preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 載入動畫樣式 */
.loading-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* 載入文字樣式 */
.loading-text {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    color: #4CAF50;
}

/* 隱藏元素 */
.hidden {
    display: none !important;
}

/* 在小屏幕上調整圖片大小 */
@media (max-width: 768px) {
    .transformed-image, #original-preview {
        max-width: 250px;
        max-height: 250px;
    }
}

/* 在更小的屏幕上進一步調整 */
@media (max-width: 480px) {
    .transformed-image, #original-preview {
        max-width: 200px;
        max-height: 200px;
    }
}

/* 燈箱樣式 */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border: 2px solid white;
    border-radius: 4px;
}

/* 下載按鈕樣式 */
.download-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.download-btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.download-btn i {
    margin-right: 8px;
}
