/* 文画 PicPop - 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f7f7f7;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
}

/* 顶部区域 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 36px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-size: 22px;
    font-weight: 500;
    margin: 0;
}

.subtitle {
    font-size: 12px;
    color: #666;
    margin: 0;
    margin-top: 2px;
}

.logo-en {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
}

/* 分隔线 */
.divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 0 auto;
    width: 90%;
    max-width: 1100px;
}

/* 主内容区域 */
.main-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-bottom: 10px;
}

.content-wrapper {
    display: flex;
    justify-content: center;
    gap: 25px;
    height: calc(100vh - 200px);
    margin-bottom: 0;
    padding: 0 20px;
}

/* 上传区域 */
.upload-container, .result-container {
    flex: 1;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    background-color: #fff;
    position: relative;
}

.upload-area, .result-area {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    background-color: #fafafa;
    width: 80%;
    height: 80%;
}

.upload-placeholder:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.upload-placeholder p {
    color: #777;
    font-size: 16px;
}

/* 预览区域 */
.preview-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
}

#previewImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.remove-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.remove-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 结果区域 */
.result-container {
    flex: 1;
    display: flex;
    justify-content: center;
    height: 100%;
}

.result-area {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.result-placeholder {
    color: #999;
    text-align: center;
    padding: 40px;
}

.result-image {
    width: 66.67%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#resultImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.download-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: #f8f8f8;
    color: #333;
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.download-button:hover {
    background-color: #eee;
}

.download-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1); /* 将图标改为白色 */
}

.download-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background-color: #007aff;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.download-button:hover {
    background-color: #0055c9;
}

/* AI声明样式 */
.ai-disclaimer {
    margin: 0 0 5px 20px; /* 调整为左对齐 */
    padding: 0;
    font-size: 11px;
    color: #888;
    text-align: left; /* 左对齐 */
    font-style: italic;
    line-height: 1.3;
    max-width: 700px;
}

/* 提示词输入区域 */
.prompt-wrapper {
    margin-top: 0;
    margin-bottom: 10px;
    padding: 0 20px;
    width: 100%;
}

.prompt-container {
    margin-top: 3px; 
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

#promptInput {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    font-size: 16px;
    resize: none;
    outline: none;
    transition: all 0.2s ease;
    overflow-y: hidden;
    font-family: inherit;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

#promptInput:focus {
    border-color: #4f95ff;
    box-shadow: 0 2px 8px rgba(79, 149, 255, 0.1);
}

.submit-button {
    height: 50px;
    min-width: 100px;
    background: linear-gradient(135deg, #4f95ff, #3a7eec);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(79, 149, 255, 0.2);
}

.submit-button:hover {
    background: linear-gradient(135deg, #3a7eec, #2869d9);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(79, 149, 255, 0.25);
}

.submit-button:active {
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
        height: auto;
        gap: 20px;
    }

    .upload-container, .result-container {
        height: 300px;
    }
    
    .prompt-container {
        flex-direction: column;
        height: auto;
        gap: 10px;
    }
    
    .submit-button {
        width: 100%;
    }
}
