/* Background Generator Styles */

.background-output .image-container {
    border: none;
    margin: 0;
    padding: 0;
}

/* Size Preview - Visual aspect ratio preview */
.size-preview-wrap {
    margin: 15px 0 0;
    text-align: center;
    width: 100%;
}

.size-preview-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(106, 252, 255, 0.08), rgba(72, 101, 139, 0.15));
    border: 2px dashed rgba(106, 252, 255, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 50px;
    min-height: 30px;
    /* Default 16:9 aspect */
    width: 200px;
    height: 112px;
}

.size-preview-label {
    font-size: 0.85em;
    color: #6afcff;
    font-weight: 600;
    white-space: nowrap;
    padding: 5px;
    font-family: 'JetBrains Mono', monospace;
}

.size-preview-info {
    margin: 10px 0 0;
    font-size: 0.9em;
    color: #88aacc;
}

.size-preview-info span {
    color: #6afcff;
    font-weight: 500;
}

.size-preview-tip {
    margin: 6px 0 0;
    font-size: 0.8em;
    color: #6a8aaa;
    font-style: italic;
}


/* Custom Resolution Inputs */
.custom-resolution-wrap {
    background: rgba(72, 101, 139, 0.15);
    border: 1px solid rgba(106, 252, 255, 0.15);
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
}

.custom-res-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    justify-content: center;
}

.custom-res-field {
    flex: 1;
    max-width: 140px;
}

.custom-res-field label {
    display: block;
    font-size: 0.8em;
    color: #88aacc;
    margin-bottom: 5px;
}

.custom-res-field input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(106, 252, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 1em;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
}

.custom-res-field input:focus {
    outline: none;
    border-color: #6afcff;
    box-shadow: 0 0 0 2px rgba(106, 252, 255, 0.1);
}

.custom-res-x {
    font-size: 1.4em;
    color: #6afcff;
    padding-bottom: 8px;
}

.custom-res-note {
    text-align: center;
    font-size: 0.8em;
    color: #88aacc;
    margin: 10px 0 0 0;
}

/* Background preview styling */
.background-preview {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.background-preview img.background-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.background-preview:hover img.background-image {
    transform: scale(1.02);
}

/* Single view - larger preview */
.background-item.single-view .background-preview img.background-image {
    max-width: 100%;
    margin: 0 auto;
}

/* Browse view - grid friendly */
.background-item:not(.single-view) .background-preview {
    aspect-ratio: 16 / 9;
}

.background-item:not(.single-view) .background-preview img.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Processing indicator */
.processing-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #88aacc;
}

.processing-indicator .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(106, 252, 255, 0.2);
    border-top-color: #6afcff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No image placeholder */
.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    font-size: 3em;
    opacity: 0.3;
}

/* Remix reference section */
.remix-reference-section {
    background: rgba(72, 101, 139, 0.2);
    border: 1px solid #304f78;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.remix-reference-section h3 {
    margin-top: 0;
    color: #88aacc;
}

.remix-reference-section p {
    font-size: 0.95em;
    color: #c1d9ff;
    margin-bottom: 10px;
}

.remix-reference-section img {
    max-width: 300px;
    border-radius: 8px;
    border: 2px solid #48658b;
}

/* Style dropdown with previews */
.background-style-preview {
    width: 60px;
    height: 34px;
    border-radius: 4px;
    object-fit: cover;
}

/* LLM prompt section in single view */
.llm-prompt-section {
    margin-top: 15px;
    padding: 12px 15px;
    background: rgba(106, 252, 255, 0.05);
    border-left: 3px solid rgba(106, 252, 255, 0.3);
    border-radius: 0 8px 8px 0;
}

.llm-prompt-label {
    display: block;
    font-size: 0.75em;
    color: #6afcff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.llm-prompt-text {
    margin: 0;
    font-size: 0.9em;
    color: #b8d4e8;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .size-preview-box {
        max-width: 160px;
        max-height: 100px;
    }
    
    .size-preview-label {
        font-size: 0.75em;
    }
    
    .background-item:not(.single-view) .background-preview {
        aspect-ratio: 16 / 10;
    }
}

/* Dark theme enhancements */
.background-item .creation-prompt {
    font-size: 0.95em;
    color: #e0e8f5;
    margin-bottom: 10px;
}

.background-item .prompt-label {
    color: #6afcff;
    font-weight: 500;
}

/* Resolution group headers in dropdown */
.resolution-group-header {
    padding: 8px 12px;
    font-size: 0.75em;
    font-weight: 600;
    color: #6afcff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(106, 252, 255, 0.05);
    border-top: 1px solid rgba(106, 252, 255, 0.1);
    margin-top: 5px;
}

.resolution-group-header:first-child {
    margin-top: 0;
    border-top: none;
}

