/* 基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
    font-weight: 300;
}

/* 两栏布局 */
.main-two-column {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.left-column, .right-column {
    flex: 1;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 25px;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.column-title {
    margin-top: 0;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 15px;
    color: #333;
    font-size: 1.4em;
    font-weight: 500;
}

/* 聊天区域样式 */
.chat-history {
    height: 400px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    background: #fafbfc;
}

.chat-message {
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    line-height: 1.5;
    max-width: 85%;
}

.system-message {
    background: #e3f2fd;
    color: #1565c0;
    margin: 0 auto;
    text-align: center;
}

.user-message {
    background: #007bff;
    color: white;
    margin-left: auto;
}

.message-image {
    max-width: 150px;
    max-height: 150px;
    border-radius: 6px;
    margin-top: 8px;
    display: block;
}

/* 聊天输入区域 */
.chat-input-area {
    margin-top: 20px;
}

.upload-area {
    margin-bottom: 15px;
}

.upload-label {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.upload-label:hover {
    background: #218838;
}

.image-upload {
    display: none;
}

.upload-tip {
    margin-top: 8px;
    color: #666;
    font-size: 0.9em;
}

#prompt-input {
    width: 100%;
    height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    font-size: 14px;
    margin-bottom: 15px;
}

.send-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 进度条样式 */
.progress-section {
    margin-bottom: 25px;
}

.progress-text {
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f2f5;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.error-text {
    color: #dc3545;
    margin-top: 8px;
    font-size: 0.9em;
}

/* 图片显示区域 */
.image-display-section {
    margin-bottom: 25px;
}

.section-subtitle {
    margin-bottom: 15px;
    color: #555;
    font-size: 1.1em;
}

.image-wrapper {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-wrapper img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.empty-state {
    color: #999;
}

.empty-img {
    opacity: 0.6;
    margin-bottom: 10px;
}

/* 下载区域 */
.download-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.size-selection {
    margin-bottom: 20px;
}

.size-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.size-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.custom-size input {
    width: calc(50% - 15px);
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0 5px;
}

.download-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-download {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-download.primary {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.btn-download.secondary {
    background: #6c757d;
    color: white;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 支付弹窗样式 */
.legal-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.legal-dialog {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.legal-dialog h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.4em;
}

.payment-content {
    margin-bottom: 25px;
}

.payment-content p {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #555;
}

.payment-methods {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.payment-button {
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: white;
    transition: all 0.3s;
    min-width: 120px;
}

.payment-button.wechat {
    background: linear-gradient(135deg, #07c160, #05a050);
}

.payment-button.alipay {
    background: linear-gradient(135deg, #1677ff, #0958d9);
}

.payment-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.dialog-buttons {
    margin-top: 20px;
}

.cancel-button {
    padding: 10px 25px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.cancel-button:hover {
    background: #5a6268;
}

/* 二维码弹窗 */
.qr-code-container {
    margin: 25px 0;
}

.qr-code-image {
    max-width: 200px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: white;
}

.payment-status {
    margin: 15px 0;
    font-weight: 500;
    color: #333;
    min-height: 24px;
}

.success-checkmark {
    font-size: 32px;
    margin: 15px 0;
    animation: bounce 0.5s;
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    80% {
        transform: translateY(-5px);
    }
}

/* 工具类 */
.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-two-column {
        flex-direction: column;
    }

    .container {
        padding: 15px;
    }

    .left-column, .right-column {
        padding: 15px;
    }

    .download-btns {
        flex-direction: column;
    }

    .payment-methods {
        flex-direction: column;
    }

    .payment-button {
        width: 100%;
    }
}