.image-preview-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: .5rem;
    transition: box-shadow 0.3s;
    cursor: pointer;
}
.image-preview-wrapper:hover {
    box-shadow: 0 0 10px rgba(255,255,255,0.1);
}
.image-preview-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.image-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}
.image-preview-wrapper:hover .image-preview-overlay {
    opacity: 1;
}
.download-icon {
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
}
.file-size-comparison {
    font-size: 0.75rem;
    color: #ccc;
    margin-top: .5rem;
    display: block;
    white-space: nowrap;
}
.file-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
    margin-bottom: .3rem;
    padding-bottom: .2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    text-align: left;
    padding-left: .25rem;
}
#resetBtn {
    margin-left: 10px;
}

.image-saved-badge {
    position: absolute;
    top: .5rem;
    right: .5rem;
    background: #198754; /* verde bootstrap */
    color: white;
    padding: 2px 6px;
    font-size: 0.65rem; /* 👈 più piccola */
    border-radius: 4px;
    z-index: 2;
    font-weight: 600;
    opacity: 0.9;
}

@media (max-width: 768px) {
  #previewContainer {
    flex-wrap: nowrap;
    overflow-x: auto;
    display: flex;
  }
}

#customDropArea {
    background: #1e1e1e;
    border: 2px dashed #6c757d;
    transition: background 0.3s, border-color 0.3s, transform 0.2s;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#customDropArea:hover {
    background: #2c2c2c;
    border-color: #aaa;
    transform: scale(1.02);
}

#customDropArea i {
    color: #0dcaf0;
    transition: color 0.3s;
}

#customDropArea:hover i {
    color: #31d2f2;
}

#customDropArea p {
    font-size: 1.1rem;
    color: #ccc;
}

#imageInput {
    cursor: pointer;
}
