<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
{
  "name": "JETHRO AI 3.0",
  "short_name": "Jethro",
  "description": "Your personal AI assistant",
  "id": "jethro3",
  "start_url": "/",
  "scope": "/",
  "display": "standalone",
  "background_color": "#0a0f1c",
  "theme_color": "#0a0f1c",
  "orientation": "portrait",
  "icons": [
    { "src": "icon-192.png", "sizes": "192x192", "type": "image/png", "purpose": "any" },
    { "src": "icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any" }
  ]
}
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #060d1a;
  color: #dbe7f5;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  padding: 16px;
}

.app { max-width: 520px; margin: 0 auto; }

/* ---------- Header ---------- */
.header { text-align: center; padding: 10px 0 20px; }

.face-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 14px;
}

.ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(0, 200, 255, 0.35);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50%      { transform: scale(1.06); opacity: 1; }
}

.face {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.15s ease;
}

.face.nod   { animation: nod 0.6s ease; }
.face.blink { animation: blink 0.2s ease; }

@keyframes nod {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

.mouth {
  position: absolute;
  left: 50%;
  top: 68%;
  width: 34px;
  height: 8px;
  margin-left: -17px;
  background: #1a0f0f;
  border-radius: 50%;
  opacity: 0;
  transition: height 0.1s ease, opacity 0.1s ease;
  pointer-events: none;
}

.face-wrap.speaking .mouth {
  opacity: 0.85;
  animation: talk 0.28s ease-in-out infinite alternate;
}

@keyframes talk {
  from { height: 6px;  }
  to   { height: 20px; }
}

.title {
  font-size: 26px;
  letter-spacing: 8px;
  color: #4fd8ff;
  font-weight: 600;
}

.subtitle {
  font-size: 10px;
  letter-spacing: 4px;
  color: #5c7691;
  margin-top: 6px;
}

.clock {
  font-size: 38px;
  font-weight: 300;
  letter-spacing: 2px;
  margin-top: 14px;
}

.date { font-size: 13px; color: #5c7691; margin-top: 4px; }

/* ---------- Diagnostics ---------- */
.diagnostics {
  background: rgba(12, 24, 42, 0.9);
  border: 1px solid rgba(0, 180, 255, 0.15);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.diag-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 2px;
  color: #5c7691;
  margin-bottom: 12px;
}

.live { color: #37e0a0; }

.diag-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 7px 0;
  color: #a9c0d6;
}

.ok  { color: #37e0a0; font-size: 12px; letter-spacing: 1px; }
.bad { color: #ff5c72; font-size: 12px; letter-spacing: 1px; }

/* ---------- Chat ---------- */
.chat-card {
  background: rgba(12, 24, 42, 0.9);
  border: 1px solid rgba(0, 180, 255, 0.15);
  border-radius: 14px;
  padding: 16px;
}

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-head h2 {
  font-size: 15px;
  letter-spacing: 3px;
  color: #4fd8ff;
  font-weight: 600;
}

.head-btns { display: flex; gap: 6px; }

.reset {
  background: transparent;
  border: 1px solid rgba(0, 180, 255, 0.3);
  color: #7fa8c9;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
}

.chat-sub { font-size: 11px; color: #5c7691; margin: 4px 0 14px; }

.messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.msg {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
  max-width: 88%;
  white-space: pre-wrap;
}

.msg.jethro {
  align-self: flex-start;
  background: rgba(0, 140, 200, 0.12);
  border-left: 3px solid #4fd8ff;
}

.msg.you {
  align-self: flex-end;
  background: rgba(120, 80, 220, 0.16);
  border-left: 3px solid #9b7bff;
}

.msg .who {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  color: #5c7691;
  margin-bottom: 6px;
}

/* ---------- Input ---------- */
.input-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.input-row input {
  flex: 1;
  background: rgba(6, 16, 30, 0.9);
  border: 1px solid rgba(0, 180, 255, 0.2);
  border-radius: 10px;
  padding: 12px;
  color: #dbe7f5;
  font-size: 14px;
  outline: none;
}

.input-row input:focus { border-color: #4fd8ff; }

.mic, .send {
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 14px;
  cursor: pointer;
}

.mic { background: rgba(0, 180, 255, 0.15); color: #4fd8ff; }
.mic.listening { background: #ff5c72; color: #fff; }

.send { background: #4fd8ff; color: #04121f; font-weight: 600; }
</style>
<script>
self.addEventListener("install", () => self.skipWaiting());
self.addEventListener("activate", (e) => e.waitUntil(self.clients.claim()));
self.addEventListener("fetch", (e) => {
  e.respondWith(fetch(e.request).catch(() => caches.match(e.request)));
});
</script>
</body>
</html>