/**
 * Lustro Public Studio CSS - Full Featured
 * 
 * @package Lustro
 * @version 3.0.0
 */

/* =================== VARIABLES =================== */
:root {
    --lustro-primary: #6C3FF5;
    --lustro-primary-dark: #5832c7;
    --lustro-primary-light: #8B6FF7;
    --lustro-secondary: #10B981;
    --lustro-dark: #1A365D;
    --lustro-gray: #6B7280;
    --lustro-gray-light: #9CA3AF;
    --lustro-light: #F3F4F6;
    --lustro-lighter: #F9FAFB;
    --lustro-border: #E5E7EB;
    --lustro-white: #FFFFFF;
    --lustro-success: #10B981;
    --lustro-error: #EF4444;
    --lustro-warning: #F59E0B;
    --lustro-radius: 12px;
    --lustro-radius-sm: 8px;
    --lustro-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --lustro-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --lustro-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* =================== CONTAINER =================== */
.lustro-public-studio {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* =================== TOP BAR =================== */
.lustro-studio-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: var(--lustro-white);
    border-radius: var(--lustro-radius);
    box-shadow: var(--lustro-shadow);
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.lustro-credits-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: var(--lustro-dark);
}

.lustro-credits-icon {
    font-size: 24px;
}

.lustro-credits-count {
    font-weight: 700;
    font-size: 20px;
    color: var(--lustro-primary);
}

.lustro-credits-label {
    color: var(--lustro-gray);
}

.lustro-auth-buttons,
.lustro-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.lustro-auth-text {
    color: var(--lustro-gray);
    font-size: 14px;
}

/* =================== BUTTONS =================== */
.lustro-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--lustro-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    line-height: 1.4;
}

.lustro-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.lustro-btn-primary {
    background: var(--lustro-primary);
    color: var(--lustro-white) !important;
}

.lustro-btn-primary:hover:not(:disabled) {
    background: var(--lustro-primary-dark);
    color: var(--lustro-white) !important;
}

.lustro-btn-secondary {
    background: var(--lustro-light);
    color: var(--lustro-dark) !important;
}

.lustro-btn-secondary:hover:not(:disabled) {
    background: var(--lustro-border);
    color: var(--lustro-dark) !important;
}

.lustro-btn-google {
    background: var(--lustro-white);
    color: var(--lustro-dark) !important;
    border: 1px solid var(--lustro-border);
}

.lustro-btn-signup {
    background: var(--lustro-secondary);
    color: var(--lustro-white) !important;
}

.lustro-btn-login {
    background: transparent;
    color: var(--lustro-primary) !important;
    border: 1px solid var(--lustro-primary);
}

.lustro-btn-login:hover {
    background: var(--lustro-primary);
    color: var(--lustro-white) !important;
}

.lustro-btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

.lustro-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background: var(--lustro-light);
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.lustro-btn-icon:hover {
    background: var(--lustro-border);
}

/* =================== UPLOAD AREA =================== */
.lustro-studio-upload {
    background: var(--lustro-white);
    border: 2px dashed var(--lustro-border);
    border-radius: var(--lustro-radius);
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.lustro-studio-upload:hover,
.lustro-studio-upload.dragover {
    border-color: var(--lustro-primary);
    background: rgba(108, 63, 245, 0.02);
}

/* Compact dropzone when images are in queue */
.lustro-studio-upload.lustro-dropzone-compact {
    padding: 20px;
    margin-bottom: 20px;
}

.lustro-studio-upload.lustro-dropzone-compact .lustro-upload-icon {
    font-size: 32px;
}

.lustro-studio-upload.lustro-dropzone-compact .lustro-dropzone-content h3 {
    font-size: 16px;
}

.lustro-studio-upload.lustro-dropzone-compact .lustro-dropzone-content p,
.lustro-studio-upload.lustro-dropzone-compact .lustro-upload-hint {
    display: none;
}

.lustro-studio-upload.lustro-dropzone-compact .lustro-dropzone-content {
    flex-direction: row;
    gap: 15px;
}

.lustro-studio-upload.lustro-dropzone-compact .lustro-btn {
    padding: 8px 16px;
    font-size: 13px;
}

.lustro-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.lustro-upload-icon {
    font-size: 64px;
    line-height: 1;
}

.lustro-dropzone-content h3 {
    margin: 0;
    font-size: 24px;
    color: var(--lustro-dark);
}

.lustro-dropzone-content p {
    margin: 0;
    color: var(--lustro-gray);
}

.lustro-upload-hint {
    font-size: 13px !important;
    color: var(--lustro-gray-light) !important;
}

/* =================== IMAGE QUEUE =================== */
.lustro-studio-queue {
    background: var(--lustro-white);
    border-radius: var(--lustro-radius);
    padding: 25px;
    margin-top: 25px;
    box-shadow: var(--lustro-shadow);
}

.lustro-studio-queue h3 {
    margin: 0 0 15px;
    font-size: 18px;
    color: var(--lustro-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lustro-select-all-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--lustro-border);
}

.lustro-select-all-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--lustro-gray);
}

.lustro-queue-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 100%;
}

.lustro-queue-item {
    position: relative;
    border-radius: var(--lustro-radius);
    overflow: hidden;
    background: var(--lustro-light);
    border: 2px solid transparent;
    transition: all 0.2s;
    max-width: 100%;
    min-width: 0; /* Prevent grid blowout */
}

.lustro-queue-item:hover {
    border-color: var(--lustro-primary-light);
}

.lustro-queue-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
    max-width: 100%;
}

.lustro-queue-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 100%;
}

.lustro-select-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
}

.lustro-select-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.lustro-queue-item-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    padding: 0;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lustro-queue-item:hover .lustro-queue-item-remove {
    opacity: 1;
}

.lustro-queue-item-remove:hover {
    background: var(--lustro-error);
}

.lustro-item-name {
    padding: 8px 10px;
    font-size: 12px;
    color: var(--lustro-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--lustro-white);
}

/* Processing overlay */
.lustro-processing-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 54, 93, 0.92); /* Dark navy blue - professional */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 3;
}

.lustro-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(201, 162, 39, 0.3); /* Gold tint */
    border-top-color: #C9A227; /* Gold spinner top */
    border-radius: 50%;
    animation: lustro-spin 1s linear infinite;
}

.lustro-percent {
    color: #E5C158; /* Light gold */
    font-weight: 700;
    font-size: 16px;
}

.lustro-cancel-btn {
    background: rgba(201, 162, 39, 0.2);
    color: #E5C158;
    border: 1px solid rgba(201, 162, 39, 0.5);
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 5px;
}

.lustro-cancel-btn:hover {
    background: rgba(201, 162, 39, 0.3);
}

/* Cancelled status */
.lustro-queue-item.cancelled .lustro-queue-thumb {
    opacity: 0.5;
}

.lustro-cancelled-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--lustro-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    z-index: 3;
}

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

/* Progress bar */
.lustro-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--lustro-border);
}

.lustro-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #C9A227, #E5C158); /* Gold gradient */
    transition: width 0.3s ease;
}

/* Queue item info (ID and label under image) */
.lustro-item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: var(--lustro-lighter);
    border-top: 1px solid var(--lustro-border);
    font-size: 12px;
}

.lustro-item-id {
    font-weight: 700;
    color: #C9A227; /* Gold - matches Lukian theme */
    font-family: monospace;
}

.lustro-item-label {
    color: var(--lustro-gray);
    font-style: italic;
}

/* Status badges */
.lustro-completed-badge,
.lustro-error-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    z-index: 3;
}

.lustro-completed-badge {
    background: var(--lustro-success);
}

.lustro-error-badge {
    background: var(--lustro-error);
}

.lustro-queue-item.completed .lustro-queue-thumb {
    opacity: 0.7;
}

.lustro-queue-item.error .lustro-queue-thumb {
    opacity: 0.5;
}

/* =================== ENHANCEMENT OPTIONS =================== */
.lustro-studio-options {
    background: var(--lustro-white);
    border-radius: var(--lustro-radius);
    padding: 25px;
    margin-top: 25px;
    box-shadow: var(--lustro-shadow);
}

.lustro-studio-options h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: var(--lustro-dark);
}

.lustro-enhancement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.lustro-enhancement-card {
    cursor: pointer;
}

.lustro-enhancement-card input {
    display: none;
}

.lustro-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 12px;
    background: var(--lustro-lighter);
    border: 2px solid var(--lustro-border);
    border-radius: var(--lustro-radius-sm);
    transition: all 0.2s ease;
    text-align: center;
    min-height: 100px;
}

.lustro-enhancement-card input:checked + .lustro-card-content {
    border-color: var(--lustro-primary);
    background: rgba(108, 63, 245, 0.08);
    box-shadow: 0 0 0 3px rgba(108, 63, 245, 0.1);
}

.lustro-card-content:hover {
    border-color: var(--lustro-primary-light);
}

.lustro-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.lustro-card-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--lustro-dark);
    margin-bottom: 4px;
}

.lustro-card-desc {
    font-size: 11px;
    color: var(--lustro-gray);
    line-height: 1.3;
}

/* =================== ACCORDION =================== */
.lukian-accordion {
    margin-bottom: 10px;
    border-radius: var(--lustro-radius-sm);
    overflow: hidden;
    border: 1px solid var(--lustro-border);
}

.lukian-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--lustro-lighter);
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--lustro-dark);
    transition: all 0.2s;
    text-align: left;
}

.lukian-accordion-header:hover {
    background: var(--lustro-light);
}

.lukian-accordion-header.active {
    background: linear-gradient(135deg, var(--lustro-primary), var(--lustro-secondary));
    color: white;
}

.lukian-accordion-icon {
    font-size: 20px;
}

.lukian-accordion-title {
    flex: 1;
}

.lukian-accordion-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.lukian-accordion-header.active .lukian-accordion-arrow {
    transform: rotate(0deg);
}

.lukian-accordion-header:not(.active) .lukian-accordion-arrow {
    transform: rotate(-90deg);
}

.lukian-accordion-content {
    display: none;
    padding: 15px;
    background: var(--lustro-white);
}

.lukian-accordion-content.active {
    display: block;
}

.lukian-accordion-content .lustro-enhancement-grid {
    margin: 0;
}

/* Smaller cards in accordion */
.lukian-accordion-content .lustro-enhancement-card .lustro-card-content {
    padding: 12px 8px;
}

.lukian-accordion-content .lustro-card-icon {
    font-size: 22px;
    margin-bottom: 6px;
}

.lukian-accordion-content .lustro-card-title {
    font-size: 11px;
}

/* =================== RESULTS =================== */
.lustro-studio-results {
    background: var(--lustro-white);
    border-radius: var(--lustro-radius);
    padding: 25px;
    margin-top: 25px;
    box-shadow: var(--lustro-shadow);
}

.lustro-studio-results h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: var(--lustro-dark);
}

.lustro-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 25px;
}

.lustro-result-item {
    background: var(--lustro-lighter);
    border-radius: var(--lustro-radius-sm);
    overflow: hidden;
    box-shadow: var(--lustro-shadow);
}

/* Comparison Slider */
.lustro-result-comparison {
    position: relative;
}

.lustro-comparison-slider {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: ew-resize;
}

.lustro-comparison-before,
.lustro-comparison-after {
    position: absolute;
    inset: 0;
}

.lustro-comparison-before {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

.lustro-comparison-after {
    z-index: 1;
}

.lustro-comparison-before img,
.lustro-comparison-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lustro-comparison-label {
    position: absolute;
    bottom: 10px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.lustro-comparison-before .lustro-comparison-label {
    left: 10px;
}

.lustro-comparison-after .lustro-comparison-label {
    right: 10px;
}

.lustro-comparison-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    margin-left: -2px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: ew-resize;
}

.lustro-handle-line {
    flex: 1;
    width: 2px;
    background: white;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

.lustro-handle-circle {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--lustro-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.lustro-result-actions {
    display: flex;
    gap: 10px;
    padding: 15px;
}

.lustro-result-actions .lustro-btn {
    flex: 1;
    font-size: 13px;
    padding: 10px 12px;
}

.lustro-results-cta {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--lustro-border);
}

/* =================== HISTORY =================== */
.lustro-studio-history {
    background: var(--lustro-white);
    border-radius: var(--lustro-radius);
    padding: 25px;
    margin-top: 25px;
    box-shadow: var(--lustro-shadow);
}

.lustro-studio-history h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: var(--lustro-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lustro-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom scrollbar for history */
.lustro-history-grid::-webkit-scrollbar {
    width: 8px;
}

.lustro-history-grid::-webkit-scrollbar-track {
    background: var(--lustro-lighter);
    border-radius: 4px;
}

.lustro-history-grid::-webkit-scrollbar-thumb {
    background: var(--lustro-gray-light);
    border-radius: 4px;
}

.lustro-history-grid::-webkit-scrollbar-thumb:hover {
    background: var(--lustro-gray);
}

.lustro-history-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--lustro-lighter);
    border-radius: var(--lustro-radius-sm);
    transition: all 0.2s;
}

.lustro-history-item:hover {
    background: var(--lustro-light);
}

.lustro-history-thumb {
    width: 100px;
    height: 75px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.lustro-history-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lustro-history-info {
    flex: 1;
    min-width: 0;
}

.lustro-history-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--lustro-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.lustro-history-date {
    display: block;
    font-size: 12px;
    color: var(--lustro-gray);
}

.lustro-history-photo-id {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--lustro-primary);
    font-family: monospace;
    margin-bottom: 2px;
}

.lustro-history-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    flex-shrink: 0;
}

/* =================== FEEDBACK FORM =================== */
.lustro-studio-feedback {
    background: var(--lustro-white);
    border-radius: var(--lustro-radius);
    padding: 25px;
    margin-top: 25px;
    box-shadow: var(--lustro-shadow);
}

.lustro-studio-feedback h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: var(--lustro-dark);
}

.lustro-feedback-form {
    max-width: 500px;
}

.lustro-feedback-row {
    margin-bottom: 15px;
}

.lustro-feedback-row label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--lustro-dark);
    margin-bottom: 6px;
}

.lustro-input,
.lustro-select,
.lustro-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--lustro-border);
    border-radius: var(--lustro-radius-sm);
    background: var(--lustro-white);
    color: var(--lustro-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lustro-input:focus,
.lustro-select:focus,
.lustro-textarea:focus {
    outline: none;
    border-color: var(--lustro-primary);
    box-shadow: 0 0 0 3px rgba(108, 63, 245, 0.1);
}

.lustro-textarea {
    resize: vertical;
    min-height: 80px;
}

.lustro-feedback-refund {
    padding: 12px;
    background: var(--lustro-lighter);
    border-radius: var(--lustro-radius-sm);
    border: 1px solid var(--lustro-border);
}

.lustro-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--lustro-dark);
}

.lustro-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* =================== MODAL =================== */
.lustro-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: lustro-fade-in 0.2s ease;
}

@keyframes lustro-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lustro-modal-content {
    background: var(--lustro-white);
    border-radius: var(--lustro-radius);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: var(--lustro-shadow-xl);
    animation: lustro-modal-in 0.3s ease;
}

@keyframes lustro-modal-in {
    from { 
        opacity: 0;
        transform: scale(0.95);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.lustro-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
    padding: 0;
}

.lustro-modal-close:hover {
    background: rgba(0,0,0,0.7);
}

.lustro-preview-modal {
    width: 900px;
    max-width: 90vw;
}

.lustro-preview-container {
    position: relative;
}

.lustro-preview-tabs {
    display: flex;
    background: var(--lustro-white);
    border-bottom: 1px solid var(--lustro-border);
    padding: 0 10px;
}

.lustro-preview-tab {
    flex: 1;
    padding: 14px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--lustro-gray);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -1px;
}

.lustro-preview-tab:hover {
    color: var(--lustro-primary);
    background: var(--lustro-lighter);
}

.lustro-preview-tab.active {
    color: var(--lustro-primary);
    border-bottom-color: var(--lustro-primary);
    background: var(--lustro-white);
}

.lustro-preview-views {
    position: relative;
    background: var(--lustro-dark);
}

.lustro-preview-view {
    display: none;
}

.lustro-preview-view.active {
    display: block;
}

.lustro-preview-view img {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    margin: 0 auto;
}

/* Fullscreen comparison */
.lustro-fullscreen-comparison {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: ew-resize;
    background: var(--lustro-dark);
}

.lustro-fs-before,
.lustro-fs-after {
    position: relative;
    width: 100%;
}

.lustro-fs-after {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.lustro-fs-before {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

.lustro-fs-before img,
.lustro-fs-after img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Container needs to match image height */
.lustro-view-compare {
    position: relative;
}

.lustro-view-compare .lustro-fullscreen-comparison {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lustro-view-compare .lustro-fs-after {
    position: relative;
}

.lustro-view-compare .lustro-fs-before {
    position: absolute;
    inset: 0;
}

.lustro-fs-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    margin-left: -2px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: ew-resize;
}

.lustro-fs-handle-line {
    flex: 1;
    width: 2px;
    background: white;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

.lustro-fs-handle-circle {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--lustro-dark);
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.lustro-modal-actions {
    padding: 20px;
    background: var(--lustro-lighter);
    border-top: 1px solid var(--lustro-border);
    display: flex;
    justify-content: center;
}

/* =================== NO CREDITS MESSAGE =================== */
.lustro-no-credits-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--lustro-radius);
    padding: 50px 40px;
    text-align: center;
}

.lustro-no-credits-message h3 {
    margin: 0 0 15px;
    font-size: 28px;
}

.lustro-no-credits-message p {
    margin: 0 0 30px;
    font-size: 16px;
    opacity: 0.9;
}

.lustro-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.lustro-no-credits-message .lustro-btn-primary {
    background: white;
    color: var(--lustro-primary) !important;
}

.lustro-no-credits-message .lustro-btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white !important;
    border: 1px solid rgba(255,255,255,0.3);
}

/* =================== TOAST NOTIFICATIONS =================== */
.lustro-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    background: var(--lustro-dark);
    color: white;
    border-radius: var(--lustro-radius-sm);
    box-shadow: var(--lustro-shadow-lg);
    z-index: 999999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.lustro-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.lustro-toast.success {
    background: var(--lustro-success);
}

.lustro-toast.error {
    background: var(--lustro-error);
}

.lustro-toast.warning {
    background: var(--lustro-warning);
}

/* =================== RESPONSIVE =================== */
@media (max-width: 768px) {
    /* Prevent any horizontal overflow */
    .lustro-public-studio,
    .lustro-studio-content,
    .lustro-controls-section,
    .lk-preview-section {
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .lustro-studio-topbar {
        flex-direction: column;
        text-align: center;
    }
    
    .lustro-auth-buttons {
        justify-content: center;
    }
    
    .lustro-enhancement-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lustro-results-grid {
        grid-template-columns: 1fr;
    }
    
    .lustro-history-grid {
        grid-template-columns: 1fr;
    }
    
    .lustro-results-cta {
        flex-direction: column;
    }
    
    .lustro-cta-buttons {
        flex-direction: column;
    }
    
    .lustro-preview-modal {
        width: 100%;
        max-height: 95vh;
    }
    
    .lustro-preview-tabs {
        flex-wrap: wrap;
    }
    
    .lustro-preview-tab {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    /* CRITICAL: Force queue items to fit container */
    .lustro-queue-items {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    
    .lustro-queue-item {
        max-width: 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box;
    }
    
    .lustro-queue-thumb {
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    
    .lustro-queue-thumb img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
        display: block;
    }
    
    /* Results grid mobile */
    .lustro-result-item {
        max-width: 100%;
        overflow: hidden;
    }
    
    .lustro-result-image {
        max-width: 100%;
    }
    
    .lustro-result-image img {
        max-width: 100%;
        height: auto;
    }
    
    /* Result actions - smaller on tablet */
    .lustro-result-actions {
        gap: 8px;
        padding: 12px;
        flex-wrap: wrap;
    }
    
    .lustro-result-actions .lustro-btn {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    /* Upload zone tablet */
    .lustro-studio-upload {
        padding: 30px 20px;
    }
    
    .lustro-dropzone-content h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    /* Extra constraints for very small screens */
    .lustro-public-studio {
        padding: 10px 6px;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    /* ===== UPLOAD ZONE MOBILE ===== */
    .lustro-studio-upload {
        padding: 20px 12px;
    }
    
    .lustro-upload-icon {
        font-size: 36px;
    }
    
    .lustro-dropzone-content {
        gap: 10px;
    }
    
    .lustro-dropzone-content h3 {
        font-size: 15px;
        text-align: center;
    }
    
    .lustro-dropzone-content p {
        font-size: 12px;
        text-align: center;
    }
    
    .lustro-upload-hint {
        font-size: 11px !important;
    }
    
    /* Upload buttons - stack vertically */
    .lustro-dropzone-content .lustro-btn,
    .lk-upload-btn,
    #lustro-browse-btn {
        padding: 8px 14px !important;
        font-size: 12px !important;
        min-width: auto !important;
    }
    
    /* ===== ENHANCEMENT GRID MOBILE ===== */
    .lustro-enhancement-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .lustro-card-content {
        padding: 10px 6px;
        min-height: 70px;
    }
    
    .lustro-card-icon {
        font-size: 22px;
    }
    
    .lustro-card-title {
        font-size: 10px;
    }
    
    .lustro-card-desc {
        font-size: 9px;
    }
    
    /* ===== QUEUE ITEMS MOBILE ===== */
    .lustro-queue-items {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px !important;
    }
    
    .lustro-queue-item,
    .lustro-result-item {
        max-width: 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    
    .lustro-queue-thumb,
    .lustro-result-image {
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    
    .lustro-queue-thumb img,
    .lustro-result-image img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
        display: block;
    }
    
    /* ===== RESULT ACTIONS MOBILE - 2x2 Grid ===== */
    .lustro-results-grid {
        grid-template-columns: 1fr;
    }
    
    .lustro-result-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        padding: 10px !important;
        flex-direction: unset !important;
    }
    
    .lustro-result-actions .lustro-btn {
        flex: unset !important;
        width: 100% !important;
        font-size: 11px !important;
        padding: 8px 6px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Make download button span full width */
    .lustro-result-actions .lustro-download-btn {
        grid-column: 1 / -1;
    }
    
    .lustro-toast {
        left: 10px;
        right: 10px;
        bottom: 10px;
        font-size: 13px;
    }
    
    /* Compact dropzone when images in queue */
    .lustro-studio-upload.lustro-dropzone-compact {
        padding: 15px 10px;
    }
    
    .lustro-studio-upload.lustro-dropzone-compact .lustro-upload-icon {
        font-size: 28px;
    }
    
    .lustro-studio-upload.lustro-dropzone-compact .lustro-dropzone-content h3 {
        font-size: 13px;
    }
}

/* =================== CUSTOM EDIT SECTION =================== */
.lukian-custom-prompt-section {
    padding: 10px 0;
}

.lukian-custom-prompt-help {
    color: var(--lustro-gray);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.custom-prompt-card {
    margin-bottom: 15px;
}

.lukian-custom-prompt-wrapper {
    background: var(--lustro-lighter);
    border-radius: var(--lustro-radius);
    padding: 20px;
    margin-top: 15px;
    border: 2px solid var(--lustro-border);
    transition: border-color 0.3s ease;
}

.lukian-custom-prompt-wrapper:focus-within {
    border-color: var(--lustro-primary);
}

.lukian-custom-prompt-input {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--lustro-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    min-height: 100px;
    background: var(--lustro-white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lukian-custom-prompt-input:focus {
    outline: none;
    border-color: var(--lustro-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.lukian-custom-prompt-input::placeholder {
    color: var(--lustro-gray-light);
    font-style: italic;
}

.lukian-custom-prompt-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.lukian-char-count {
    font-size: 12px;
    color: var(--lustro-gray);
    padding: 4px 8px;
    background: var(--lustro-white);
    border-radius: 4px;
}

.lukian-prompt-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lukian-preset-btn {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--lustro-white);
    border: 1px solid var(--lustro-border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--lustro-dark);
}

.lukian-preset-btn:hover {
    background: var(--lustro-primary);
    color: var(--lustro-white);
    border-color: var(--lustro-primary);
}

@media (max-width: 768px) {
    .lukian-custom-prompt-footer {
        flex-direction: column;
    }
    
    .lukian-prompt-presets {
        width: 100%;
    }
    
    .lukian-preset-btn {
        flex: 1;
        text-align: center;
    }
}

.lustro-member-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.lustro-member-limit {
    font-size: 12px;
    color: #6b7280;
    margin-left: 5px;
}
