<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title th:text="'支付成功 - ' + ${serviceInfo.title}">支付成功 - ${serviceInfo.subtitle}</title>
    <style>

        /* 渐变边框实现 */
        .header::before {
            content: '';
            position: absolute;
            top: -1px;
            left: -1px;
            right: -1px;
            bottom: -1px;
            background: linear-gradient(135deg, #5689AF, #025E8E);
            border-radius: inherit;
            z-index: -1;
        }

        /* 新增成功页面专属样式 */
        .success-container {
            text-align: center;
            padding: 2rem 1rem;
        }

        .success-icon {
            width: 100px;
            height: 100px;
            margin: 1rem auto 2rem;
            animation: float 3s ease-in-out infinite;
        }

        .success-title {
            color: var(--primary-color);
            font-size: 1.8rem;
            margin: 0.5rem 0 1rem;
            font-weight: 600;
        }

        .error-title {
            color: #F44336;
            font-size: 1.8rem;
            margin: 0.5rem 0 1rem;
            font-weight: 600;
        }

        /* 订单信息卡片优化 */
        .order-info {
            background: white;
            border-radius: 12px;
            padding: 1.5rem;
            margin: 1.5rem auto;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
            max-width: 500px;
            border: 1px solid #e0e0e0;
        }

        .info-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 0;
            border-bottom: 1px solid #f0f0f0;
        }

        .info-item:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }

        .info-label {
            color: #666;
            flex: 0 0 30%;
            font-size: 14px;
        }

        .info-value {
            color: #333;
            flex: 0 0 65%;
            text-align: right;
            font-weight: 500;
            word-break: break-all; /* 长订单号自动换行 */
            font-size: 15px;
        }

        /* 按钮样式增强 */
        .back-button {
            background: var(--primary-color);
            color: white;
            padding: 12px 50px;
            border-radius: 30px;
            border: none;
            font-size: 1.1rem;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 12px rgba(255,107,40,0.3);
        }

        .back-button:hover {
            transform: translateY(-2px);
            opacity: 0.9;
            box-shadow: 0 6px 16px rgba(255,107,40,0.4);
        }

        /* 联系客服样式 */
        .customer-service {
            margin-top: 1.5rem;
            color: #888;
            font-size: 14px;
        }
        .customer-service a {
            color: var(--primary-color);
            text-decoration: none;
            margin-left: 8px;
            font-weight: 500;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-8px); }
        }

        .branding {
            display: flex;
            align-items: center;
            height: 100%;
            gap: 15px;
        }

        .header-text {
            margin-left: 1rem;
            color: #FEDCC8;
            text-align: left;
        }
    </style>
</head>
<script src="/js/axios/axios.min.js"></script>
<body>
<div class="container" th:fragment="success">
    <!-- 页头动态数据绑定 -->
    <header class="header">
        <div class="branding">
            <div class="header-text">
                <h3 th:text="${serviceInfo.title}"></h3>
                <h5 th:text="${serviceInfo.subtitle}"></h5>
                <h1 th:class="${verify} ? 'success-title' : 'error-title'"
                    th:text="${verify} ? '支付成功' : '支付失败'">
                    支付状态加载中...
                </h1>
                <p style="color: var(--primary-color); font-size: 15px;">服务已激活，立即开启智能体验</p>
            </div>
            <img th:src="@{/images/助手机器人.png}" alt="AI助手" class="robot-logo">
        </div>
    </header>

    <!--<header class="header" style="height: auto; padding: 2rem 1rem;">
        <div class="branding" style="flex-direction: column; gap: 1rem;">
            <img th:src="@{/images/助手机器人.png}"
                 alt="支付成功"
                 class="success-icon">
            <div class="header-text" style="text-align: center;">
                <h1 class="success-title">🎉 支付成功</h1>
                <p style="color: #666; font-size: 15px;">服务已激活，立即开启智能体验</p>
            </div>
        </div>
    </header>-->

    <!-- 订单信息结构化 -->
    <div class="order-info">
        <div class="info-item">
            <span class="info-label">订单编号：</span>
            <span class="info-value" th:text="${resultInfo.orderSn}"></span>
        </div>
        <div class="info-item">
            <span class="info-label">支付金额：</span>
            <span class="info-value" th:text="'¥' + ${resultInfo.totalAmount}"></span>
        </div>
        <div class="info-item">
            <span class="info-label">付款时间：</span>
            <span class="info-value"
                  th:text="${#temporals.format(resultInfo.paymentTime, 'yyyy-MM-dd HH:mm:ss')}">
            </span>
        </div>
    </div>

    <!-- 操作区优化 -->
    <div class="success-container">
        <!--<button onclick="location.href='/'"
                class="back-button">
            立即体验服务
        </button>-->
        <p class="customer-service">
            遇到问题？
            <a href="tel:123-456-789">联系客服</a>
        </p>
    </div>
</div>
</body>
</html>