<!DOCTYPE html><h</button>
</div>
<div class="card" style="margin-top:15px">
<div class="icon">🪨</div>
<h3>سنگ، کاغذ، قیچی</h3>
<p id="rpsResult">یک گزینه انتخاب کن!</p>
<button class="secondary" onclick="playRPS('سنگ')">🪨 سنگ</button>
<button class="secondary" onclick="playRPS('کاغذ')">📄 کاغذ</button>
<button class="secondary" onclick="playRPS('قیچی')">✂️ قیچی</button>
</div>
</section><section class="page" id="profile">
<h2>👤 پروفایل من</h2>
<div class="card">
<p>اسمت رو وارد کن تا در مراجعات بعدی روی همین مرورگر نمایش داده بشه.</p>
<label for="nameInput">اسم نمایشی تو</label>
<input id="nameInput" maxlength="30" placeholder="مثلاً آراد">
<button class="primary" onclick="saveName()">💾 ذخیره اسم</button>
<p id="profileStatus"></p>
<p class="small">اسم فقط در حافظه همین مرورگر ذخیره میشه؛ این قابلیت حساب کاربری آنلاین نیست.</p>
</div>
</section><section class="page" id="themes">
<h2>🎨 دنیای رنگها</h2>
<p>تم موردعلاقهات رو انتخاب کن.</p>
<div class="card">
<button class="color-choice" style="background:linear-gradient(135deg,#a855f7,#ff3158)" aria-label="بنفش و قرمز" onclick="setTheme('purple')"></button>
<button class="color-choice" style="background:linear-gradient(135deg,#168cff,#15d6c5)" aria-label="آبی و فیروزهای" onclick="setTheme('blue')"></button>
<button class="color-choice" style="background:linear-gradient(135deg,#ff70b7,#ffb347)" aria-label="صورتی و نارنجی" onclick="setTheme('pink')"></button>
<button class="color-choice" style="background:linear-gradient(135deg,#36d399,#a3e635)" aria-label="سبز" onclick="setTheme('green')"></button>
<p id="themeStatus">تم بنفش و قرمز فعاله 💜❤️</p>
</div>
</section></main>
</div><footer>NEXORA ✦ ساختهشده برای لحظههای متفاوت تو</footer><script>
const $ = id => document.getElementById(id);
function safeGet(key, fallback = "") {
try {
return localStorage.getItem(key) || fallback;
} catch (e) {
return fallback;
}
}
function safeSet(key, value) {
try {
localStorage.setItem(key, value);
return true;
} catch (e) {
return false;
}
}
function showPage(id) {
document.querySelectorAll(".page").forEach(p => p.classList.remove("active"));
document.querySelectorAll(".nav-btn").forEach(b => b.classList.remove("active"));
const page = $(id);
if (page) page.classList.add("active");
const nav = document.querySelector('[data-page="' + id + '"]');
if (nav) nav.classList.add("active");
window.scrollTo({top: 0, behavior: "smooth"});
}
document.querySelectorAll(".nav-btn").forEach(btn => {
btn.addEventListener("click", () => showPage(btn.dataset.page));
});
function saveName() {
const name = $("nameInput").value.trim();
if (!name) {
$("profileStatus").textContent = "اول اسمت رو بنویس! 😊";
return;
}
if (safeSet("nexora_name", name)) {
updateName(name);
$("profileStatus").textContent = "اسمت ذخیره شد! خوش اومدی " + name + " 💜";
} else {
$("profileStatus").textContent = "ذخیرهسازی در این مرورگر در دسترس نیست.";
}
}
function updateName(name) {
$("welcomeName").textContent = name || "ماجراجو";
$("headerUser").textContent = name ? "خوش اومدی، " + name + " ✨" : "دنیای تو، قوانین تو ✨";
$("nameInput").value = name;
}
function setTheme(theme) {
const themes = {
purple: ["#100817", "#1d1028", "#a855f7", "#ff3158", "#ffffff", "#c5b6d2"],
blue: ["#071321", "#102638", "#168cff", "#15d6c5", "#ffffff", "#b5d4e5"],
pink: ["#1a0b15", "#301323", "#ff70b7", "#ffb347", "#ffffff", "#e5bfd3"],
green: ["#09150f", "#14291e", "#36d399", "#a3e635", "#ffffff", "#bfe0c9"]
};
const t = themes[theme] || themes.purple;
const root = document.documentElement;
["--bg", "--panel", "--purple", "--red", "--text", "--muted"].forEach((key, i) => {
root.style.setProperty(key, t[i]);
});
safeSet("nexora_theme", theme);
const labels = {
purple: "بنفش و قرمز 💜❤️",
blue: "آبی و فیروزهای 💙",
pink: "صورتی و نارنجی 💗",
green: "سبز 💚"
};
$("themeStatus").textContent = "تم " + labels[theme] + " فعاله!";
}
const challenges = {
brain: [
"چی همیشه جلو میره ولی هیچوقت راه نمیره؟ جواب رو حدس بزن!",
"سه چیز نام ببر که بدون برق هم کار میکنن.",
"اگر ۵ سیب داشته باشی و ۲ تا بدی، چند سیب میمونه؟"
],
fun: [
"یک اسم خندهدار برای یک ربات اختراع کن!",
"در سه کلمه یک داستان عجیب تعریف کن.",
"یک قدرت ابرقهرمانی عجیب برای خودت انتخاب کن!"
],
talk: [
"اگر میتونستی به هر جایی سفر کنی، کجا میرفتی؟",
"چه مهارتی رو دوست داری یاد بگیری؟",
"اگر یک بازی میساختی، موضوعش چی بود؟"
]
};
function challenge(type) {
const list = challenges[type] || Object.values(challenges).flat();
$("challengeText").textContent = list[Math.floor(Math.random() * list.length)];
}
function nextChallenge() {
const list = Object.values(challenges).flat();
$("challengeText").textContent = list[Math.floor(Math.random() * list.length)];
}
function randomNumber() {
$("randomResult").textContent = Math.floor(Math.random() * 100) + 1;
}
const quotes = [
"قدمهای کوچیک هم تو رو به هدف میرسونن. ✨",
"هر روز یک فرصت تازه برای یادگیریه. 💜",
"ایدههات ارزش امتحان کردن دارن. 🚀",
"قرار نیست کامل باشی؛ فقط ادامه بده. 🌱"
];
function randomQuote() {
$("quoteText").textContent = quotes[Math.floor(Math.random() * quotes.length)];
}
function playRPS(choice) {
const options = ["سنگ", "کاغذ", "قیچی"];
const bot = options[Math.floor(Math.random() * 3)];
let result;
if (choice === bot) result = "مساوی شدین! 😄";
else if (
(choice === "سنگ" && bot === "قیچی") ||
(choice === "کاغذ" && bot === "سنگ") ||
(choice === "قیچی" && bot === "کاغذ")
) result = "تو بردی! 🎉";
else result = "این دور من بردم! 🤖";
$("rpsResult").textContent = "تو: " + choice + " | من: " + bot + " — " + result;
}
function addMessage(text, type) {
const box = $("chatBox");
const msg = document.createElement("div");
msg.className = "message " + type;
msg.textContent = text;
box.appendChild(msg);
box.scrollTop = box.scrollHeight;
}
function getReply(text) {
const t = text.toLowerCase();
if (t.includes("سلام") || t.includes("درود")) {
return "سلام " + (safeGet("nexora_name", "دوست من")) + "! 💜 چه خبر؟";
>