/* Modal Styles */
.imagine-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.imagine-modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
    text-align: center;
}

.imagine-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 5px;
}

.imagine-close:hover,
.imagine-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Video and Image Styles */
#imagine-camera-feed,
#imagine-preview-image,
#imagine-result-image {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    background: #000;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Controls */
.imagine-controls {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.imagine-controls .button {
    margin: 0 5px;
}

/* Loading Spinner */
#imagine-loading {
    margin-top: 20px;
}

.imagine-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
