/* style.css - XGen AI 平台样式（完整功能版）*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, 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;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 20px;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.trust-badges span {
    background: #3498db;
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 服务网格布局 */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.service-category {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.service-category:hover {
    transform: translateY(-5px);
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f2f6;
}

.category-icon {
    font-size: 2rem;
    margin-right: 15px;
}

.category-title {
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
}

/* 服务项样式 */
.service-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.service-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.service-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-desc {
    color: #7f8c8d;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.service-price {
    background: #e8f4fd;
    color: #3498db;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: inline-block;
}

/* 输入组样式 */
.input-group {
    margin: 15px 0;
}

.input-label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
}

.input-hint {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 5px;
    font-style: italic;
}

/* 表单控件 */
.service-controls {
    margin: 15px 0;
}

.file-input {
    width: 100%;
    padding: 10px;
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f8f9fa;
    cursor: pointer;
}

.file-input:hover {
    border-color: #3498db;
    background: #e3f2fd;
}

.text-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.95rem;
    min-height: 80px;
    transition: border-color 0.3s ease;
    background: #f8f9fa;
    line-height: 1.5;
}

.text-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

.text-input::placeholder {
    color: #a0a0a0;
    white-space: pre-line;
}

.generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

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

/* 预览容器 */
.preview-container {
    margin-top: 15px;
    text-align: center;
}

.preview-image, .preview-video {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0.7; /* 低质量预览效果 */
    filter: blur(1px);
}

.file-preview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px dashed #bdc3c7;
    text-align: center;
    font-size: 1.1rem;
    color: #7f8c8d;
}

/* 结果区域 */
.result-section {
    margin: 40px 0;
}

.processing {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.generation-result {
    margin: 20px 0;
}

.result-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.result-header {
    text-align: center;
    margin-bottom: 25px;
}

.result-header h3 {
    color: #27ae60;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.preview-area {
    text-align: center;
    margin: 25px 0;
}

.preview-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.preview-notice p {
    margin: 5px 0;
    color: #856404;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.download-btn {
    flex: 1;
    background: linear-gradient(135deg, #e74c3c, #e67e22);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.regenerate-btn {
    flex: 1;
    background: #95a5a6;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.regenerate-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.file-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

/* 状态消息 */
.status-message {
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
    font-weight: 500;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 使用说明 */
.instructions {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.instructions h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.step-number {
    background: #3498db;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.cost-example {
    background: #e8f4fd;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.cost-example ul {
    margin: 10px 0;
    padding-left: 20px;
}

.cost-example li {
    margin: 5px 0;
}

.note {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-style: italic;
    margin-top: 10px;
}

/* 底部信任链接 */
.trust-footer {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.copyright {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 支付模态框 */
.payment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
}

.file-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.cost-breakdown {
    background: #e8f4fd;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #d1ecf1;
}

.cost-total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #3498db;
}

.pay-button {
    width: 100%;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.pay-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.cancel-button {
    width: 100%;
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cancel-button:hover {
    background: #7f8c8d;
}

.security-note {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .download-btn, .regenerate-btn {
        min-width: 100%;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .trust-badges {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .service-name {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px 15px;
    }
    
    .service-category {
        padding: 20px 15px;
    }
    
    .modal-content {
        padding: 20px 15px;
    }
    
    .text-input {
        min-height: 100px;
    }
}