<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>错误页面</title>
    <!-- 引入 Font Awesome 图标库 本地化引入 Font Awesome -->
    <link rel="stylesheet" href="/font-awesome/all.min-dfb8fc36e102730fddf78b5494eb0035.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .error-container {
            background-color: white;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            padding: 40px;
            max-width: 600px;
            width: 100%;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .error-icon {
            font-size: 80px;
            color: #ff4757;
            margin-bottom: 20px;
            animation: pulse 2s infinite;
        }

        h1 {
            color: #2f3542;
            margin-bottom: 15px;
            font-size: 28px;
        }

        .error-code {
            background-color: #ff4757;
            color: white;
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 14px;
            display: inline-block;
            margin-bottom: 25px;
        }

        .error-message {
            color: #57606f;
            font-size: 18px;
            line-height: 1.6;
            margin-bottom: 30px;
            padding: 15px;
            background-color: #f1f2f6;
            border-radius: 8px;
            border-left: 4px solid #ff4757;
        }

        .error-details {
            text-align: left;
            background-color: #f9f9f9;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 30px;
            font-size: 14px;
            color: #57606f;
        }

        .error-details h3 {
            margin-bottom: 10px;
            color: #2f3542;
        }

        .error-details ul {
            padding-left: 20px;
        }

        .error-details li {
            margin-bottom: 8px;
        }

        .action-buttons {
            display: flex;
            justify-content: center;
            gap: 15px;
            flex-wrap: wrap;
        }

        .btn {
            padding: 12px 25px;
            border-radius: 6px;
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn-primary {
            background-color: #3742fa;
            color: white;
        }

        .btn-secondary {
            background-color: #f1f2f6;
            color: #2f3542;
        }

        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .btn-primary:hover {
            background-color: #2f34d1;
        }

        .btn-secondary:hover {
            background-color: #dfe4ea;
        }

        .support-info {
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #dfe4ea;
            color: #747d8c;
            font-size: 14px;
        }

        @keyframes pulse {
            0% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.1);
            }
            100% {
                transform: scale(1);
            }
        }

        @media (max-width: 576px) {
            .error-container {
                padding: 25px;
            }

            .action-buttons {
                flex-direction: column;
            }

            .btn {
                width: 100%;
            }
        }
    </style>
</head>
<body>
<div class="error-container">
    <div class="error-icon">
        <i class="fas fa-exclamation-triangle"></i>
    </div>

    <h1>访问出错</h1>

    <div class="error-code">错误代码: null</div>

    <div class="error-message" id="errorMessage"></div>

    <div class="error-details">
        <h3>可能的原因：</h3>
        <ul>
            <li>服务器暂时无法处理您的请求</li>
            <li>网络连接出现问题</li>
            <li>系统正在维护中</li>
            <li>请求的资源不存在或已被移除</li>
        </ul>
    </div>

    <div class="action-buttons">
        <a href="/index.xhtml" class="btn btn-primary">
            <i class="fas fa-home"></i> 返回首页
        </a>
    </div>

    <div class="support-info">
        <p>如果问题持续存在，请联系我们。</p>
        <p>电话: 028-87516148、87511187 | 邮箱: rz@scfri.cn</p>
    </div>
</div>

<script nonce="7oKacWTv/Ojh2R0AZqVg/w==">
    // 模拟从后端传递错误信息
    // 在实际应用中，这些值会从服务器端传递
    document.addEventListener('DOMContentLoaded', function () {
        // 使用Thymeleaf变量
        const errorMessage = /**/ '系统遇到意外错误，请稍后重试。';
        const errorCode = /**/ '500';

        // 更新页面内容
        document.getElementById('errorMessage').textContent = errorMessage;
        document.querySelector('.error-code').textContent = `错误代码: ${errorCode}`;
    });
</script>
</body>
</html>