<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Emberfall Online — a 3/4-view fantasy MMO</title>
<meta name="description" content="Emberfall Online is a 3/4-angle top-down multiplayer RPG. Walk a living town, meet other players, chat, and explore." />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header class="hero">
  <nav class="nav">
    <div class="brand">EMBERFALL</div>
    <div class="links">
      <a href="#features">Features</a>
      <a href="#download">Download</a>
      <a href="#servers">Servers</a>
      <a href="https://github.com" target="_blank" rel="noreferrer">Source</a>
    </div>
  </nav>

  <div class="hero-inner">
    <h1>Walk the town of <span class="gold">Emberfall</span></h1>
    <p class="tagline">A diagonal 3/4-view multiplayer RPG. Real buildings, real players, real chat — all drawn in a warm, angled world.</p>
    <div class="cta">
      <a class="btn primary" href="#download">Download the Launcher</a>
      <a class="btn ghost" href="#servers">Connect to a server</a>
    </div>
    <div class="hero-art" aria-hidden="true">
      <div class="tile t1"></div>
      <div class="tile t2"></div>
      <div class="tile t3"></div>
      <div class="tile t4"></div>
    </div>
  </div>
</header>

<main>
  <section id="features" class="section">
    <h2>Features</h2>
    <div class="grid">
      <article class="card">
        <h3>3/4-angle world</h3>
        <p>Buildings, trees and people drawn from a true diagonal camera — facades, roofs and shadows all in perspective.</p>
      </article>
      <article class="card">
        <h3>Real multiplayer</h3>
        <p>A dedicated TCP server syncs players at 20 Hz with interpolation, chat and ping/pong.</p>
      </article>
      <article class="card">
        <h3>Procedural art</h3>
        <p>Tudor houses, a stone chapel, a wizard tower, market stalls, a fountain and a pond — all generated, no asset downloads.</p>
      </article>
      <article class="card">
        <h3>Sprite pipeline</h3>
        <p>Drop in a 4×4 PNG sheet to override characters, or use the built-in vanguard / arcanist / ranger sprites.</p>
      </article>
      <article class="card">
        <h3>Self-updating launcher</h3>
        <p>The launcher checks a manifest, downloads and verifies updates, and launches the game.</p>
      </article>
      <article class="card">
        <h3>Open &amp; extensible</h3>
        <p>.NET 10 / WPF. Map data is shared between server and client — edit once, both see it.</p>
      </article>
    </div>
  </section>

  <section id="download" class="section alt">
    <h2>Download</h2>
    <p>Windows 10/11. The launcher keeps the game up to date automatically.</p>
    <div class="download-row">
      <a class="btn primary" href="EmberfallLauncher.zip">Download Launcher</a>
      <a class="btn ghost" href="Emberfall-0.1.0.zip">Game archive (zip)</a>
    </div>
    <p class="small">Manifest: <code>manifest.json</code> · Server port <code>7777</code> · Default host <code>127.0.0.1</code></p>
  </section>

  <section id="servers" class="section">
    <h2>Servers</h2>
    <table class="servers">
      <thead><tr><th>Name</th><th>Host</th><th>Port</th><th>Status</th></tr></thead>
      <tbody>
        <tr><td>Emberfall Official</td><td>play.emberfall.example</td><td>7777</td><td><span class="dot online"></span>online</td></tr>
        <tr><td>Local / Dev</td><td>127.0.0.1</td><td>7777</td><td><span class="dot"></span>self-host</td></tr>
      </tbody>
    </table>
    <p class="small">Self-host: <code>dotnet run --project src/Mmo.Server -- --port 7777</code></p>
  </section>

  <section class="section alt">
    <h2>Controls</h2>
    <ul class="controls">
      <li><kbd>WASD</kbd> / arrows — move</li>
      <li>Mouse wheel — zoom</li>
      <li><kbd>Enter</kbd> — chat, <kbd>Esc</kbd> — close</li>
      <li><kbd>F11</kbd> — fullscreen · <kbd>F3</kbd> — debug · <kbd>F12</kbd> — screenshot</li>
    </ul>
  </section>
</main>

<footer>
  <p>Emberfall Online · built with .NET 10 and WPF · <a href="manifest.json">manifest</a></p>
</footer>

<script src="app.js"></script>
</body>
</html>
EOF
cat > /root/EmberfallOnline/web/style.css <<'EOF'
:root {
  --bg: #0a0c12;
  --panel: #141821;
  --border: #2a2f3a;
  --gold: #d59a44;
  --muted: #b9b4a6;
  --green: #4f8a48;
  --text: #f0ece2;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10,12,18,0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.brand { font-weight: 900; letter-spacing: 3px; color: var(--gold); font-size: 18px; }
.links a { color: var(--muted); text-decoration: none; margin-left: 22px; font-size: 14px; }
.links a:hover { color: var(--gold); }

.hero {
  padding: 80px 32px 60px;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(79,138,72,0.18), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(213,154,68,0.12), transparent 55%),
    var(--bg);
  position: relative;
  overflow: hidden;
}
.hero-inner { max-width: 900px; margin: 0 auto; text-align: center; position: relative; z-index: 2; }
.hero h1 { font-size: 56px; margin: 0 0 16px; font-weight: 900; letter-spacing: -1px; }
.hero .gold { color: var(--gold); }
.tagline { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 auto 28px; }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  transition: transform .15s ease, background .15s ease;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--gold); color: #1a1206; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }

.hero-art {
  margin-top: 48px;
  display: flex;
  gap: 12px;
  justify-content: center;
  perspective: 600px;
}
.tile {
  width: 90px; height: 90px;
  background: linear-gradient(135deg, #3b5f8a, #2a2f3a);
  border: 1px solid var(--border);
  border-radius: 6px;
  transform: rotateX(55deg) rotateZ(45deg);
  box-shadow: 0 20px 40px rgba(0,0,0,.5);
}
.t1 { background: linear-gradient(135deg, #4f8a48, #2e5a32); }
.t2 { background: linear-gradient(135deg, #9a4a36, #6b4a2e); }
.t3 { background: linear-gradient(135deg, #78746c, #4a4642); }
.t4 { background: linear-gradient(135deg, #d59a44, #6b4a2e); }

.section { padding: 70px 32px; max-width: 1100px; margin: 0 auto; }
.section.alt { background: var(--panel); max-width: none; padding: 70px 32px; }
.section h2 { font-size: 32px; margin: 0 0 28px; text-align: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  transition: border-color .2s;
}
.card:hover { border-color: var(--gold); }
.card h3 { margin: 0 0 8px; color: var(--gold); font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }

.download-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }
.small { color: var(--muted); font-size: 13px; text-align: center; }
code { background: #0a0c12; border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; font-size: 12px; }

.servers { width: 100%; border-collapse: collapse; margin: 0 auto; max-width: 720px; }
.servers th, .servers td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; }
.servers th { color: var(--muted); font-weight: 600; font-size: 13px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #666; margin-right: 6px; vertical-align: middle; }
.dot.online { background: #4caf50; box-shadow: 0 0 8px #4caf50; }

.controls { max-width: 520px; margin: 0 auto; list-style: none; padding: 0; }
.controls li { padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--muted); }
.controls kbd { background: var(--panel); border: 1px solid var(--border); padding: 2px 8px; border-radius: 4px; color: var(--text); font-size: 12px; margin-right: 8px; }

footer { padding: 32px; text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }
footer a { color: var(--gold); text-decoration: none; }
EOF
cat > /root/EmberfallOnline/web/app.js <<'EOF'
// Lightweight status ping for the official server (best-effort, no CORS guarantees).
(function () {
  const rows = document.querySelectorAll('.servers tbody tr');
  // placeholder: mark first row online
  rows.forEach(r => {});
})();
EOF
ls -la /root/EmberfallOnline/web