/* 全局样式 */
* {
    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;
}

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

/* 登录/注册界面 */
.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}



.auth-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-container h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 700;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.verify-code-container {
    display: flex;
    gap: 10px;
}

.verify-code-container input {
    flex: 1;
}

.send-code-btn {
    padding: 12px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.3s ease;
}

.send-code-btn:hover {
    background: #5a6fd8;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.auth-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

/* 注册和登录相关样式 */
.register-section, .login-section {
    margin-top: 20px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.register-text, .login-text {
    color: #666;
    margin-bottom: 10px;
    font-size: 14px;
}

.register-btn, .back-to-login-btn {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.register-btn:hover, .back-to-login-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

#registerForm {
    margin-top: 20px;
}

/* 主界面 */
.main-section {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nav-left h1 {
    font-size: 24px;
    font-weight: 700;
}

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

.logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 14px;
}

.credits-info {
    font-weight: 600;
    color: #ffd700;
}

.user-center-btn, .logout-btn {
    padding: 8px 16px;
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.user-center-btn:hover, .logout-btn:hover {
    background: white;
    color: #667eea;
}

.main-content {
    padding: 30px;
}

.input-section, .output-section {
    margin-bottom: 30px;
}

.input-section h2, .output-section h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
}

.input-area, .output-area {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.input-area textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.input-area textarea:focus {
    outline: none;
    border-color: #667eea;
}

.input-controls, .output-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.create-btn, .copy-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease;
}

.create-btn:hover, .copy-btn:hover {
    transform: translateY(-2px);
}

.clear-btn {
    padding: 12px 24px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.clear-btn:hover {
    background: #5a6268;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.output-content {
    min-height: 200px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e1e5e9;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6c757d;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #f1f3f4;
}

.modal-header h2 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: #f1f3f4;
}

.modal-body {
    padding: 30px;
}

/* 用户中心样式 */
.user-stats {
    margin-bottom: 30px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 500;
    color: #666;
}

.package-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.package-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.package-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.2);
}

.package-card h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.price {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 15px;
}

.features {
    margin-bottom: 20px;
}

.features div {
    color: #666;
    margin-bottom: 5px;
    font-size: 14px;
}

.buy-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s ease;
}

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

/* 支付模态框样式 */
.payment-info {
    text-align: center;
}

.package-summary {
    margin-bottom: 30px;
}

.package-summary h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 18px;
}

.payment-price {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
}

.qr-code-container {
    margin-bottom: 30px;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.qr-code svg {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.qr-placeholder {
    color: #666;
    font-size: 14px;
}

.payment-status {
    margin-top: 20px;
}

.status-message {
    padding: 10px 20px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 8px;
    font-weight: 500;
}

/* 支付截图上传样式 */
.payment-upload-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.payment-upload-section h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

.upload-desc {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.upload-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background: white;
    border: 2px dashed #667eea;
    border-radius: 10px;
    color: #667eea;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: #f0f4ff;
    border-color: #5a6fd8;
}

.upload-icon {
    font-size: 20px;
}

.upload-preview {
    position: relative;
    display: inline-block;
    max-width: 300px;
}

.upload-preview img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.remove-upload-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.remove-upload-btn:hover {
    background: #c82333;
}

.upload-actions {
    display: flex;
    justify-content: center;
}

.submit-payment-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.submit-payment-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.submit-payment-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 提示模态框样式 */
.alert-content {
    max-width: 400px;
}

.alert-content .modal-body {
    text-align: center;
}

.alert-content p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

.alert-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.cancel-btn {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

/* 套餐推荐区域样式 */
.package-recommend-section {
    margin-top: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    border: 2px solid #dee2e6;
}

.package-recommend-section h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

.recommend-desc {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
}

.package-recommend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.package-recommend-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.package-recommend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.package-header h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.package-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.package-badge.popular {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.package-badge.premium {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #333;
}

.package-price {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 20px;
}

.package-price span {
    font-size: 16px;
    color: #666;
    font-weight: 400;
}

.package-features {
    margin-bottom: 25px;
}

.feature-item {
    color: #666;
    margin-bottom: 8px;
    font-size: 14px;
    text-align: left;
}

.package-buy-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.package-buy-btn:hover {
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .auth-container {
        padding: 30px 20px;
    }
    
    .top-nav {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .logo-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .logo {
        width: 35px;
        height: 35px;
    }
    
    .nav-left h1 {
        font-size: 20px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .package-grid {
        grid-template-columns: 1fr;
    }
    
    .package-recommend-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

/* 滚动条样式 */
.output-content::-webkit-scrollbar {
    width: 8px;
}

.output-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.output-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.output-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 