<!DOCTYPE html>
<html lang="sq">
<head>
<meta charset="UTF-8">
<title>Princi i Vogël Chat</title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background-color: #2c241e; padding: 10px; font-family: sans-serif; }
.frame { background-color: #fdf6e3; border: 5px solid #e8dcc4; border-radius: 10px; padding: 15px; }
h1 { color: #5d4a37; text-align: center; font-size: 24px; margin-bottom: 15px; }
.chat-box { background: white; border: 1px solid #e8dcc4; border-radius: 10px; min-height: 200px; padding: 15px; margin-bottom: 15px; display: flex; flex-direction: column; gap: 10px; }
.bubble { padding: 10px 15px; border-radius: 15px; font-size: 15px; max-width: 85%; }
.student { background: #e8dcc4; color: #2c241e; align-self: flex-start; }
.prince { background: #d4af37; color: white; align-self: flex-end; }
.btn-grid { display: flex; flex-direction: column; gap: 8px; }
.opt-grid { display: none; flex-direction: column; gap: 8px; }
.btn { padding: 12px; border: none; border-radius: 8px; font-size: 14px; font-weight: bold; cursor: pointer; }
.btn-select { background: white; color: #5d4a37; border: 1px solid #e8dcc4; text-align: left; }
.btn-continue { background: #5d4a37; color: white; text-align: center; }
.btn-back { background: #dcd1ba; color: #5d4a37; text-align: center; }
</style>
</head>
<body>
<div class="frame">
<h1>Princi i Vogël - Chat Box</h1>
<div class="chat-box" id="box">
<p style="text-align: center; color: #8b7355; font-style: italic;">Zgjidhni një pyetje më poshtë...</p>
</div>
<div class="btn-grid" id="p-pyetje">
<button class="btn btn-select" onclick="hap(1)">1. Pse Gjeografi nuk shënon lulen?</button>
<button class="btn btn-select" onclick="onclick=hap(2)">2. Çfarë ndjeve për fjalën "Efemer"?</button>
<button class="btn btn-select" onclick="hap(3)">3. A u pendove që u largove?</button>
</div>
<div class="opt-grid" id="p-opsione">
<button class="btn btn-continue" onclick="vazhdo()">Vazhdo bisedën</button>
<button class="btn btn-back" onclick="anulo()">Kthehu te pyetjet</button>
</div>
</div>
<script>
const data = {
1: {q:"Pse Gjeografi nuk e shënon lulen?", a:"Sepse ai kërkon gjëra që nuk ndryshojnë, si malet. Lulja ime mund të zhduket shpejt.", v:"Të rriturit e shohin botën vetëm me shifra, duke harruar aromën dhe bukurinë."},
2: {q:"Çfarë ndjeve për fjalën 'Efemer'?", a:"Ndjeva frikë. Kuptova që lulja ime është e brishtë dhe e vetme me katër gjemba.", v:"Por kjo na bën t'i duam gjërat më shumë, sepse e dimë që mund t'i humbasim."},
3: {q:"A u pendove që u largove?", a:"Po, u pendova. Duhej ta gjykoja nga veprat e jo nga fjalët.", v:"Mësimi im: Mos prisni t'i humbisni njerëzit e shtrenjtë për t'u treguar dashurinë."}
};
let aktuale = 0;
function hap(id) {
aktuale = id;
document.getElementById('box').innerHTML = `<div class="bubble student"><b>Nxënësi:</b><br>${data[id].q}</div><div class="bubble prince"><b>Princi:</b><br>${data[id].a}</div>`;
document.getElementById('p-pyetje').style.display = 'none';
document.getElementById('p-opsione').style.display = 'flex';
}
function vazhdo() {
document.getElementById('box').innerHTML += `<div class="bubble prince" style="background:#5d4a37;"><b>Princi:</b><br>${data[aktuale].v}</div>`;
}
function anulo() {
document.getElementById('box').innerHTML = `<p style="text-align: center; color: #8b7355; font-style: italic;">Zgjidhni një pyetje më poshtë...</p>`;
document.getElementById('p-opsione').style.display = 'none';
document.getElementById('p-pyetje').style.display = 'flex';
}
</script>
</body>
</html>