* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Vue v-cloak: 防止未编译模板闪烁 */
[v-cloak] {
    display: none;
}

body {
    font-family: "SimSun", "宋体", "Arial", "Helvetica", sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 头部标题 */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: #2d3748;
}

.header h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a202c;
}

.header p {
    font-size: 15px;
    color: #718096;
}

/* 上传区域 */
.upload-area {
    background: white;
    border-radius: 8px;
    padding: 50px 20px;
    text-align: center;
    border: 2px dashed #cbd5e0;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 配置面板 */
.config-panel {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.config-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-item label {
    font-size: 14px;
    color: #2d3748;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.config-item select,
.config-item input[type="number"] {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    color: #2d3748;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.config-item select {
    min-width: 120px; /* 设置最小宽度，避免选项长度不一导致布局抖动 */
}

.config-item select:hover,
.config-item input[type="number"]:hover {
    border-color: #3182ce;
}

.config-item select:focus,
.config-item input[type="number"]:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.config-item input[type="number"] {
    width: 80px;
}

.config-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3182ce;
}

/* 滑块样式 */
.config-item input[type="range"] {
    width: 120px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
}

.config-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #3182ce;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.config-item input[type="range"]::-webkit-slider-thumb:hover {
    background: #2c5282;
}

.config-item input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #3182ce;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease;
}

.config-item input[type="range"]::-moz-range-thumb:hover {
    background: #2c5282;
}

.config-item .strength-value {
    display: inline-block;
    min-width: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #3182ce;
}

/* 警告横幅样式 */
.warning-banner {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 4px solid #ff9800;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.1);
}

.warning-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.warning-content {
    flex: 1;
    font-size: 13px;
    line-height: 1.6;
    color: #856404;
}

.warning-content strong {
    color: #ff6b00;
    font-weight: 600;
}

.upload-area:hover {
    border-color: #3182ce;
    background: #f7fafc;
}

.upload-area.dragover {
    border-color: #3182ce;
    background: #ebf8ff;
    border-style: solid;
}

.upload-area input[type="file"] {
    display: none;
}

.upload-text {
    font-size: 16px;
    color: #2d3748;
    margin-bottom: 8px;
    font-weight: 500;
}

.upload-hint {
    font-size: 13px;
    color: #a0aec0;
}

/* 图片网格 */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.image-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.image-preview {
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    position: relative;
    overflow: hidden;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-preview .loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #667eea;
    font-size: 14px;
}

.image-info {
    padding: 16px;
}

.image-name {
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-actions {
    display: flex;
    gap: 8px;
}

.btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-regenerate {
    background: #edf2f7;
    color: #4a5568;
}

.btn-regenerate:hover {
    background: #e2e8f0;
}

.btn-download {
    background: #667eea;
    color: white;
}

.btn-download:hover {
    background: #5568d3;
}

/* 底部操作栏 */
.action-bar {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.action-bar .btn {
    padding: 11px 28px;
    font-size: 15px;
}

.btn-primary {
    background: #3182ce;
    color: white;
}

.btn-primary:hover {
    background: #2c5282;
}

.btn-success {
    background: #38a169;
    color: white;
}

.btn-success:hover {
    background: #2f855a;
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

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

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid #48bb78;
}

.toast.error {
    border-left: 4px solid #f56565;
}

.toast.info {
    border-left: 4px solid #4299e1;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.empty-state-text {
    font-size: 15px;
    color: #718096;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 28px;
    }

    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .action-bar {
        flex-direction: column;
    }

    .action-bar .btn {
        width: 100%;
    }
}

/* Loading动画 */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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