/* 电商详情文案生成器样式文件 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* 主内容区域 */
.main-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 输入区域样式 */
.input-section {
    padding: 30px;
    border-bottom: 1px solid #e1e5e9;
}

.input-group {
    margin-bottom: 30px;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2c3e50;
}

.product-text-input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
    font-family: inherit;
}

.product-text-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 图片上传区域样式 */
.image-upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.image-upload-area:hover,
.image-upload-area.dragover {
    border-color: #007bff;
    background: #e3f2fd;
}

.upload-placeholder {
    color: #64748b;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.7;
}

.upload-placeholder p {
    margin-bottom: 8px;
    font-size: 1rem;
}

.upload-tip {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* 图片预览区域 */
.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
}

.image-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e1e5e9;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.image-item .remove-btn:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.1);
}

/* 控制区域样式 */
.control-section {
    padding: 30px;
    background: #f8fafc;
    display: flex;
    gap: 16px;
    justify-content: center;
    border-bottom: 1px solid #e1e5e9;
}

.generate-btn,
.reset-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.generate-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.reset-btn {
    background: #6c757d;
    color: white;
}

.reset-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* 输出区域样式 */
.output-section {
    padding: 30px;
}

.output-content {
    min-height: 300px;
}

.tab-content {
    display: block;
}

.content-placeholder {
    text-align: center;
    color: #64748b;
    padding: 60px 20px;
    font-size: 1.1rem;
}

.generated-content {
    background: #f8fafc;
    border-radius: 8px;
    padding: 24px;
}

.content-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.copy-btn,
.edit-btn {
    padding: 8px 16px;
    border: 1px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.copy-btn:hover,
.edit-btn:hover {
    background: #007bff;
    color: white;
}

.content-text {
    line-height: 1.8;
    font-size: 1rem;
    color: #2c3e50;
    white-space: pre-wrap;
    min-height: 200px;
    padding: 16px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    background: white;
}

/* 模型信息样式 */
.model-info {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.model-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-text strong {
    color: #ffd700;
    font-weight: 600;
}

/* 状态消息样式 */
.status-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.status-message.success {
    background: #10b981;
}

.status-message.error {
    background: #ef4444;
}

.status-message.info {
    background: #3b82f6;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .input-section,
    .control-section,
    .output-section {
        padding: 20px;
    }

    .control-section {
        flex-direction: column;
        align-items: stretch;
    }

    .generate-btn,
    .reset-btn {
        padding: 16px 24px;
    }

    .output-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1;
        text-align: center;
    }

    .image-preview {
        justify-content: center;
    }

    .image-item {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .input-section,
    .control-section,
    .output-section {
        padding: 16px;
    }

    .product-text-input {
        padding: 12px;
    }

    .image-upload-area {
        padding: 30px 16px;
    }

    .upload-icon {
        font-size: 2.5rem;
    }
}
