<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>500 - Server Error | Tap2Order</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <style>
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #0f0f1a;
            color: #e0e0e0;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        .error-container {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 40px 20px;
            position: relative;
            overflow: hidden;
        }
        .error-content { max-width: 560px; position: relative; z-index: 2; }

        .gear-animation {
            position: relative;
            width: 120px;
            height: 120px;
            margin: 0 auto 30px;
        }
        .gear {
            position: absolute;
            color: rgba(230, 57, 70, 0.15);
            font-size: 80px;
            top: 50%;
            left: 50%;
        }
        .gear-1 {
            transform: translate(-70%, -55%);
            animation: spin-gear 6s linear infinite;
        }
        .gear-2 {
            transform: translate(-15%, -15%);
            font-size: 50px;
            animation: spin-gear-reverse 4s linear infinite;
            color: rgba(230, 57, 70, 0.1);
        }
        @keyframes spin-gear {
            from { transform: translate(-70%, -55%) rotate(0deg); }
            to { transform: translate(-70%, -55%) rotate(360deg); }
        }
        @keyframes spin-gear-reverse {
            from { transform: translate(-15%, -15%) rotate(0deg); }
            to { transform: translate(-15%, -15%) rotate(-360deg); }
        }

        .error-code {
            font-size: 140px;
            font-weight: 800;
            line-height: 1;
            background: linear-gradient(135deg, #e63946, #ff6b6b);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 16px;
            letter-spacing: -4px;
        }
        .error-title {
            font-size: 28px;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 12px;
        }
        .error-message {
            font-size: 16px;
            color: #8a8a9a;
            margin-bottom: 36px;
            line-height: 1.6;
        }
        .btn-group-errors {
            display: flex;
            gap: 12px;
            justify-content: center;
            flex-wrap: wrap;
        }
        .btn-home {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: linear-gradient(135deg, #e63946, #c0392b);
            color: #ffffff;
            text-decoration: none;
            padding: 14px 32px;
            border-radius: 10px;
            font-weight: 600;
            font-size: 15px;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
        }
        .btn-home:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(230, 57, 70, 0.35);
            color: #ffffff;
        }
        .btn-support {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: transparent;
            color: #8a8a9a;
            text-decoration: none;
            padding: 14px 32px;
            border-radius: 10px;
            font-weight: 600;
            font-size: 15px;
            transition: all 0.3s ease;
            border: 1px solid rgba(255,255,255,0.1);
            cursor: pointer;
        }
        .btn-support:hover {
            border-color: #e63946;
            color: #e63946;
            transform: translateY(-2px);
        }
        .error-footer {
            text-align: center;
            padding: 24px;
            border-top: 1px solid rgba(255,255,255,0.06);
        }
        .brand-text {
            font-size: 20px;
            font-weight: 700;
            color: #ffffff;
        }
        .brand-text span { color: #e63946; }
        .footer-powered {
            color: #555;
            font-size: 12px;
            margin-top: 8px;
        }
        .footer-powered a { color: #e63946; text-decoration: none; }
        .decoration-circle {
            position: absolute;
            border-radius: 50%;
            opacity: 0.04;
            pointer-events: none;
        }
        .decoration-circle.c1 {
            width: 400px; height: 400px;
            background: #e63946;
            top: -120px; right: -120px;
        }
        .decoration-circle.c2 {
            width: 300px; height: 300px;
            background: #f39c12;
            bottom: -100px; left: -100px;
        }
    </style>
</head>
<body>

<div class="error-container">
    <div class="decoration-circle c1"></div>
    <div class="decoration-circle c2"></div>
    <div class="error-content">
        <div class="gear-animation">
            <i class="fas fa-cog gear gear-1"></i>
            <i class="fas fa-cog gear gear-2"></i>
        </div>
        <div class="error-code">500</div>
        <h1 class="error-title">Server Error</h1>
        <p class="error-message">Something went wrong on our end. We're working to fix it. Please try again later or contact our support team for assistance.</p>
        <div class="btn-group-errors">
            <a href="../public/index.php" class="btn-home">
                <i class="fas fa-house"></i> Go to Home
            </a>
            <a href="mailto:support@tap2order.com" class="btn-support">
                <i class="fas fa-envelope"></i> Contact Support
            </a>
        </div>
    </div>
</div>

<div class="error-footer">
    <div class="brand-text">Tap<span>2</span>Order</div>
    <div class="footer-powered">Powered by <a href="#">DigitalNext Gen</a></div>
</div>

</body>
</html>
