from flask import Flask
import pyfiglet

app = Flask(__name__)

@app.route("/")
def index():
    ascii_art = pyfiglet.figlet_format("PORTER", font="banner3-D")
    html = f"""<!DOCTYPE html>
<html>
<head>
  <title>Porter</title>
  <style>
    body {{
      background-color: #0d0d0d;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      margin: 0;
    }}
    pre {{
      color: #00e5ff;
      font-family: monospace;
      font-size: clamp(6px, 1.2vw, 18px);
      text-shadow: 0 0 8px #00e5ff;
      white-space: pre;
    }}
  </style>
</head>
<body>
  <pre>{ascii_art}</pre>
</body>
</html>"""
    return html

import os
if __name__ == "__main__":
    port = int(os.environ.get("PORT", 8080))
    app.run(host="0.0.0.0", port=port)
