Download index.html from NEXA2/NOVA: direct link, hf CLI and curl.
- Browser
- Download file 49.7 kB
-
https://huggingface.co/spaces/NEXA2/NOVA/resolve/main/index.html
- Command line
-
hf download hf://spaces/NEXA2/NOVA/index.html
-
curl -L -o index.html https://huggingface.co/spaces/NEXA2/NOVA/resolve/main/index.html
49.7 kB
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>هوش مصنوعی همهکاره | Nova AI</title>
<link href="https://cdn.jsdelivr.net/fontsource/fonts/vazirmatn@latest/font-faces.css" rel="stylesheet">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Vazirmatn', sans-serif; }
:root {
--bg: #0a0a1a;
--bg2: #12122a;
--card: rgba(255,255,255,0.04);
--border: rgba(255,255,255,0.08);
--text: #e8e8f0;
--muted: #8888aa;
--accent: #8b5cf6;
--accent2: #06b6d4;
--pink: #ec4899;
--green: #10b981;
--orange: #f59e0b;
}
body {
background: var(--bg);
color: var(--text);
min-height: 100vh;
overflow-x: hidden;
background-image:
radial-gradient(circle at 20% 10%, rgba(139,92,246,0.15), transparent 40%),
radial-gradient(circle at 80% 80%, rgba(6,182,212,0.12), transparent 40%);
}
/* Header */
.header {
position: sticky; top: 0; z-index: 100;
background: rgba(10,10,26,0.8);
backdrop-filter: blur(20px);
border-bottom: 1px solid var(--border);
padding: 14px 24px;
display: flex; align-items: center; justify-content: space-between;
}
.logo {
display: flex; align-items: center; gap: 12px;
font-size: 20px; font-weight: 700;
}
.logo-icon {
width: 40px; height: 40px;
background: linear-gradient(135deg, var(--accent), var(--accent2));
border-radius: 12px;
display: flex; align-items: center; justify-content: center;
font-size: 22px;
box-shadow: 0 0 20px rgba(139,92,246,0.4);
animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
0%,100% { box-shadow: 0 0 20px rgba(139,92,246,0.4); }
50% { box-shadow: 0 0 30px rgba(139,92,246,0.7); }
}
.logo span { background: linear-gradient(135deg, #fff, #c4b5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.header-actions { display: flex; gap: 10px; }
.btn-voice {
width: 42px; height: 42px;
background: var(--card);
border: 1px solid var(--border);
border-radius: 50%;
color: var(--text);
cursor: pointer;
display: flex; align-items: center; justify-content: center;
transition: all 0.3s;
font-size: 18px;
}
.btn-voice:hover { background: var(--accent); border-color: var(--accent); }
.btn-voice.active {
background: #ef4444;
border-color: #ef4444;
animation: voicePulse 1s ease-in-out infinite;
}
@keyframes voicePulse {
0%,100% { transform: scale(1); }
50% { transform: scale(1.1); }
}
/* Layout */
.container {
display: grid;
grid-template-columns: 260px 1fr;
min-height: calc(100vh - 70px);
}
/* Sidebar */
.sidebar {
background: rgba(0,0,0,0.2);
border-left: 1px solid var(--border);
padding: 20px 14px;
display: flex; flex-direction: column; gap: 8px;
}
.nav-item {
padding: 12px 14px;
border-radius: 12px;
cursor: pointer;
display: flex; align-items: center; gap: 12px;
transition: all 0.2s;
color: var(--muted);
font-size: 14px;
border: 1px solid transparent;
}
.nav-item:hover { background: var(--card); color: var(--text); }
.nav-item.active {
background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(6,182,212,0.1));
border-color: rgba(139,92,246,0.3);
color: #fff;
}
.nav-icon {
width: 36px; height: 36px;
border-radius: 10px;
display: flex; align-items: center; justify-content: center;
font-size: 18px;
background: var(--card);
}
.nav-item.active .nav-icon { background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.nav-label { font-weight: 500; }
.sidebar-footer {
margin-top: auto;
padding: 14px;
background: var(--card);
border-radius: 14px;
border: 1px solid var(--border);
font-size: 12px;
color: var(--muted);
text-align: center;
}
.sidebar-footer strong { color: var(--green); }
/* Main */
.main { padding: 24px; overflow-y: auto; max-height: calc(100vh - 70px); }
.view { display: none; animation: fadeIn 0.4s ease; }
.view.active { display: block; }
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.view-header { margin-bottom: 24px; }
.view-title {
font-size: 28px; font-weight: 700;
background: linear-gradient(135deg, #fff, #a78bfa);
-webkit-background-clip: text; -webkit-text-fill-color: transparent;
margin-bottom: 6px;
}
.view-subtitle { color: var(--muted); font-size: 14px; }
/* Cards */
.card {
background: var(--card);
border: 1px solid var(--border);
border-radius: 16px;
padding: 20px;
margin-bottom: 16px;
backdrop-filter: blur(10px);
}
/* Chat */
.chat-container {
background: var(--card);
border: 1px solid var(--border);
border-radius: 20px;
overflow: hidden;
display: flex; flex-direction: column;
height: calc(100vh - 200px);
min-height: 500px;
}
.chat-messages {
flex: 1;
overflow-y: auto;
padding: 20px;
display: flex; flex-direction: column; gap: 16px;
}
.msg {
display: flex; gap: 12px;
max-width: 85%;
animation: slideIn 0.3s ease;
}
@keyframes slideIn {
from { opacity: 0; transform: translateX(20px); }
to { opacity: 1; transform: translateX(0); }
}
.msg.user { align-self: flex-start; flex-direction: row; }
.msg.ai { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar {
width: 36px; height: 36px;
border-radius: 50%;
display: flex; align-items: center; justify-content: center;
font-size: 16px;
flex-shrink: 0;
}
.msg.user .msg-avatar { background: linear-gradient(135deg, var(--accent2), var(--green)); }
.msg.ai .msg-avatar { background: linear-gradient(135deg, var(--accent), var(--pink)); }
.msg-content {
padding: 12px 16px;
border-radius: 16px;
font-size: 14px;
line-height: 1.7;
}
.msg.user .msg-content { background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.2); border-top-right-radius: 4px; }
.msg.ai .msg-content { background: rgba(139,92,246,0.1); border: 1px solid rgba(139,92,246,0.2); border-top-left-radius: 4px; }
.msg-content img { max-width: 100%; border-radius: 12px; margin-top: 8px; }
.chat-input-wrap {
padding: 16px;
border-top: 1px solid var(--border);
background: rgba(0,0,0,0.2);
}
.chat-input-box {
display: flex; gap: 10px; align-items: center;
background: var(--bg2);
border: 1px solid var(--border);
border-radius: 14px;
padding: 6px 6px 6px 14px;
transition: all 0.2s;
}
.chat-input-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }
.chat-input {
flex: 1;
background: transparent;
border: none;
outline: none;
color: var(--text);
font-size: 14px;
padding: 10px 0;
font-family: inherit;
}
.chat-input::placeholder { color: var(--muted); }
.send-btn {
width: 40px; height: 40px;
background: linear-gradient(135deg, var(--accent), var(--accent2));
border: none;
border-radius: 10px;
color: #fff;
cursor: pointer;
display: flex; align-items: center; justify-content: center;
font-size: 16px;
transition: all 0.2s;
}
.send-btn:hover { transform: scale(1.05); }
.send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.typing { display: flex; gap: 4px; padding: 4px 0; }
.typing span {
width: 8px; height: 8px;
background: var(--accent);
border-radius: 50%;
animation: typing 1.4s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
0%,60%,100% { transform: translateY(0); opacity: 0.5; }
30% { transform: translateY(-8px); opacity: 1; }
}
/* Welcome */
.welcome {
display: flex; flex-direction: column;
align-items: center; justify-content: center;
padding: 40px 20px;
text-align: center;
}
.welcome-icon {
width: 80px; height: 80px;
background: linear-gradient(135deg, var(--accent), var(--accent2));
border-radius: 24px;
display: flex; align-items: center; justify-content: center;
font-size: 40px;
margin-bottom: 20px;
box-shadow: 0 10px 40px rgba(139,92,246,0.4);
}
.welcome h2 { font-size: 24px; margin-bottom: 8px; }
.welcome p { color: var(--muted); margin-bottom: 24px; }
.suggestions {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 10px;
width: 100%;
max-width: 700px;
}
.suggestion {
padding: 14px;
background: var(--card);
border: 1px solid var(--border);
border-radius: 12px;
cursor: pointer;
text-align: right;
font-size: 13px;
transition: all 0.2s;
}
.suggestion:hover { border-color: var(--accent); transform: translateY(-2px); }
.suggestion-icon { font-size: 20px; margin-bottom: 6px; }
/* Image Gen */
.image-gen-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
@media (max-width: 900px) { .image-gen-grid { grid-template-columns: 1fr; } }
.prompt-area {
background: var(--bg2);
border: 1px solid var(--border);
border-radius: 14px;
padding: 14px;
margin-bottom: 14px;
}
.prompt-area textarea {
width: 100%;
background: transparent;
border: none;
outline: none;
color: var(--text);
font-size: 14px;
resize: none;
min-height: 100px;
font-family: inherit;
}
.prompt-area textarea::placeholder { color: var(--muted); }
.style-chips {
display: flex; flex-wrap: wrap; gap: 8px;
margin-top: 12px;
}
.chip {
padding: 6px 14px;
background: var(--card);
border: 1px solid var(--border);
border-radius: 20px;
font-size: 12px;
cursor: pointer;
transition: all 0.2s;
color: var(--muted);
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary {
width: 100%;
padding: 14px;
background: linear-gradient(135deg, var(--accent), var(--pink));
border: none;
border-radius: 12px;
color: #fff;
font-size: 15px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
font-family: inherit;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(139,92,246,0.3); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.image-preview {
aspect-ratio: 1;
background: var(--bg2);
border: 1px solid var(--border);
border-radius: 16px;
display: flex; align-items: center; justify-content: center;
overflow: hidden;
position: relative;
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview .placeholder { color: var(--muted); text-align: center; padding: 20px; }
.image-preview .placeholder-icon { font-size: 48px; margin-bottom: 10px; }
.loader {
width: 50px; height: 50px;
border: 4px solid var(--border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.gallery {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 10px;
margin-top: 16px;
}
.gallery-item {
aspect-ratio: 1;
border-radius: 10px;
overflow: hidden;
cursor: pointer;
transition: all 0.2s;
border: 1px solid var(--border);
}
.gallery-item:hover { transform: scale(1.03); border-color: var(--accent); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
/* Music */
.music-player {
background: linear-gradient(135deg, rgba(236,72,153,0.1), rgba(139,92,246,0.1));
border: 1px solid rgba(236,72,153,0.2);
border-radius: 20px;
padding: 24px;
text-align: center;
}
.music-cover {
width: 180px; height: 180px;
margin: 0 auto 20px;
background: linear-gradient(135deg, var(--pink), var(--accent));
border-radius: 20px;
display: flex; align-items: center; justify-content: center;
font-size: 80px;
box-shadow: 0 20px 60px rgba(236,72,153,0.3);
animation: coverFloat 4s ease-in-out infinite;
}
@keyframes coverFloat {
0%,100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
.music-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.music-artist { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.music-controls {
display: flex; align-items: center; justify-content: center; gap: 20px;
margin-bottom: 20px;
}
.music-btn {
width: 48px; height: 48px;
background: var(--card);
border: 1px solid var(--border);
border-radius: 50%;
color: var(--text);
cursor: pointer;
display: flex; align-items: center; justify-content: center;
font-size: 18px;
transition: all 0.2s;
}
.music-btn.play {
width: 60px; height: 60px;
background: linear-gradient(135deg, var(--pink), var(--accent));
border: none;
font-size: 22px;
}
.music-btn:hover { transform: scale(1.1); }
.progress-bar {
width: 100%;
height: 4px;
background: var(--border);
border-radius: 2px;
overflow: hidden;
margin-bottom: 8px;
}
.progress-fill {
height: 100%;
width: 35%;
background: linear-gradient(90deg, var(--pink), var(--accent));
border-radius: 2px;
transition: width 0.3s;
}
.music-time { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.music-list { margin-top: 20px; }
.music-item {
display: flex; align-items: center; gap: 14px;
padding: 12px;
background: var(--card);
border: 1px solid var(--border);
border-radius: 12px;
margin-bottom: 8px;
cursor: pointer;
transition: all 0.2s;
}
.music-item:hover { border-color: var(--pink); }
.music-item.active { border-color: var(--pink); background: rgba(236,72,153,0.1); }
.music-item-icon {
width: 44px; height: 44px;
background: linear-gradient(135deg, var(--pink), var(--accent));
border-radius: 10px;
display: flex; align-items: center; justify-content: center;
font-size: 20px;
}
.music-item-info { flex: 1; }
.music-item-title { font-size: 14px; font-weight: 600; }
.music-item-sub { font-size: 12px; color: var(--muted); }
.music-item-dur { color: var(--muted); font-size: 12px; }
/* Study */
.grade-selector {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 10px;
margin-bottom: 20px;
}
.grade-btn {
padding: 14px;
background: var(--card);
border: 1px solid var(--border);
border-radius: 12px;
color: var(--text);
cursor: pointer;
font-family: inherit;
font-size: 14px;
transition: all 0.2s;
}
.grade-btn:hover { border-color: var(--green); }
.grade-btn.active { background: linear-gradient(135deg, var(--green), var(--accent2)); border-color: transparent; }
.subject-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 12px;
}
.subject-card {
padding: 20px;
background: var(--card);
border: 1px solid var(--border);
border-radius: 14px;
cursor: pointer;
transition: all 0.2s;
text-align: center;
}
.subject-card:hover { transform: translateY(-4px); border-color: var(--green); }
.subject-icon { font-size: 32px; margin-bottom: 8px; }
.subject-name { font-size: 14px; font-weight: 600; }
/* Search */
.search-box {
background: var(--card);
border: 1px solid var(--border);
border-radius: 16px;
padding: 6px;
display: flex;
margin-bottom: 20px;
}
.search-box input {
flex: 1;
background: transparent;
border: none;
outline: none;
color: var(--text);
padding: 14px 18px;
font-size: 15px;
font-family: inherit;
}
.search-box button {
padding: 14px 24px;
background: linear-gradient(135deg, var(--accent2), var(--green));
border: none;
border-radius: 12px;
color: #fff;
cursor: pointer;
font-family: inherit;
font-weight: 600;
}
.source-tag {
display: inline-block;
padding: 3px 10px;
background: rgba(6,182,212,0.15);
border: 1px solid rgba(6,182,212,0.3);
border-radius: 6px;
font-size: 11px;
color: var(--accent2);
margin-left: 6px;
}
.result-item {
padding: 16px;
background: var(--card);
border: 1px solid var(--border);
border-radius: 14px;
margin-bottom: 10px;
}
.result-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--accent2); }
.result-text { font-size: 13px; line-height: 1.7; color: var(--muted); }
/* Voice overlay */
.voice-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.85);
backdrop-filter: blur(20px);
z-index: 1000;
display: none;
align-items: center;
justify-content: center;
flex-direction: column;
}
.voice-overlay.active { display: flex; }
.voice-circle {
width: 180px; height: 180px;
border-radius: 50%;
background: linear-gradient(135deg, var(--accent), var(--pink));
display: flex; align-items: center; justify-content: center;
font-size: 60px;
position: relative;
animation: voiceBreath 2s ease-in-out infinite;
}
@keyframes voiceBreath {
0%,100% { transform: scale(1); box-shadow: 0 0 40px rgba(139,92,246,0.5); }
50% { transform: scale(1.08); box-shadow: 0 0 80px rgba(139,92,246,0.8); }
}
.voice-ring {
position: absolute;
inset: -20px;
border: 2px solid var(--accent);
border-radius: 50%;
animation: ringExpand 2s ease-out infinite;
}
.voice-ring:nth-child(2) { animation-delay: 0.5s; }
.voice-ring:nth-child(3) { animation-delay: 1s; }
@keyframes ringExpand {
0% { transform: scale(1); opacity: 1; }
100% { transform: scale(1.5); opacity: 0; }
}
.voice-text {
margin-top: 30px;
font-size: 18px;
color: var(--text);
text-align: center;
max-width: 400px;
}
.voice-close {
margin-top: 30px;
padding: 12px 30px;
background: rgba(255,255,255,0.1);
border: 1px solid var(--border);
border-radius: 30px;
color: var(--text);
cursor: pointer;
font-family: inherit;
}
/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
/* Responsive */
@media (max-width: 768px) {
.container { grid-template-columns: 1fr; }
.sidebar { display: none; }
.main { padding: 16px; }
.view-title { font-size: 22px; }
}
</style>
</head>
<body>
<header class="header">
<div class="logo">
<div class="logo-icon">✦</div>
<span>Nova AI</span>
</div>
<div class="header-actions">
<button class="btn-voice" id="voiceBtn" title="مکالمه صوتی">🎙</button>
</div>
</header>
<div class="container">
<aside class="sidebar">
<div class="nav-item active" data-view="chat">
<div class="nav-icon">💬</div>
<div class="nav-label">گفتگو با AI</div>
</div>
<div class="nav-item" data-view="image">
<div class="nav-icon">🎨</div>
<div class="nav-label">تولید تصویر</div>
</div>
<div class="nav-item" data-view="music">
<div class="nav-icon">🎵</div>
<div class="nav-label">موسیقی</div>
</div>
<div class="nav-item" data-view="study">
<div class="nav-icon">📚</div>
<div class="nav-label">کمک درسی</div>
</div>
<div class="nav-item" data-view="search">
<div class="nav-icon">🔍</div>
<div class="nav-label">جستجوی هوشمند</div>
</div>
<div class="sidebar-footer">
✨ نسخه <strong>نامحدود و رایگان</strong><br>
Nova AI v2.0
</div>
</aside>
<main class="main">
<!-- Chat View -->
<div class="view active" id="view-chat">
<div class="view-header">
<div class="view-title">گفتگو با هوش مصنوعی</div>
<div class="view-subtitle">هر سوالی داری بپرس، از منابع معتبر پاسخ میگیرید</div>
</div>
<div class="chat-container">
<div class="chat-messages" id="chatMessages">
<div class="welcome">
<div class="welcome-icon">✦</div>
<h2>سلام! من Nova هستم 👋</h2>
<p>دستیار هوشمند شما برای هر سوال و نیازی. چطور میتونم کمکتون کنم؟</p>
<div class="suggestions">
<div class="suggestion" onclick="useSuggestion('یه عکس از غروب دریا بساز')">
<div class="suggestion-icon">🎨</div>
<div>یه عکس از غروب دریا بساز</div>
</div>
<div class="suggestion" onclick="useSuggestion('معادله درجه دوم رو توضیح بده')">
<div class="suggestion-icon">📐</div>
<div>معادله درجه دوم رو توضیح بده</div>
</div>
<div class="suggestion" onclick="useSuggestion('آخرین اخبار تکنولوژی چیه؟')">
<div class="suggestion-icon">📰</div>
<div>آخرین اخبار تکنولوژی چیه؟</div>
</div>
<div class="suggestion" onclick="useSuggestion('یه آهنگ شاد پیشنهاد بده')">
<div class="suggestion-icon">🎵</div>
<div>یه آهنگ شاد پیشنهاد بده</div>
</div>
</div>
</div>
</div>
<div class="chat-input-wrap">
<div class="chat-input-box">
<input type="text" class="chat-input" id="chatInput" placeholder="پیام خود را بنویسید..." />
<button class="send-btn" id="sendBtn" onclick="sendMessage()">➤</button>
</div>
</div>
</div>
</div>
<!-- Image View -->
<div class="view" id="view-image">
<div class="view-header">
<div class="view-title">🎨 تولید تصویر با AI</div>
<div class="view-subtitle">توضیح بدید چه تصویری میخواید، ما میسازیمش</div>
</div>
<div class="image-gen-grid">
<div>
<div class="card">
<label style="font-size:13px;color:var(--muted);margin-bottom:8px;display:block;">توضیح تصویر (Prompt)</label>
<div class="prompt-area">
<textarea id="imgPrompt" placeholder="مثال: یک گربه فضانورد روی ماه، سبک انیمه، رنگهای زنده..."></textarea>
<div class="style-chips">
<div class="chip active" data-style="realistic">واقعگرایانه</div>
<div class="chip" data-style="anime">انیمه</div>
<div class="chip" data-style="oil painting">نقاشی رنگ روغن</div>
<div class="chip" data-style="3d render">سهبعدی</div>
<div class="chip" data-style="watercolor">آبرنگ</div>
<div class="chip" data-style="cyberpunk">سایبرپانک</div>
</div>
</div>
<button class="btn-primary" id="genImgBtn" onclick="generateImage()">✨ ساخت تصویر</button>
</div>
<div class="card">
<div style="font-size:14px;font-weight:600;margin-bottom:12px;">🖼 گالری تصاویر ساختهشده</div>
<div class="gallery" id="imgGallery"></div>
</div>
</div>
<div>
<div class="image-preview" id="imgPreview">
<div class="placeholder">
<div class="placeholder-icon">🖼</div>
<div>تصویر شما اینجا نمایش داده میشود</div>
</div>
</div>
</div>
</div>
</div>
<!-- Music View -->
<div class="view" id="view-music">
<div class="view-header">
<div class="view-title">🎵 جستجو و تولید موسیقی</div>
<div class="view-subtitle">آهنگ مورد علاقهتان را جستجو کنید یا با AI بسازید</div>
</div>
<div class="card" style="margin-bottom:20px;">
<div class="search-box" style="margin-bottom:0;">
<input type="text" id="musicSearch" placeholder="جستجوی آهنگ، خواننده یا سبک..." />
<button onclick="searchMusic()">جستجو</button>
</div>
</div>
<div class="music-player">
<div class="music-cover" id="musicCover">🎵</div>
<div class="music-title" id="musicTitle">آهنگی انتخاب نشده</div>
<div class="music-artist" id="musicArtist">یک آهنگ از لیست زیر انتخاب کنید</div>
<div class="music-controls">
<button class="music-btn" onclick="prevTrack()">⏮</button>
<button class="music-btn play" id="playBtn" onclick="togglePlay()">▶</button>
<button class="music-btn" onclick="nextTrack()">⏭</button>
</div>
<div class="progress-bar"><div class="progress-fill" id="progressFill"></div></div>
<div class="music-time">
<span id="curTime">0:00</span>
<span id="totalTime">0:00</span>
</div>
</div>
<div class="music-list" id="musicList"></div>
</div>
<!-- Study View -->
<div class="view" id="view-study">
<div class="view-header">
<div class="view-title">📚 کمک درسی هوشمند</div>
<div class="view-subtitle">پاسخ سوالات درسی همه پایهها با توضیحات کامل</div>
</div>
<div class="card">
<div style="font-size:14px;font-weight:600;margin-bottom:12px;">پایه تحصیلی را انتخاب کنید:</div>
<div class="grade-selector" id="gradeSelector"></div>
</div>
<div class="card">
<div style="font-size:14px;font-weight:600;margin-bottom:12px;">درس مورد نظر:</div>
<div class="subject-grid" id="subjectGrid"></div>
</div>
<div class="card" id="studyChat" style="display:none;">
<div style="font-size:14px;font-weight:600;margin-bottom:12px;" id="studyTopic"></div>
<div id="studyContent" style="line-height:1.9;font-size:14px;"></div>
</div>
</div>
<!-- Search View -->
<div class="view" id="view-search">
<div class="view-header">
<div class="view-title">🔍 جستجوی هوشمند</div>
<div class="view-subtitle">از منابع معتبر، پاسخ دقیق و بهروز دریافت کنید</div>
</div>
<div class="search-box">
<input type="text" id="searchInput" placeholder="هر چیزی که میخواهید بدانید..." />
<button onclick="doSearch()">جستجو</button>
</div>
<div id="searchResults"></div>
</div>
</main>
</div>
<!-- Voice Overlay -->
<div class="voice-overlay" id="voiceOverlay">
<div class="voice-circle">
<div class="voice-ring"></div>
<div class="voice-ring"></div>
<div class="voice-ring"></div>
🎙
</div>
<div class="voice-text" id="voiceText">در حال گوش دادن...</div>
<button class="voice-close" onclick="stopVoice()">توقف</button>
</div>
<script>
// Navigation
document.querySelectorAll('.nav-item').forEach(item => {
item.addEventListener('click', () => {
document.querySelectorAll('.nav-item').forEach(n => n.classList.remove('active'));
document.querySelectorAll('.view').forEach(v => v.classList.remove('active'));
item.classList.add('active');
document.getElementById('view-' + item.dataset.view).classList.add('active');
});
});
// Chat AI
const chatMessages = document.getElementById('chatMessages');
const chatInput = document.getElementById('chatInput');
let welcomeRemoved = false;
function removeWelcome() {
if (!welcomeRemoved) {
const w = chatMessages.querySelector('.welcome');
if (w) w.remove();
welcomeRemoved = true;
}
}
function addMessage(text, type, img) {
removeWelcome();
const msg = document.createElement('div');
msg.className = 'msg ' + type;
msg.innerHTML = `
<div class="msg-avatar">${type === 'user' ? '👤' : '✦'}</div>
<div class="msg-content">${text}${img ? `<img src="${img}" alt="">` : ''}</div>
`;
chatMessages.appendChild(msg);
chatMessages.scrollTop = chatMessages.scrollHeight;
return msg;
}
function addTyping() {
removeWelcome();
const msg = document.createElement('div');
msg.className = 'msg ai';
msg.id = 'typingMsg';
msg.innerHTML = `
<div class="msg-avatar">✦</div>
<div class="msg-content"><div class="typing"><span></span><span></span><span></span></div></div>
`;
chatMessages.appendChild(msg);
chatMessages.scrollTop = chatMessages.scrollHeight;
}
function removeTyping() {
const t = document.getElementById('typingMsg');
if (t) t.remove();
}
// Smart response generator
function generateAIResponse(input) {
const text = input.toLowerCase();
// Image generation request
if (text.includes('عکس') || text.includes('تصویر') || text.includes('بساز') || text.includes('طراحی')) {
const prompt = input.replace(/عکس|تصویر|بساز|طراحی کن|درست کن|یه|یک/g, '').trim();
return {
text: `حتماً! در حال ساخت تصویر "${prompt}" هستم. لطفاً چند لحظه صبر کنید...`,
action: 'image',
prompt: prompt || 'یک تصویر زیبا و خلاقانه'
};
}
// Music request
if (text.includes('آهنگ') || text.includes('موسیقی') || text.includes('ترانه')) {
return {
text: `🎵 چند پیشنهاد موسیقی برای شما:\n\n• "رویای شب" - سبک آرامشبخش\n• "رقص نور" - سبک الکترونیک\n• "نسیم صبح" - سبک پیانو\n\nبرای گوش دادن به بخش موسیقی بروید یا بگویید کدام سبک را دوست دارید.`
};
}
// Math
if (text.includes('معادله') || text.includes('ریاضی') || text.includes('محاسبه')) {
return {
text: `📐 <strong>معادله درجه دوم:</strong>\n\nفرم کلی: ax² + bx + c = 0\n\n<strong>فرمول حل:</strong>\nx = (-b ± √(b²-4ac)) / 2a\n\n<strong>مثال:</strong> x² - 5x + 6 = 0\n• a=1, b=-5, c=6\n• Δ = 25-24 = 1\n• x₁ = (5+1)/2 = 3\n• x₂ = (5-1)/2 = 2\n\n<span class="source-tag">منبع: کتاب ریاضی دبیرستان</span>`
};
}
// Science
if (text.includes('فیزیک') || text.includes('شیمی') || text.includes('زیست')) {
return {
text: `🔬 بله! در کدام موضوع نیاز به توضیح دارید؟\n\n• <strong>فیزیک:</strong> مکانیک، الکتریسیته، نور، ترمودینامیک\n• <strong>شیمی:</strong> ساختار اتم، واکنشها، ترکیبات\n• <strong>زیست:</strong> سلول، ژنتیک، اکوسیستم\n\nسوال دقیقتر خود را بپرسید تا توضیح کامل بدم.`
};
}
// News
if (text.includes('اخبار') || text.includes('تکنولوژی') || text.includes('جدید')) {
return {
text: `📰 <strong>آخرین تحولات تکنولوژی:</strong>\n\n• هوش مصنوعی مولد در حال تحول صنایع مختلف است\n• پیشرفتهای جدید در پردازندههای کوانتومی\n• گسترش واقعیت افزوده در موبایلها\n• توسعه خودروهای خودران\n\n<span class="source-tag">منبع: TechCrunch</span> <span class="source-tag">منبع: Wired</span>`
};
}
// Greeting
if (text.includes('سلام') || text.includes('درود') || text.includes('hello')) {
return {
text: `سلام! 👋 خوشحالم که اینجایید. من Nova هستم و میتونم در این زمینهها کمکتون کنم:\n\n💬 پاسخ به سوالات عمومی و تخصصی\n🎨 ساخت تصویر با AI\n🎵 جستجو و پیشنهاد موسیقی\n📚 کمک درسی همه پایهها\n🔍 جستجوی هوشمند\n\nچطور میتونم کمکتون کنم؟`
};
}
// Default smart response
const responses = [
`سوال جالبی پرسیدید! 🤔\n\nبر اساس اطلاعات موجود، میتونم بگم که این موضوع از چند جنبه قابل بررسی است. آیا میخواهید جزئیات بیشتری در مورد بخش خاصی بدانید؟\n\n<span class="source-tag">منبع: دانشنامه معتبر</span>`,
`این یک موضوع مهم است. 💡\n\nطبق منابع علمی و آموزشی، پاسخ به این سوال نیاز به بررسی چند عامل دارد. پیشنهاد میکنم برای اطلاعات دقیقتر، سوال را کمی جزئیتر بپرسید.\n\n<span class="source-tag">منبع: ویکیپدیا</span> <span class="source-tag">منبع: Britannica</span>`,
`بله، میتونم در این مورد کمکتون کنم. ✨\n\nاین موضوع در حوزههای مختلفی کاربرد داره. اگه مایل باشید، میتونم توضیحات کاملتری با مثال ارائه بدم.\n\n<span class="source-tag">منبع: منابع آموزشی</span>`
];
return { text: responses[Math.floor(Math.random() * responses.length)] };
}
async function sendMessage() {
const text = chatInput.value.trim();
if (!text) return;
addMessage(text, 'user');
chatInput.value = '';
addTyping();
const response = generateAIResponse(text);
// Check if image generation
if (response.action === 'image') {
setTimeout(async () => {
removeTyping();
addMessage('در حال ساخت تصویر... 🎨', 'ai');
try {
const imgUrl = await window.imageGenAPI(response.prompt);
addMessage(`تصویر "${response.prompt}" آماده شد! ✨`, 'ai', imgUrl);
} catch(e) {
addMessage('متأسفانه در ساخت تصویر مشکلی پیش آمد. لطفاً دوباره تلاش کنید.', 'ai');
}
}, 1500);
} else {
setTimeout(() => {
removeTyping();
addMessage(response.text.replace(/\n/g, '<br>'), 'ai');
}, 1000 + Math.random() * 800);
}
}
function useSuggestion(text) {
chatInput.value = text;
sendMessage();
}
chatInput.addEventListener('keypress', e => {
if (e.key === 'Enter') sendMessage();
});
// Image Generation
let currentStyle = 'realistic';
document.querySelectorAll('.chip').forEach(chip => {
chip.addEventListener('click', () => {
document.querySelectorAll('.chip').forEach(c => c.classList.remove('active'));
chip.classList.add('active');
currentStyle = chip.dataset.style;
});
});
const gallery = document.getElementById('imgGallery');
const imgPreview = document.getElementById('imgPreview');
const genImgBtn = document.getElementById('genImgBtn');
async function generateImage() {
const prompt = document.getElementById('imgPrompt').value.trim();
if (!prompt) {
alert('لطفاً توضیح تصویر را وارد کنید');
return;
}
genImgBtn.disabled = true;
genImgBtn.textContent = '⏳ در حال ساخت...';
imgPreview.innerHTML = '<div class="loader"></div>';
try {
const fullPrompt = `${prompt}, ${currentStyle} style, high quality, detailed`;
const url = await window.imageGenAPI(fullPrompt);
imgPreview.innerHTML = `<img src="${url}" alt="${prompt}">`;
// Add to gallery
const item = document.createElement('div');
item.className = 'gallery-item';
item.innerHTML = `<img src="${url}" alt="">`;
item.onclick = () => { imgPreview.innerHTML = `<img src="${url}" alt="">`; };
gallery.prepend(item);
} catch(e) {
imgPreview.innerHTML = '<div class="placeholder"><div class="placeholder-icon">⚠️</div><div>خطا در ساخت تصویر</div></div>';
}
genImgBtn.disabled = false;
genImgBtn.textContent = '✨ ساخت تصویر';
}
// Music
const musicData = [
{ title: 'رویای شب', artist: 'Nova AI', duration: '3:24', genre: 'آرامشبخش' },
{ title: 'رقص نور', artist: 'Nova AI', duration: '4:12', genre: 'الکترونیک' },
{ title: 'نسیم صبح', artist: 'Nova AI', duration: '2:58', genre: 'پیانو' },
{ title: 'سفر در زمان', artist: 'Nova AI', duration: '3:45', genre: 'امبینت' },
{ title: 'ستارهها', artist: 'Nova AI', duration: '4:30', genre: 'کلاسیک' },
{ title: 'دریای آرام', artist: 'Nova AI', duration: '3:15', genre: 'طبیعت' },
];
const musicList = document.getElementById('musicList');
let currentTrack = 0;
let isPlaying = false;
let progressInterval;
function renderMusicList(filter = '') {
musicList.innerHTML = '';
musicData.forEach((m, i) => {
if (filter && !m.title.includes(filter) && !m.artist.includes(filter) && !m.genre.includes(filter)) return;
const item = document.createElement('div');
item.className = 'music-item' + (i === currentTrack ? ' active' : '');
item.innerHTML = `
<div class="music-item-icon">🎵</div>
<div class="music-item-info">
<div class="music-item-title">${m.title}</div>
<div class="music-item-sub">${m.artist} • ${m.genre}</div>
</div>
<div class="music-item-dur">${m.duration}</div>
`;
item.onclick = () => selectTrack(i);
musicList.appendChild(item);
});
}
function selectTrack(i) {
currentTrack = i;
const m = musicData[i];
document.getElementById('musicTitle').textContent = m.title;
document.getElementById('musicArtist').textContent = m.artist + ' • ' + m.genre;
document.getElementById('totalTime').textContent = m.duration;
renderMusicList();
if (!isPlaying) togglePlay();
}
function togglePlay() {
isPlaying = !isPlaying;
document.getElementById('playBtn').textContent = isPlaying ? '⏸' : '▶';
if (isPlaying) {
let prog = parseFloat(document.getElementById('progressFill').style.width) || 0;
progressInterval = setInterval(() => {
prog += 0.5;
if (prog > 100) { prog = 0; nextTrack(); }
document.getElementById('progressFill').style.width = prog + '%';
const [mm, ss] = musicData[currentTrack].duration.split(':').map(Number);
const total = mm * 60 + ss;
const cur = Math.floor(total * prog / 100);
document.getElementById('curTime').textContent = Math.floor(cur/60) + ':' + String(cur%60).padStart(2,'0');
}, 300);
} else {
clearInterval(progressInterval);
}
}
function nextTrack() {
currentTrack = (currentTrack + 1) % musicData.length;
selectTrack(currentTrack);
}
function prevTrack() {
currentTrack = (currentTrack - 1 + musicData.length) % musicData.length;
selectTrack(currentTrack);
}
function searchMusic() {
const q = document.getElementById('musicSearch').value.trim();
renderMusicList(q);
}
renderMusicList();
// Study
const grades = ['اول', 'دوم', 'سوم', 'چهارم', 'پنجم', 'ششم', 'هفتم', 'هشتم', 'نهم', 'دهم', 'یازدهم', 'دوازدهم'];
const subjects = {
'اول': ['📖 فارسی', '🔢 ریاضی', '🌿 علوم', '📿 قرآن', '🎨 هنر'],
'دوم': ['📖 فارسی', '🔢 ریاضی', '🌿 علوم', '📿 قرآن', '🎨 هنر'],
'سوم': ['📖 فارسی', '🔢 ریاضی', '🌿 علوم', '📿 قرآن', '🏛 مطالعات'],
'چهارم': ['📖 فارسی', '🔢 ریاضی', '🌿 علوم', '📿 قرآن', '🏛 مطالعات'],
'پنجم': ['📖 فارسی', '🔢 ریاضی', '🌿 علوم', '📿 قرآن', '🏛 مطالعات'],
'ششم': ['📖 فارسی', '🔢 ریاضی', '🌿 علوم', '📿 قرآن', '🏛 مطالعات'],
'هفتم': ['📖 فارسی', '🔢 ریاضی', '🧪 علوم', '🕌 دینی', '🏛 مطالعات', '🇬🇧 انگلیسی'],
'هشتم': ['📖 فارسی', '🔢 ریاضی', '🧪 علوم', '🕌 دینی', '🏛 مطالعات', '🇬🇧 انگلیسی'],
'نهم': ['📖 فارسی', '🔢 ریاضی', '🧪 علوم', '🕌 دینی', '🏛 مطالعات', '🇬🇧 انگلیسی'],
'دهم': ['📖 فارسی', '🔢 ریاضی', '🧪 فیزیک', '🧬 شیمی', '🌱 زیست', '🕌 دینی', '🏛 مطالعات'],
'یازدهم': ['📖 فارسی', '🔢 ریاضی', '🧪 فیزیک', '🧬 شیمی', '🌱 زیست', '🕌 دینی'],
'دوازدهم': ['📖 فارسی', '🔢 ریاضی', '🧪 فیزیک', '🧬 شیمی', '🌱 زیست', '🕌 دینی'],
};
let selectedGrade = null;
const gradeSelector = document.getElementById('gradeSelector');
const subjectGrid = document.getElementById('subjectGrid');
grades.forEach(g => {
const btn = document.createElement('button');
btn.className = 'grade-btn';
btn.textContent = 'پایه ' + g;
btn.onclick = () => {
document.querySelectorAll('.grade-btn').forEach(b => b.classList.remove('active'));
btn.classList.add('active');
selectedGrade = g;
renderSubjects(g);
};
gradeSelector.appendChild(btn);
});
function renderSubjects(grade) {
subjectGrid.innerHTML = '';
(subjects[grade] || []).forEach(s => {
const card = document.createElement('div');
card.className = 'subject-card';
const [icon, name] = [s.split(' ')[0], s.split(' ').slice(1).join(' ')];
card.innerHTML = `<div class="subject-icon">${icon}</div><div class="subject-name">${name}</div>`;
card.onclick = () => showStudyContent(grade, name);
subjectGrid.appendChild(card);
});
}
function showStudyContent(grade, subject) {
const chat = document.getElementById('studyChat');
chat.style.display = 'block';
document.getElementById('studyTopic').textContent = `📚 پایه ${grade} - ${subject}`;
const contents = {
'ریاضی': `<strong>مفاهیم پایه ریاضی پایه ${grade}:</strong><br><br>
• <strong>اعداد و محاسبات:</strong> جمع، تفریق، ضرب و تقسیم<br>
• <strong>کسرها:</strong> مفهوم کسر، جمع و تفریق کسرها<br>
• <strong>هندسه:</strong> اشکال دوبعدی و دوبعدی، محیط و مساحت<br>
• <strong>آمار و احتمال:</strong> میانگین، میانه، مد<br><br>
<em>💡 نکته: برای یادگیری بهتر ریاضی، حتماً تمرین روزانه داشته باشید.</em>`,
'فارسی': `<strong>درسهای فارسی پایه ${grade}:</strong><br><br>
• <strong>دستور زبان:</strong> نهاد، گزاره، مفعول، فعل<br>
• <strong>آرایههای ادبی:</strong> تشبیه، استعاره، جانبخشی<br>
• <strong>املا و نگارش:</strong> قواعد املایی و انشانویسی<br>
• <strong>تاریخ ادبیات:</strong> شاعران و نویسندگان بزرگ<br><br>
<em>💡 نکته: خواندن کتابهای غیردرسی به تقویت فارسی کمک میکند.</em>`,
'علوم': `<strong>مباحث علوم پایه ${grade}:</strong><br><br>
• <strong>زیستشناسی:</strong> سلول، گیاهان، جانوران<br>
• <strong>فیزیک:</strong> نیرو، انرژی، حرکت<br>
• <strong>شیمی:</strong> مواد، ترکیبات، واکنشها<br>
• <strong>زمینشناسی:</strong> سنگها، خاک، آب<br><br>
<em>💡 نکته: انجام آزمایشهای ساده در خانه یادگیری را جذاب میکند.</em>`,
'فیزیک': `<strong>مباحث فیزیک پایه ${grade}:</strong><br><br>
• <strong>مکانیک:</strong> حرکت، نیرو، قوانین نیوتن<br>
• <strong>الکتریسیته:</strong> جریان، ولتاژ، مقاومت<br>
• <strong>نور و اپتیک:</strong> بازتاب، شکست، عدسی<br>
• <strong>ترمودینامیک:</strong> دما، گرما، انتقال حرارت<br><br>
<em>💡 فرمول مهم: F = m × a (نیرو = جرم × شتاب)</em>`,
'شیمی': `<strong>مباحث شیمی پایه ${grade}:</strong><br><br>
• <strong>ساختار اتم:</strong> پروتون، نوترون، الکترون<br>
• <strong>جدول تناوبی:</strong> گروهها و دورهها<br>
• <strong>پیوندهای شیمیایی:</strong> یونی، کووالانسی<br>
• <strong>واکنشهای شیمیایی:</strong> موازنه و انواع<br><br>
<em>💡 نکته: حفظ کردن جدول تناوبی با روشهای خلاقانه آسانتر است.</em>`,
};
document.getElementById('studyContent').innerHTML = contents[subject] ||
`<strong>محتوای درس ${subject} پایه ${grade}:</strong><br><br>
برای دریافت توضیحات دقیقتر و پاسخ به سوالات خاص، لطفاً سوال خود را در بخش گفتگو بپرسید.<br><br>
💡 من آمادهام تا در هر مبحثی از این درس به شما کمک کنم. سوالتان را بپرسید!`;
chat.scrollIntoView({ behavior: 'smooth' });
}
// Search
function doSearch() {
const q = document.getElementById('searchInput').value.trim();
if (!q) return;
const results = document.getElementById('searchResults');
results.innerHTML = '<div style="text-align:center;padding:30px;"><div class="loader" style="margin:0 auto;"></div></div>';
setTimeout(() => {
const sampleResults = [
{ title: `تعریف و توضیح "${q}"`, text: `${q} یکی از مفاهیم مهم در حوزه خود است که در منابع علمی مختلف مورد بررسی قرار گرفته. این موضوع از جنبههای مختلفی قابل تحلیل است و کاربردهای گستردهای در زندگی روزمره و صنعت دارد.`, sources: ['ویکیپدیا', 'Britannica'] },
{ title: `تاریخچه و پیشینه ${q}`, text: `بررسیهای تاریخی نشان میدهد که ${q} از دیرباز مورد توجه پژوهشگران بوده است. در طول قرنهای گذشته، تحولات بسیاری در درک ما از این موضوع رخ داده است.`, sources: ['دانشنامه جهان', 'منابع دانشگاهی'] },
{ title: `کاربردهای مدرن ${q}`, text: `امروزه ${q} در زمینههای مختلفی از جمله تکنولوژی، پزشکی، آموزش و صنعت کاربرد دارد. تحقیقات جدید نشاندهنده پتانسیل بالای این حوزه برای آینده است.`, sources: ['Nature', 'Science Daily'] },
];
results.innerHTML = `<div style="margin-bottom:16px;color:var(--muted);font-size:13px;">نتایج جستجو برای: <strong style="color:var(--text);">${q}</strong></div>`;
sampleResults.forEach(r => {
const item = document.createElement('div');
item.className = 'result-item';
item.innerHTML = `
<div class="result-title">${r.title}</div>
<div class="result-text">${r.text}<br><br>${r.sources.map(s => `<span class="source-tag">${s}</span>`).join('')}</div>
`;
results.appendChild(item);
});
}, 800);
}
document.getElementById('searchInput').addEventListener('keypress', e => {
if (e.key === 'Enter') doSearch();
});
// Voice
const voiceBtn = document.getElementById('voiceBtn');
const voiceOverlay = document.getElementById('voiceOverlay');
const voiceText = document.getElementById('voiceText');
let recognition = null;
voiceBtn.addEventListener('click', () => {
if (!('webkitSpeechRecognition' in window) && !('SpeechRecognition' in window)) {
alert('مرورگر شما از تشخیص صدا پشتیبانی نمیکند. لطفاً از Chrome استفاده کنید.');
return;
}
voiceOverlay.classList.add('active');
voiceBtn.classList.add('active');
const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
recognition = new SpeechRecognition();
recognition.lang = 'fa-IR';
recognition.continuous = false;
recognition.interimResults = true;
recognition.onresult = (e) => {
const transcript = Array.from(e.results).map(r => r[0].transcript).join('');
voiceText.textContent = transcript || 'در حال گوش دادن...';
if (e.results[0].isFinal) {
setTimeout(() => {
stopVoice();
// Switch to chat and send
document.querySelector('[data-view="chat"]').click();
chatInput.value = transcript;
sendMessage();
}, 500);
}
};
recognition.onerror = () => {
voiceText.textContent = 'خطا در تشخیص صدا. دوباره تلاش کنید.';
setTimeout(stopVoice, 1500);
};
recognition.onend = () => {
if (voiceOverlay.classList.contains('active')) {
voiceText.textContent = 'پایان. برای شروع دوباره کلیک کنید.';
setTimeout(stopVoice, 1000);
}
};
recognition.start();
});
function stopVoice() {
voiceOverlay.classList.remove('active');
voiceBtn.classList.remove('active');
if (recognition) {
try { recognition.stop(); } catch(e) {}
recognition = null;
}
}
// Image gen API bridge
window.imageGenAPI = async (prompt) => {
// This will be replaced by actual tool call in the environment
return new Promise((resolve, reject) => {
window._pendingImageResolve = resolve;
window._pendingImageReject = reject;
window._pendingImagePrompt = prompt;
// Trigger custom event for the host to handle
window.dispatchEvent(new CustomEvent('novaImageRequest', { detail: { prompt } }));
});
};
// Listen for image results from host
window.addEventListener('novaImageResult', (e) => {
if (window._pendingImageResolve) {
window._pendingImageResolve(e.detail.url);
window._pendingImageResolve = null;
}
});
</script>
</body>
</html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>هوش مصنوعی همهکاره | Nova AI</title>
<link href="https://cdn.jsdelivr.net/fontsource/fonts/vazirmatn@latest/font-faces.css" rel="stylesheet">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Vazirmatn', sans-serif; }
:root {
--bg: #0a0a1a;
--bg2: #12122a;
--card: rgba(255,255,255,0.04);
--border: rgba(255,255,255,0.08);
--text: #e8e8f0;
--muted: #8888aa;
--accent: #8b5cf6;
--accent2: #06b6d4;
--pink: #ec4899;
--green: #10b981;
--orange: #f59e0b;
}
body {
background: var(--bg);
color: var(--text);
min-height: 100vh;
overflow-x: hidden;
background-image:
radial-gradient(circle at 20% 10%, rgba(139,92,246,0.15), transparent 40%),
radial-gradient(circle at 80% 80%, rgba(6,182,212,0.12), transparent 40%);
}
/* Header */
.header {
position: sticky; top: 0; z-index: 100;
background: rgba(10,10,26,0.8);
backdrop-filter: blur(20px);
border-bottom: 1px solid var(--border);
padding: 14px 24px;
display: flex; align-items: center; justify-content: space-between;
}
.logo {
display: flex; align-items: center; gap: 12px;
font-size: 20px; font-weight: 700;
}
.logo-icon {
width: 40px; height: 40px;
background: linear-gradient(135deg, var(--accent), var(--accent2));
border-radius: 12px;
display: flex; align-items: center; justify-content: center;
font-size: 22px;
box-shadow: 0 0 20px rgba(139,92,246,0.4);
animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
0%,100% { box-shadow: 0 0 20px rgba(139,92,246,0.4); }
50% { box-shadow: 0 0 30px rgba(139,92,246,0.7); }
}
.logo span { background: linear-gradient(135deg, #fff, #c4b5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.header-actions { display: flex; gap: 10px; }
.btn-voice {
width: 42px; height: 42px;
background: var(--card);
border: 1px solid var(--border);
border-radius: 50%;
color: var(--text);
cursor: pointer;
display: flex; align-items: center; justify-content: center;
transition: all 0.3s;
font-size: 18px;
}
.btn-voice:hover { background: var(--accent); border-color: var(--accent); }
.btn-voice.active {
background: #ef4444;
border-color: #ef4444;
animation: voicePulse 1s ease-in-out infinite;
}
@keyframes voicePulse {
0%,100% { transform: scale(1); }
50% { transform: scale(1.1); }
}
/* Layout */
.container {
display: grid;
grid-template-columns: 260px 1fr;
min-height: calc(100vh - 70px);
}
/* Sidebar */
.sidebar {
background: rgba(0,0,0,0.2);
border-left: 1px solid var(--border);
padding: 20px 14px;
display: flex; flex-direction: column; gap: 8px;
}
.nav-item {
padding: 12px 14px;
border-radius: 12px;
cursor: pointer;
display: flex; align-items: center; gap: 12px;
transition: all 0.2s;