<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no">

    <%
        response.setHeader("Cache-Control","no-store");
        response.setHeader("Pragma","no-cache");
        response.setDateHeader("Expires",0);
        if (request.getProtocol().equals("HTTP/1.1"))
            response.setHeader("Cache-Control", "no-cache");
    %>

    <title>XIT - 서버 오류</title>

    <!-- Font & Icon -->
    <link rel="stylesheet" href="<c:url value='/resources/plugins/fontawesome-free/css/all.min.css' />">

    <!-- Main Style -->
    <link rel="stylesheet" href="<c:url value='/resources/css/style.min.css' />" id="main-css">
    <link rel="stylesheet" href="<c:url value='/resources/css/style_new.css' />">

    <style>
        .error-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100vh;
            text-align: center;
            padding: 20px;
        }

        .error-image {
            max-width: 300px;
            margin-bottom: 30px;
        }

        .error-title {
            font-size: 24px;
            font-weight: bold;
            margin-bottom: 15px;
            color: #d9534f;
        }

        .error-message {
            font-size: 16px;
            margin-bottom: 20px;
            color: #333;
        }

        .error-details {
            background-color: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 5px;
            padding: 15px;
            margin-bottom: 20px;
            text-align: left;
            max-width: 600px;
            width: 100%;
        }

        .error-details pre {
            white-space: pre-wrap;
            word-wrap: break-word;
            margin: 0;
            font-size: 14px;
        }

        .home-button {
            background-color: #007bff;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
            text-decoration: none;
            transition: background-color 0.3s;
        }

        .home-button:hover {
            background-color: #0056b3;
            color: white;
        }
    </style>
</head>
<body>
    <div class="error-container">
        <img src="<c:url value='/resources/img/500.svg' />" alt="서버 오류" class="error-image">

        <div class="error-title">
            서버 오류가 발생했습니다
        </div>

        <div class="error-message">
            요청하신 작업을 처리하는 중에 서버 내부 오류가 발생했습니다.<br>
            잠시 후 다시 시도하시거나, 계속해서 문제가 발생하면 관리자에게 문의해주세요.
        </div>

        <a href="<c:url value='/' />" class="home-button">
            <i class="fas fa-home"></i> 홈으로 돌아가기
        </a>
    </div>
</body>
</html>