<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Service Unavailable - Prism</title>
  <style>
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
      color: #e0e0e0;
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    .container {
      max-width: 600px;
      background: rgba(255,255,255,0.05);
      border-radius: 16px;
      padding: 40px;
      border: 1px solid rgba(255,255,255,0.1);
    }
    h1 {
      font-size: 3rem;
      margin-bottom: 8px;
      color: #ffa726;
    }
    .subtitle {
      font-size: 1.25rem;
      color: #888;
      margin-bottom: 24px;
    }
    p { margin-bottom: 16px; line-height: 1.6; }
    h3 {
      font-size: 1.1rem;
      margin: 24px 0 12px;
      color: #64b5f6;
    }
    ol {
      margin-left: 24px;
      line-height: 2;
    }
    code {
      background: rgba(100,181,246,0.15);
      padding: 4px 8px;
      border-radius: 4px;
      font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
      font-size: 0.9rem;
      color: #81d4fa;
    }
    a {
      color: #64b5f6;
      text-decoration: none;
    }
    a:hover { text-decoration: underline; }
    .footer {
      margin-top: 32px;
      padding-top: 16px;
      border-top: 1px solid rgba(255,255,255,0.1);
      font-size: 0.85rem;
      color: #666;
    }
  </style>
</head>
<body>
  <div class="container">
    <h1>503</h1>
    <div class="subtitle">Service Unavailable</div>
    <p>The route exists but the service is not responding.</p>
    <p>The container may have crashed, failed to start, or is still initializing.</p>

    <h3>What to do:</h3>
    <ol>
      <li>Check container status: <code>prism devcontainer status</code></li>
      <li>View container logs: <code>prism devcontainer logs</code></li>
      <li>Restart the project: <code>prism devcontainer up --build</code></li>
      <li>Diagnose this URL: <code>prism proxy diagnose &lt;hostname&gt;</code></li>
    </ol>

    <h3>Common causes:</h3>
    <ul style="margin-left: 24px; line-height: 1.8;">
      <li>Application crashed due to an error</li>
      <li>Database connection failed</li>
      <li>Port conflict with another process</li>
      <li>Container is still starting up (wait a few seconds)</li>
    </ul>

    <h3>Useful links:</h3>
    <p>
      <a href="http://traefik.localhost:8080">Traefik Dashboard</a> -
      View service health and status
    </p>

    <div class="footer">
      Powered by <a href="https://github.com/lassethomsen/prism">Prism</a> reverse proxy
    </div>
  </div>
</body>
</html>
