/* 参数网格 */
.param-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

/* 上传区域 */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.file-upload { position: relative; width: 100%; }

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80px;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.2s;
    color: #718096;
    font-size: 0.9rem;
    text-align: center;
    padding: 10px;
}

.file-upload-label:hover {
    border-color: #667eea;
    background: #ebf4ff;
    color: #5a67d8;
}

.upload-icon { font-size: 1.5rem; margin-bottom: 4px; display: block; }

.file-upload input[type="file"] { 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    opacity: 0; cursor: pointer; 
}

.url-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.url-input-wrapper textarea {
    min-height: 40px;
    height: 40px;
    padding: 8px 12px;
}
.btn-url-load {
    width: 100%;
    padding: 6px;
    background: #e2e8f0;
    border: none;
    border-radius: 6px;
    color: #4a5568;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.btn-url-load.active {
    background: #667eea;
    color: white;
}

/* 图片预览 */
.image-preview-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}
.image-preview-container > div {
    position: relative;
    width: 60px;
    height: 60px;
}
.image-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
.delete-image-btn {
    position: absolute; top: -6px; right: -6px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #e53e3e; color: white;
    border: 2px solid white;
    font-size: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}

/* 操作栏 */
.action-bar {
    position: sticky;
    bottom: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px -10px rgba(102, 126, 234, 0.5);
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -10px rgba(102, 126, 234, 0.6);
}
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.mode-badge {
    text-align: center;
    font-size: 0.85rem;
    color: #718096;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 右侧结果区域 - 增加空状态 */
.result-body {
    min-height: 600px; /* 加高 */
    display: flex;
    flex-direction: column;
    position: relative;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 自适应填充，避免留白 */
    gap: 20px;
    flex-grow: 1;
    min-height: 300px;
}

/* 空状态样式 */
.empty-state {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #cbd5e0;
    pointer-events: none; /* 让点击穿透 */
}
.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    opacity: 0.5;
}
.empty-state p { font-size: 1.1rem; font-weight: 500; }

.generated-image {
    width: 100%;
    height: 100%; /* 撑满容器 */
    object-fit: cover; /* 保持比例裁剪填充 */
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    display: block;
}
.generated-image:hover { transform: scale(1.02); }

/* 结果中的分组容器 */
.result-prompt-info {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #4a5568;
    margin-bottom: 15px;
    border: 1px solid #edf2f7;
    word-break: break-all;
}

.btn-result-action {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}
.btn-result-action:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}
