Spaces:
Running
Running
Download index.html from bllndebrahim/translet-test: direct link, hf CLI and curl.
- Browser
- Download file 83.5 kB
-
https://huggingface.co/spaces/bllndebrahim/translet-test/resolve/main/index.html
- Command line
-
hf download hf://spaces/bllndebrahim/translet-test/index.html
-
curl -L -o index.html https://huggingface.co/spaces/bllndebrahim/translet-test/resolve/main/index.html
83.5 kB
<!DOCTYPE html>
<html lang="ckb" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="Lala Translate">
<meta name="application-name" content="Lala Translate">
<meta name="theme-color" content="#0a0a0c">
<!-- The app version: deploy_cloudflare.py copies it into version.json; phones with an older copy see "new update" -->
<meta name="lala-version" content="voice17">
<meta name="referrer" content="no-referrer">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>Lala Translate - وەرگێڕی دەنگی لالا</title>
<script>
// The Hugging Face "storage" link has no server (no Gemini, no voice chat): send people to the real link
(function () {
var h = location.hostname;
if (/\.static\.hf\.space$/.test(h)) {
var w = /-test\./.test(h) ? 'translet-test' : 'translet';
location.replace('https://' + w + '.alandblnd8141.workers.dev' + location.pathname.replace(/index\.html$/, '') + location.search + location.hash);
}
})();
</script>
<!-- iOS & Android Home Screen App Icons -->
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon-180x180.png">
<link rel="apple-touch-icon" sizes="192x192" href="apple-touch-icon-192x192.png">
<link rel="apple-touch-icon" sizes="512x512" href="apple-touch-icon-512x512.png">
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="lala-icon.ico"><!-- not favicon.ico: Hugging Face serves its own file at that name -->
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<!-- PWA Web App Manifest -->
<link rel="manifest" href="manifest.json">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<!-- Modern Fonts: Vazirmatn for Kurdish/Arabic, Plus Jakarta Sans for Latin -->
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Vazirmatn:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css?v=voice17">
</head>
<body>
<div class="app-background">
<div class="ambient-glow glow-1"></div>
<div class="ambient-glow glow-2"></div>
<div class="ambient-glow glow-3"></div>
</div>
<div class="app-container">
<!-- Header -->
<header class="app-header">
<div class="brand">
<div class="logo-gemini">
<img src="logo-128.png" alt="Lala Translate Logo" class="logo-img" width="128" height="70">
</div>
<div class="brand-text">
<h1><span class="brand-lala">Lala</span> <span class="brand-translet">Translate</span></h1>
<p class="tagline">وەرگێڕی دەقی سروشتی و پێشکەوتووی کوردی و جیهانی</p>
</div>
</div>
<div class="header-actions">
<!-- Latin / Kurdish Alphabet Toggle -->
<button id="toggleKurdishLatinBtn" class="pill-btn secondary" title="گۆڕینی نووسینی کوردی بۆ لاتینی / ئەلفوبێی عەرەبی">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="m5 8 6 6" />
<path d="m4 14 6-6 2-3" />
<path d="M2 5h12" />
<path d="M7 2h1" />
<path d="m22 22-5-10-5 10" />
<path d="M14 18h6" />
</svg>
<span id="scriptBadgeText">کوردی (سۆرانی)</span>
</button>
<!-- API Settings Modal Button -->
<button id="openSettingsBtn" class="pill-btn primary" title="ڕێکخستنی کلیل (API Key) ی جێمینای">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span id="aiModeStatusText">بەستنەوە بە Gemini AI</span>
</button>
</div>
</header>
<!-- Main App Navigation Tabs -->
<nav class="app-nav">
<button id="navTranslatorBtn" class="nav-tab active">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="m5 8 6 6"></path>
<path d="m4 14 6-6 2-3"></path>
<path d="M2 5h12"></path>
<path d="M7 2h1"></path>
<path d="m22 22-5-10-5 10"></path>
<path d="M14 18h6"></path>
</svg>
<span class="nav-label"><span class="nav-main-txt">وەرگێڕی دەق</span><span class="nav-sub-txt"> (Translator)</span></span>
</button>
<button id="navVoiceVcBtn" class="nav-tab">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path>
<path d="M19 10v2a7 7 0 0 1-14 0v-2"></path>
<line x1="12" y1="19" x2="12" y2="23"></line>
<line x1="8" y1="23" x2="16" y2="23"></line>
</svg>
<span class="nav-label"><span class="nav-main-txt">گفتوگۆی دەنگی</span><span class="nav-sub-txt"> (Voice VC)</span></span>
<span class="live-pill" style="background: rgba(220, 38, 38, 0.2); color: #fca5a5; border-color: rgba(220, 38, 38, 0.4);">
<span class="live-indicator" style="background: #ef4444; box-shadow: 0 0 8px #ef4444;"></span>
<span class="live-pill-txt">VC ڕاستەوخۆ</span>
</span>
</button>
<button id="navChatBtn" class="nav-tab">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
</svg>
<span class="nav-label"><span class="nav-main-txt">چاتی جیهانی</span><span class="nav-sub-txt"> (Live Chat)</span></span>
<span class="live-pill">
<span class="live-indicator"></span>
<span id="chatOnlineBadge" class="live-pill-txt">ڕاستەوخۆ</span>
</span>
</button>
</nav>
<!-- TRANSLATOR VIEW -->
<div id="translatorView" class="view-panel active">
<!-- Style / Tone Selection Bar -->
<div class="tones-bar">
<div class="tone-label">
<svg class="sparkle-icon" width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2l2.4 7.2L21.6 12l-7.2 2.4L12 21.6l-2.4-7.2L2.4 12l7.2-2.4z"/></svg>
<span>شێوازی دەربڕین (Tone):</span>
</div>
<div class="tone-options">
<button class="tone-chip active" data-tone="natural">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2a10 10 0 0 1 10 10c0 5.5-4.5 10-10 10S2 17.5 2 12A10 10 0 0 1 12 2z"/><path d="M12 6v6l4 2"/></svg>
<span>سروشتی و زیندوو</span>
</button>
<button class="tone-chip" data-tone="formal">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="7" width="20" height="14" rx="2" ry="2"/><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"/></svg>
<span>فەرمی و باڵا</span>
</button>
<button class="tone-chip" data-tone="casual">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>
<span>ڕۆژانە و قسەکردن</span>
</button>
<button class="tone-chip" data-tone="literary">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><circle cx="11" cy="11" r="2"/></svg>
<span>ئەدەبی و شاعیرانە</span>
</button>
</div>
</div>
<!-- Main Translator Grid -->
<main class="translator-grid">
<!-- Source Panel -->
<section class="panel source-panel glass-card">
<div class="panel-header">
<div class="language-select-wrapper">
<select id="sourceLang" class="lang-select">
<option value="auto">دۆزینەوەی خۆکار (Auto)</option>
<option value="ku" selected>کوردی (سۆرانی)</option>
<option value="en">ئینگلیزی (English)</option>
<option value="ar">عەرەبی (العربية)</option>
<option value="tr">تورکی (Türkçe)</option>
<option value="fa">فارسی (فارسی)</option>
<option value="de">ئەڵمانی (Deutsch)</option>
<option value="fr">فەڕەنسی (Français)</option>
<option value="es">ئیسپانی (Español)</option>
</select>
</div>
<div class="panel-actions">
<button id="clearSourceBtn" class="icon-btn" title="سڕینەوەی دەق">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</button>
</div>
</div>
<div class="textarea-container">
<textarea id="sourceText" placeholder="دەقەکەت لێرە بنووسە یان بیلکێنە (Paste)... (ئەگەر بە پیتی لاتینیش بنووسیت ئاساییە)" spellcheck="false"></textarea>
</div>
<div class="panel-footer">
<div class="footer-left">
<button id="speakSourceBtn" class="icon-btn" title="خوێندنەوەی دەنگ">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon>
<path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path>
<path d="M19.07 4.93a10 10 0 0 1 0 14.14"></path>
</svg>
</button>
<button id="copySourceBtn" class="icon-btn" title="کۆپیکردنی دەقی سەرەکی">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button id="kurdishTransliterateBtn" class="icon-btn pill" title="گۆڕینی ڕاستەوخۆ: لاتینی ⇄ سۆرانی">
<span class="btn-text">لاتینی ⇄ سۆرانی</span>
</button>
</div>
<div class="char-counter">
<span id="charCount">0</span> پیت
</div>
</div>
</section>
<!-- Center Swap / Action Button -->
<div class="swap-divider">
<button id="swapLanguagesBtn" class="swap-btn" title="گۆڕینەوەی نێوان دوو زمانەکە">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="m16 3 4 4-4 4"/>
<path d="M20 7H4"/>
<path d="m8 21-4-4 4-4"/>
<path d="M4 17h16"/>
</svg>
</button>
<button id="translateActionBtn" class="translate-main-btn" title="دەستپێکردنی وەرگێڕان">
<span class="btn-spinner"></span>
<span class="btn-label">وەرگێڕان</span>
</button>
</div>
<!-- Target Panel -->
<section class="panel target-panel glass-card">
<div class="panel-header">
<div class="language-select-wrapper">
<select id="targetLang" class="lang-select">
<option value="en" selected>ئینگلیزی (English)</option>
<option value="ku">کوردی (سۆرانی)</option>
<option value="ar">عەرەبی (العربية)</option>
<option value="tr">تورکی (Türkçe)</option>
<option value="fa">فارسی (فارسی)</option>
<option value="de">ئەڵمانی (Deutsch)</option>
<option value="fr">فەڕەنسی (Français)</option>
<option value="es">ئیسپانی (Español)</option>
</select>
</div>
<div class="engine-badge" id="engineBadge" title="سیستەمی وەرگێڕان">
<span class="badge-dot"></span>
<span id="engineBadgeText">Gemini Smart Engine</span>
</div>
</div>
<div class="textarea-container">
<div id="targetLoadingOverlay" class="loading-overlay hidden">
<div class="gemini-loader">
<div class="spark-circle"></div>
<span>جێمینای لە وەرگێڕاندایە...</span>
</div>
</div>
<textarea id="targetText" placeholder="وەرگێڕانەکەت لێرە بە شێوازێکی سروشتی دەردەکەوێت..." readonly></textarea>
</div>
<div class="panel-footer">
<div class="footer-left">
<button id="speakTargetBtn" class="icon-btn" title="خوێندنەوە بە دەنگ">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon>
<path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path>
<path d="M19.07 4.93a10 10 0 0 1 0 14.14"></path>
</svg>
</button>
<button id="copyTargetBtn" class="icon-btn" title="کۆپیکردنی وەرگێڕان">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button id="showExplanationBtn" class="icon-btn pill" title="ڕوونکردنەوەی ووشە و دەستەواژەکان">
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 18h6"></path>
<path d="M10 22h4"></path>
<path d="M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 0 1 8.91 14"></path>
</svg>
<span class="btn-text">ڕوونکردنەوە</span>
</button>
</div>
<div class="target-status" id="targetStatusMessage">
ئامادەیە
</div>
</div>
</section>
</main>
<!-- Full-Width Kurdish Voice Studio & Audio Player Bar (Aligned across both panels) -->
<!-- Kurdish Voice Studio & Audio Player Bar -->
<div id="kurdishVoiceBar" class="kurdish-voice-bar">
<div class="voice-bar-left">
<button id="kurdishVoicePlayBtn" class="kurdish-play-btn" title="خوێندنەوەی دەنگی کوردی بە شێوازی ستۆدیۆ">
<svg id="kurdishPlayIcon" width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
<polygon points="5 3 19 12 5 21 5 3"></polygon>
</svg>
<span id="kurdishPlayLabel">دەنگی سۆرانی</span>
</button>
<div class="kurdish-wave-container" id="kurdishVoiceWave" title="دەنگشەپۆلی کوردی">
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
<span class="wave-bar"></span>
</div>
<!-- Dialect Switcher: Sorani vs Badini vs Kurmanji -->
<div class="voice-dialect-group" title="هەڵبژاردنی شێوەزار: سۆرانی، بادینی، کرمانجی">
<button class="voice-dialect-btn active" data-dialect="sorani">سۆرانی</button>
<button class="voice-dialect-btn" data-dialect="badini">بادینی</button>
<button class="voice-dialect-btn" data-dialect="kurmanji">کرمانجی</button>
</div>
<span id="kurdishVoiceStatus" class="voice-status-pill">سۆرانی سروشتی</span>
</div>
<div class="voice-bar-right">
<div class="voice-speed-group" dir="ltr" title="خێرایی خوێندنەوە">
<span class="speed-label">Speed:</span>
<button class="voice-speed-btn" data-speed="0.8">0.8x</button>
<button class="voice-speed-btn active" data-speed="1.0">1.0x</button>
<button class="voice-speed-btn" data-speed="1.2">1.2x</button>
<button class="voice-speed-btn" data-speed="1.5">1.5x</button>
</div>
<div class="voice-main-indicator" title="بێژەری سەرەکیی سۆرانی (ڕەسەن - بێ لەهجەی عەرەبی و فارسی)">
<span style="display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 700; color: #fff; background: rgba(16, 185, 129, 0.2); border: 1px solid rgba(16, 185, 129, 0.4); padding: 5px 14px; border-radius: 20px;">
<span>🎙️ دەنگی سەرەکی: کوردیی سۆرانی (ڕەسەن)</span>
</span>
</div>
</div>
</div>
<!-- Live Phonetic Pronunciation Card -->
<div id="kurdishPhoneticCard" class="kurdish-phonetic-card hidden">
<div class="phonetic-header">
<span class="phonetic-label">شێوازی خوێندنەوەی دەنگی (Phonetic Voice Guide):</span>
<button id="copyPhoneticBtn" class="copy-phonetic-btn" title="کۆپیکردنی دەنگسازی">کۆپی</button>
</div>
<div id="kurdishPhoneticText" class="phonetic-body">[Slaw, çonî?]</div>
</div>
<!-- Kurdish Podcast & Audio Practice Card -->
<div id="kurdishPodcastCard" class="kurdish-podcast-card hidden">
<div class="podcast-header">
<div class="podcast-title">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>
<span>پۆدکاست و ڕستە دەنگییەکانی زمانی کوردی</span>
</div>
<button id="closePodcastBtn" class="copy-phonetic-btn">داخستن</button>
</div>
<div class="podcast-filter-bar" id="podcastFilterBar">
<button class="podcast-filter-chip active" data-category="all">هەمووی</button>
<button class="podcast-filter-chip" data-category="مێشک و زیرەکی">🧠 مێشک و زیرەکی (دیوەخان)</button>
<button class="podcast-filter-chip" data-category="سەرکەوتن">سەرکەوتن</button>
<button class="podcast-filter-chip" data-category="تەکنەلۆژیا">تەکنەلۆژیا</button>
<button class="podcast-filter-chip" data-category="کولتوور">کولتوور</button>
<button class="podcast-filter-chip" data-category="پەند و شیعر">پەند و شیعر</button>
<button class="podcast-filter-chip" data-category="تەندروستی">تەندروستی</button>
<button class="podcast-filter-chip" data-category="گفتوگۆ">گفتوگۆ</button>
</div>
<div class="podcast-grid" id="kurdishPodcastList">
<!-- Dynamically populated episodes -->
</div>
</div>
<!-- AI Breakdown / Explanations section (Collapsible) -->
<section id="explanationCard" class="explanation-card glass-card hidden">
<div class="exp-header">
<div class="exp-title">
<svg class="sparkle-icon" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2l2.4 7.2L21.6 12l-7.2 2.4L12 21.6l-2.4-7.2L2.4 12l7.2-2.4z"/></svg>
<h4>شیکاری و مانا جێگرەوەکانی جێمینای</h4>
</div>
<button id="closeExplanationBtn" class="close-btn">×</button>
</div>
<div id="explanationContent" class="exp-body">
<!-- Filled dynamically -->
</div>
</section>
<!-- Word Insights & Multiple Meanings Section -->
<section id="wordInsightsSection" class="word-insights-card glass-card">
<div class="insights-header">
<div class="insights-title">
<svg class="insights-icon" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path>
<path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path>
</svg>
<div class="insights-title-text">
<h3>مانا جیاواز و جێگرەوەکانی وشە (Word Insights)</h3>
<p>ڕوونکردنەوەی تێروتەسەل لەسەر ئەو وشانەی لە دەقە جیاوازەکاندا مانایان دەگۆڕێت</p>
</div>
<span class="insights-badge">فرەمانا</span>
</div>
<div class="insights-search-box">
<svg class="search-icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="11" cy="11" r="8"></circle>
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
</svg>
<input type="text" id="wordInsightSearch" placeholder="بۆ هەر وشەیەک بگەڕێ (دڵ، Right، دەست، شیر...)" autocomplete="off">
<button id="clearInsightSearchBtn" class="insight-search-clear hidden" title="سڕینەوە">✕</button>
</div>
</div>
<!-- Quick Word Tags Row -->
<div class="insights-tags-row">
<span class="tags-label">نموونەی وشە فرەماناکان:</span>
<div class="insights-chips" id="popularInsightChips">
<button class="insight-chip active" data-word="right">Right</button>
<button class="insight-chip" data-word="دڵ">دڵ (Heart)</button>
<button class="insight-chip" data-word="light">Light</button>
<button class="insight-chip" data-word="bank">Bank</button>
<button class="insight-chip" data-word="دەست">دەست</button>
<button class="insight-chip" data-word="خۆش">خۆش</button>
<button class="insight-chip" data-word="شیر">شیر</button>
<button class="insight-chip" data-word="دار">دار</button>
<button class="insight-chip" data-word="چاو">چاو</button>
<button class="insight-chip" data-word="با">با</button>
<button class="insight-chip" data-word="ژیان">ژیان</button>
<button class="insight-chip" data-word="کار">کار</button>
<button class="insight-chip" data-word="book">Book</button>
<button class="insight-chip" data-word="watch">Watch</button>
<button class="insight-chip" data-word="spring">Spring</button>
</div>
</div>
<!-- Word Display Body -->
<div class="insights-body" id="insightsBody">
<!-- Rendered dynamically via JavaScript -->
</div>
</section>
<!-- History Section -->
<section class="history-section glass-card">
<div class="history-header">
<div class="history-title">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"></circle>
<polyline points="12 6 12 12 16 14"></polyline>
</svg>
<h3>مێژووی وەرگێڕانەکانی ئەم دواییە</h3>
</div>
<button id="clearHistoryBtn" class="text-btn danger">سڕینەوەی مێژوو</button>
</div>
<div id="historyList" class="history-list">
<div class="empty-history">هێشتا هیچ وەرگێڕانێک ئەنجام نەدراوە.</div>
</div>
</section>
</div> <!-- End translatorView -->
<!-- VOICE VS VOICE (VC) REAL-TIME CONVERSATION VIEW -->
<div id="voiceVcView" class="view-panel hidden">
<div class="vc-wrapper glass-card">
<!-- VC Header -->
<div class="vc-header">
<div class="vc-room-info">
<div class="vc-room-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path>
<path d="M19 10v2a7 7 0 0 1-14 0v-2"></path>
<line x1="12" y1="19" x2="12" y2="23"></line>
<line x1="8" y1="23" x2="16" y2="23"></line>
</svg>
</div>
<div>
<div style="display: flex; align-items: center; gap: 10px;">
<h3 style="margin: 0; font-size: 1.22rem; color: #fff;">گفتوگۆی دەنگی ڕووبەڕوو<span class="vc-title-en"> (Voice vs Voice / VC)</span></h3>
<span class="live-pill">
<span class="live-indicator"></span>
<span>چالاک و ڕاستەوخۆ</span>
</span>
</div>
<p id="vcSubtitle" class="vc-subtitle">بە کوردی بدوێ ئەپەکە بە دەنگ دەیکاتە ئینگلیزی، بە ئینگلیزی قسە بکە دەیکاتە دەنگی کوردیی سۆرانی!</p>
</div>
</div>
<div class="vc-header-controls">
<label class="vc-auto-speak-toggle" title="خوێندنەوەی دەنگیی خۆکاری وەرگێڕانەکە دوای قسەکردن">
<input type="checkbox" id="vcAutoSpeakToggle" checked />
<span style="font-size: 0.82rem; color: #cbd5e1;">لێدانی دەنگ (Auto Speak) 🔊</span>
</label>
<button id="clearVcHistoryBtn" class="pill-btn secondary" title="سڕینەوەی گفتوگۆکە">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>
<span>سڕینەوە</span>
</button>
</div>
</div>
<!-- VC Language Selector Toolbar -->
<div class="vc-lang-toolbar">
<div class="vc-lang-select-box">
<label class="vc-lang-label" for="vcSpeaker1Select">
<span class="vc-lang-label-dot" style="background: #ef4444;"></span>
<span>دەنگی تۆ (قسەکەری ١):</span>
</label>
<div class="vc-select-wrapper">
<select id="vcSpeaker1Select" class="vc-select-input" aria-label="زمانی قسەکەری ١">
<option value="ku" selected>☀️ کوردی (سۆرانی)</option>
<option value="en">🇬🇧 ئینگلیزی (English)</option>
<option value="ar">🇮🇶 عەرەبی (العربية)</option>
<option value="de">🇩🇪 ئەڵمانی (Deutsch)</option>
<option value="tr">🇹🇷 تورکی (Türkçe)</option>
<option value="fa">🇮🇷 فارسی (فارسی)</option>
<option value="fr">🇫🇷 فەڕەنسی (Français)</option>
<option value="es">🇪🇸 ئیسپانی (Español)</option>
</select>
<span class="vc-select-arrow">▼</span>
</div>
</div>
<button id="vcSwapLangsBtn" class="vc-swap-btn" title="گۆڕینەوەی زمانەکان (Swap Languages)" type="button" aria-label="گۆڕینەوەی زمانەکان">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
<path d="M7 16V4M7 4L3 8M7 4L11 8M17 8V20M17 20L21 16M17 20L13 16"></path>
</svg>
</button>
<div class="vc-lang-select-box">
<label class="vc-lang-label" for="vcSpeaker2Select">
<span class="vc-lang-label-dot" style="background: #3b82f6;"></span>
<span>دەنگی بەرامبەر (قسەکەری ٢):</span>
</label>
<div class="vc-select-wrapper">
<select id="vcSpeaker2Select" class="vc-select-input" aria-label="زمانی قسەکەری ٢">
<option value="ku">☀️ کوردی (سۆرانی)</option>
<option value="en" selected>🇬🇧 ئینگلیزی (English)</option>
<option value="ar">🇮🇶 عەرەبی (العربية)</option>
<option value="de">🇩🇪 ئەڵمانی (Deutsch)</option>
<option value="tr">🇹🇷 تورکی (Türkçe)</option>
<option value="fa">🇮🇷 فارسی (فارسی)</option>
<option value="fr">🇫🇷 فەڕەنسی (Français)</option>
<option value="es">🇪🇸 ئیسپانی (Español)</option>
</select>
<span class="vc-select-arrow">▼</span>
</div>
</div>
</div>
<!-- VC Status & Soundwave Display -->
<div id="vcWaveformBar" class="vc-waveform-bar">
<div class="vc-pulse-rings">
<div class="pulse-ring r1"></div>
<div class="pulse-ring r2"></div>
<div class="pulse-ring r3"></div>
</div>
<div id="vcStatusText" class="vc-status-text">ئامادەیە بۆ گفتوگۆ — پەنجە بە یەکێک لە دوگمەکانی مایکرۆفۆن بنێ و قسە بکە...</div>
</div>
<!-- VC Dual Microphone Controllers -->
<div class="vc-mics-container">
<!-- Left: Speaker 1 Button -->
<div class="vc-mic-card kurdish-mic-card" id="vcSpeaker1Card">
<div class="vc-card-badge" id="vcSpeaker1Badge">دەنگی تۆ (Kurdish)</div>
<div class="vc-card-meta">
<span class="flag-icon" id="vcSpeaker1Flag">☀️</span>
<span class="lang-title" id="vcSpeaker1Title">کوردی (سۆرانی)</span>
</div>
<p class="vc-mic-hint" id="vcSpeaker1Hint">پەنجە بنێ بۆ دەستپێکردن، دوای قسەکردن پەنجە بنێ بۆ وەرگێڕان</p>
<button id="vcKurdishMicBtn" class="vc-giant-mic-btn kurdish" title="قسەکردن بە زمانی کوردی">
<div class="giant-mic-icon">
<svg width="34" height="34" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"/>
<path d="M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"/>
</svg>
</div>
<span class="giant-btn-label" id="vcSpeaker1BtnLabel">قسەکردن بە کوردی</span>
</button>
</div>
<!-- Center: Automatic Dual Mode -->
<div class="vc-center-auto-card">
<div class="auto-divider-icon">⇄</div>
<button id="vcAutoDetectMicBtn" class="vc-auto-btn" title="دۆزینەوەی خۆکار — بە یەکێک لە دوو زمانەکە بدوێ خۆی دەیدۆزێتەوە">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 2l2.4 7.2L21.6 12l-7.2 2.4L12 21.6l-2.4-7.2L2.4 12l7.2-2.4z"/>
</svg>
<span id="vcAutoBtnLabel">دۆزینەوەی خۆکار (Auto VC)</span>
</button>
</div>
<!-- Right: Speaker 2 Button -->
<div class="vc-mic-card english-mic-card" id="vcSpeaker2Card">
<div class="vc-card-badge" id="vcSpeaker2Badge">دەنگی بەرامبەر (English)</div>
<div class="vc-card-meta">
<span class="flag-icon" id="vcSpeaker2Flag">🇬🇧</span>
<span class="lang-title" id="vcSpeaker2Title">English (ئینگلیزی)</span>
</div>
<p class="vc-mic-hint" id="vcSpeaker2Hint">Tap to start recording, tap again when done to translate</p>
<button id="vcEnglishMicBtn" class="vc-giant-mic-btn english" title="Speak in English">
<div class="giant-mic-icon">
<svg width="34" height="34" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"/>
<path d="M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"/>
</svg>
</div>
<span class="giant-btn-label" id="vcSpeaker2BtnLabel">Speak in English</span>
</button>
</div>
</div>
<!-- VC Live Dialogue History Feed -->
<div class="vc-history-section">
<div class="vc-history-header">
<span style="font-weight: 700; color: #fff; font-size: 0.88rem;">مێژووی گفتوگۆکە (Conversation Feed):</span>
<span id="vcCountBadge" style="font-size: 0.74rem; color: #94a3b8;">٠ وتە</span>
</div>
<div id="vcConversationFeed" class="vc-conversation-feed">
<div class="vc-empty-placeholder">
<span style="font-size: 2.2rem;">🎙️ ⇄ 🎧</span>
<h4 style="color: #fff; margin: 8px 0 4px;">ژووری وەرگێڕی ڕاستەوخۆی دەنگی (Voice vs Voice)</h4>
<p style="color: #94a3b8; font-size: 0.82rem; max-width: 480px; margin: 0 auto;">
ئەم بەشە وەک وەرگێڕی هاوکات کاردەکات: پەنجە بە دوگمەی مایکرۆفۆنی کوردی بنێ بۆ ئەوەی بە ئینگلیزی بیدوێنێت، یان بە ئینگلیزی قسە بکەن بۆ ئەوەی بە دەنگی کوردیی سۆرانی وەڵام بداتەوە!
</p>
</div>
</div>
</div>
</div>
</div>
<!-- GLOBAL MULTILINGUAL LIVE CHAT VIEW -->
<div id="chatView" class="view-panel hidden">
<div class="chat-wrapper glass-card">
<!-- Chat Header -->
<div class="chat-header">
<div class="chat-room-info">
<div class="chat-room-icon">
<svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<line x1="2" y1="12" x2="22" y2="12"></line>
<path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path>
</svg>
</div>
<div>
<h3>چاتی جیهانی (Global Multilingual Chat)</h3>
<p class="chat-subtitle">چات بکە بە هەر زمانێک؛ هەمووان بە زمانی خۆیان دەتوانن پەیامەکان وەربگێڕن!</p>
</div>
</div>
<div class="chat-header-actions">
<div id="chatConnectionStatus" class="connection-badge connected">
<span class="live-indicator"></span>
<span id="connStatusText">بەستراوەتەوە بە تۆڕی جیهانی</span>
</div>
<button id="editProfileBtn" class="pill-btn secondary" title="گۆڕینی ناوی بەکارهێنەر">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
<circle cx="12" cy="7" r="4"></circle>
</svg>
<span id="userNameBadge">کوردستان</span>
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 20h9"></path>
<path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>
</svg>
</button>
</div>
</div>
<!-- Active Community / Online Countries Strip -->
<div class="chat-online-strip">
<span class="strip-label">بەشداربووانی وڵاتان:</span>
<div class="country-pills" id="activeCountriesPills">
<span class="country-pill">کوردستان</span>
<span class="country-pill">US</span>
<span class="country-pill">Germany</span>
<span class="country-pill">UK</span>
<span class="country-pill">Sweden</span>
<span class="country-pill">Turkey</span>
<span class="country-pill">UAE</span>
<span class="country-pill">France</span>
</div>
</div>
<!-- Chat Messages Feed -->
<div class="chat-feed-container" id="chatFeed">
<div class="chat-welcome-banner">
<svg class="banner-sparkle" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2l2.4 7.2L21.6 12l-7.2 2.4L12 21.6l-2.4-7.2L2.4 12l7.2-2.4z"/></svg>
<p>بەخێربێن بۆ چاتی جیهانیی Lala Translate! بە هەر زمانێک بنووسیت، بەشداربووانی وڵاتانی تر دەتوانن بە یەک کلیک وەریبگێڕنە سەر زمانی خۆیان.</p>
</div>
<!-- Messages dynamically rendered here -->
</div>
<!-- Chat Input Bar -->
<div class="chat-input-bar">
<div class="chat-input-row">
<button id="toggleEmojiPickerBtn" class="icon-btn emoji-trigger" title="ئیمۆجی و کاردانەوە">
<svg width="19" height="19" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
<line x1="9" y1="9" x2="9.01" y2="9"></line>
<line x1="15" y1="9" x2="15.01" y2="9"></line>
</svg>
</button>
<input type="text" id="chatMessageInput" placeholder="پەیامەکەت لێرە بنووسە بە هەر زمانێک بێت (کوردی، English, العربية, فارسی...)..." autocomplete="off">
<button id="sendChatBtn" class="chat-send-btn" title="ناردنی پەیام">
<span>ناردن</span>
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="22" y1="2" x2="11" y2="13"></line>
<polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>
</svg>
</button>
</div>
<!-- Quick Emoji Drawer -->
<div id="emojiPickerDrawer" class="emoji-drawer hidden">
<button class="emoji-chip">❤️</button>
<button class="emoji-chip">☀️</button>
<button class="emoji-chip">👍</button>
<button class="emoji-chip">🔥</button>
<button class="emoji-chip">👋</button>
<button class="emoji-chip">😂</button>
<button class="emoji-chip">🌹</button>
<button class="emoji-chip">👏</button>
<button class="emoji-chip">🚀</button>
<button class="emoji-chip">✨</button>
</div>
</div>
</div>
</div> <!-- End chatView -->
<!-- Footer -->
<footer class="app-footer">
<p>دروستکراوە بە خۆشەویستی بۆ زمانی شیرینی کوردی <svg width="14" height="14" viewBox="0 0 24 24" fill="#ef4444" style="display:inline-block;vertical-align:-2px;"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg> بە هێزی تەکنەلۆژیای زیرەکی دەستکرد</p>
<p style="font-size:11px;opacity:.5;margin-top:4px">وەشان: voice17<span id="earTag"></span> · <a href="about.html" style="color:inherit">دەربارە</a></p>
<script>try { var e = new URLSearchParams(location.search).get('ear'); if (e === 'new' || e === 'old') localStorage.setItem('lala_ear', e); if (localStorage.getItem('lala_ear') === 'new') document.getElementById('earTag').textContent = ' · گوێی نوێ'; } catch (_) {}</script>
</footer>
</div>
<!-- Settings / Gemini API Key Modal -->
<div id="settingsModal" class="modal-backdrop hidden">
<div class="modal-card glass-card">
<div class="modal-header">
<div class="modal-title">
<svg viewBox="0 0 24 24" width="22" height="22" fill="none">
<path d="M12 2C12 7.52285 7.52285 12 2 12C7.52285 12 12 16.4771 12 22C12 16.4771 16.4771 12 22 12C16.4771 12 12 7.52285 12 2Z" fill="url(#geminiGradModal)" />
<defs>
<linearGradient id="geminiGradModal" x1="2" y1="2" x2="22" y2="22" gradientUnits="userSpaceOnUse">
<stop stop-color="#4E8AFF" />
<stop offset="0.5" stop-color="#8E54E9" />
<stop offset="1" stop-color="#FF5E62" />
</linearGradient>
</defs>
</svg>
<h3>ڕێکخستنی کلیل (Gemini API Key)</h3>
</div>
<button id="closeSettingsBtn" class="close-btn">×</button>
</div>
<div class="modal-body">
<p class="modal-desc">
ئەپەکە بە شێوەی خۆکار لە ڕێگەی بزوێنەری زیرەکی Lala Translate خزمەتگوزاری وەرگێڕان پێشکەش دەکات. ئەگەر کلیلی فەرمی بێبەرامبەری <strong>Google Gemini API</strong> تێبکەیت، ڕاستەوخۆ پەیوەست دەبێت بە پێشکەوتووترین مۆدێلی Google Gemini 1.5/2.5 Flash بە تایبەتمەندییە قووڵەکانی کوردی.
</p>
<div class="form-group">
<label for="geminiApiKeyInput">کلیلەکەت لێرە دابنێ (Gemini API Key):</label>
<input type="password" id="geminiApiKeyInput" placeholder="AQ.Ab8RN6..." autocomplete="off">
<small class="helper-text">
دەتوانی بە خۆڕایی کلیل بەدەستبهێنیت لە:
<a href="https://aistudio.google.com/app/apikey" target="_blank" rel="noopener">Google AI Studio (aistudio.google.com)</a>
</small>
</div>
<div class="form-group">
<label for="geminiModelSelect">مۆدێلی جێمینای:</label>
<select id="geminiModelSelect" class="form-select">
<option value="gemini-3-flash-preview" selected>Gemini 3 Flash (نوێترین و زۆر خێرا - پێشنیارکراو)</option>
<option value="gemini-3.5-flash">Gemini 3.5 Flash (زۆر بەهێز بۆ وەرگێڕانی قووڵ)</option>
<option value="gemini-3.8-flash">Gemini 3.8 Flash (نەوەی پێشکەوتوو)</option>
<option value="gemini-flash-latest">Gemini Flash Latest (خۆکارانە نوێترین مۆدێل)</option>
</select>
</div>
<div id="apiTestResult" class="api-test-box hidden"></div>
</div>
<div class="modal-footer">
<button id="testApiKeyBtn" class="pill-btn secondary">تاقیکردنەوەی پەیوەندی</button>
<button id="saveApiKeyBtn" class="pill-btn primary">پاشەکەوتکردن</button>
</div>
</div>
</div>
<!-- User Profile Modal for Global Chat -->
<div id="profileModal" class="modal-backdrop hidden">
<div class="modal-card glass-card">
<div class="modal-header">
<div class="modal-title">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
<h3>ڕێکخستنی پرۆفایلی چاتی جیهانی</h3>
</div>
<button id="closeProfileModalBtn" class="close-btn">×</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="profileUsernameInput">ناوی تۆ لە چاتدا:</label>
<input type="text" id="profileUsernameInput" placeholder="ناوەکەت بنووسە..." maxlength="25">
</div>
<div class="form-group">
<label for="profileCountrySelect">وڵات و ئاڵا:</label>
<select id="profileCountrySelect" class="form-select">
<option value="☀️|کوردستان">☀️ کوردستان (Kurdistan)</option>
<option value="🇮🇶|عێراق">🇮🇶 عێراق (Iraq)</option>
<option value="🇺🇸|ئەمریکا">🇺🇸 ئەمریکا (United States)</option>
<option value="🇬🇧|بەریتانیا">🇬🇧 بەریتانیا (United Kingdom)</option>
<option value="🇩🇪|ئەڵمانیا">🇩🇪 ئەڵمانیا (Germany)</option>
<option value="🇸🇪|سوید">🇸🇪 سوید (Sweden)</option>
<option value="🇹🇷|تورکیا">🇹🇷 تورکیا (Turkey)</option>
<option value="🇦🇪|ئیمارات">🇦🇪 ئیمارات (UAE)</option>
<option value="🇮🇷|ئێران">🇮🇷 ئێران (Iran)</option>
<option value="🇫🇷|فەڕەنسا">🇫🇷 فەڕەنسا (France)</option>
<option value="🇳🇱|هۆڵەندا">🇳🇱 هۆڵەندا (Netherlands)</option>
<option value="🇨🇦|کەنەدا">🇨🇦 کەنەدا (Canada)</option>
</select>
</div>
<div class="form-group">
<label for="profileLangSelect">زمانی خوازراوی تۆ بۆ وەرگێڕان (تەواوی پەیامەکان بەم زمانە وەردەگێڕدرێن):</label>
<select id="profileLangSelect" class="form-select">
<option value="ku" selected>کوردی (سۆرانی)</option>
<option value="en">ئینگلیزی (English)</option>
<option value="ar">عەرەبی (العربية)</option>
<option value="fa">فارسی (فارسی)</option>
<option value="tr">تورکی (Türkçe)</option>
<option value="de">ئەڵمانی (Deutsch)</option>
<option value="fr">فەڕەنسی (Français)</option>
</select>
</div>
</div>
<div class="modal-footer">
<button id="saveProfileBtn" class="pill-btn primary">پاشەکەوتکردن</button>
</div>
</div>
</div>
<!-- Real Human Podcast Audio Modal -->
<div id="realPodcastModal" class="modal-overlay hidden">
<div class="modal-card podcast-player-card">
<div class="modal-header">
<div class="modal-title">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" style="color: #ef4444;"><path d="M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm-2 14.5v-9l6 4.5z"/></svg>
<h3 id="realPodcastModalTitle" style="font-size: 1rem; color: #fff;">دەنگی ڕاستەقینەی پۆدکاست: م. ئاوات نەسروڵا</h3>
</div>
<button id="closeRealPodcastModalBtn" class="close-btn">×</button>
</div>
<div class="modal-body">
<div class="podcast-video-wrapper">
<iframe id="realPodcastIframe" width="100%" height="280" src="" title="دیوەخان پۆدکاست" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
<div class="podcast-real-quote" id="realPodcastQuote">
<!-- Text quote from episode -->
</div>
</div>
<div class="modal-footer" style="display: flex; justify-content: space-between; align-items: center; margin-top: 14px;">
<span style="font-size: 0.78rem; color: var(--text-dim);">🎙️ دەنگی ڕەسەنی مامۆستا ئاوات لە پۆدکاستی دیوەخان (#218)</span>
<button id="closeRealPodcastFooterBtn" class="pill-btn secondary">داخستن</button>
</div>
</div>
</div>
<!-- Direct Voice A/B Comparison Modal -->
<div id="voiceCompareModal" class="modal-overlay hidden">
<div class="modal-card compare-player-card">
<div class="modal-header">
<div class="modal-title">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#ef4444" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><path d="M10 15l5-3-5-3v6z"></path></svg>
<h3 style="font-size: 1.05rem; color: #fff;">بەراوردی ڕاستەوخۆی کوالیتی دەنگ (A/B Audio Comparison)</h3>
</div>
<button id="closeVoiceCompareModalBtn" class="close-btn">×</button>
</div>
<div class="modal-body">
<p style="font-size: 0.84rem; color: var(--text-muted); margin-bottom: 14px;">
گوێبیستی بەراوردی دەنگی ڕاستەقینە ببە لە نێوان سیستەمی کۆنی سێنتەسایزەر (Sample A) و سیستەمی نوێی نیوراڵی مرۆڤی سروشتی (Sample B):
</p>
<div class="compare-test-grid">
<!-- Item 1: Sorani Short -->
<div class="compare-card-item">
<div class="compare-card-header">
<span class="compare-badge">سۆرانی کورت</span>
<span class="compare-text">«سڵاو، چۆنی؟ بەخێربێیت بۆ ترانسلێت.»</span>
</div>
<div class="compare-actions">
<button class="compare-play-btn sample-a" data-src="/audio_samples/sorani_short_sampleA_existing.mp3">
<span>📻 Sample A: دەنگی کۆن (AI ڕۆبۆتی)</span>
</button>
<button class="compare-play-btn sample-b" data-src="/audio_samples/sorani_short_sampleB_neural.mp3">
<span>🎙️ Sample B: دەنگی نوێی مرۆڤ (Neural 48kHz)</span>
</button>
</div>
</div>
<!-- Item 2: Sorani Long -->
<div class="compare-card-item">
<div class="compare-card-header">
<span class="compare-badge">سۆرانی درێژ (ڕستەی تەواو)</span>
<span class="compare-text">«زمانی کوردی زمانێکی دەوڵەمەند و دێرینە، هەروەها خەڵکی کوردستان بە چەندین شێوەزاری جیاواز وەک سۆرانی و بادینی قسە دەکەن.»</span>
</div>
<div class="compare-actions">
<button class="compare-play-btn sample-a" data-src="/audio_samples/sorani_long_sampleA_existing.mp3">
<span>📻 Sample A: دەنگی کۆن (AI ڕۆبۆتی)</span>
</button>
<button class="compare-play-btn sample-b" data-src="/audio_samples/sorani_long_sampleB_neural.mp3">
<span>🎙️ Sample B: دەنگی نوێی مرۆڤ (Neural 48kHz)</span>
</button>
</div>
</div>
<!-- Item 3: Badini Short -->
<div class="compare-card-item">
<div class="compare-card-header">
<span class="compare-badge">بادینی (Badîni)</span>
<span class="compare-text">«سلاڤ، چەوانی؟ ب خێر هاتی بۆ ترانسلێت.»</span>
</div>
<div class="compare-actions">
<button class="compare-play-btn sample-a" data-src="/audio_samples/badini_short_sampleA_existing.mp3">
<span>📻 Sample A: دەنگی کۆن (AI ڕۆبۆتی)</span>
</button>
<button class="compare-play-btn sample-b" data-src="/audio_samples/badini_short_sampleB_neural.mp3">
<span>🎙️ Sample B: دەنگی نوێی مرۆڤ (Neural 48kHz)</span>
</button>
</div>
</div>
<!-- Item 4: English Studio -->
<div class="compare-card-item">
<div class="compare-card-header">
<span class="compare-badge">ئینگلیزی (English)</span>
<span class="compare-text" dir="ltr">"Welcome to Lala Translate. This is an authentic human-like voice translation test."</span>
</div>
<div class="compare-actions">
<button class="compare-play-btn sample-a" data-src="/audio_samples/english_sentence_sampleA_existing.mp3">
<span>📻 Sample A: دەنگی کۆن (Google Scraping)</span>
</button>
<button class="compare-play-btn sample-b" data-src="/audio_samples/english_sentence_sampleB_neural.mp3">
<span>🎙️ Sample B: دەنگی نوێی مرۆڤ (Neural Studio)</span>
</button>
</div>
</div>
</div>
</div>
<div class="modal-footer" style="display: flex; justify-content: space-between; align-items: center; margin-top: 14px;">
<span style="font-size: 0.78rem; color: var(--text-dim);">✨ سیستەمی نوێ بێ ڕۆبۆت و بە کوالیتی بەرز لە ڕێگەی Edge Neural Engine کار دەکات.</span>
<button id="closeVoiceCompareFooterBtn" class="pill-btn secondary">داخستن</button>
</div>
</div>
</div>
<!-- Native Kurdish Sorani Studio & Voice Recording Modal -->
<div id="nativeKurdishStudioModal" class="modal-overlay hidden" role="dialog" aria-modal="true" aria-labelledby="nativeStudioTitle">
<div class="modal-card native-studio-card" style="max-width: 680px;">
<div class="modal-header">
<div style="display: flex; align-items: center; gap: 10px;">
<span style="font-size: 1.6rem;">🎙️</span>
<div>
<h3 id="nativeStudioTitle" style="margin: 0; font-size: 1.2rem; color: #fff;">ستۆدیۆی دەنگە ڕەسەنەکانی کوردیی سۆرانی و کلۆنکردن</h3>
<span style="font-size: 0.78rem; color: #cbd5e1;">بێژەرە فەرمییە ڕەسەنەکانی سۆرانی (فاتیح و شاهێن) + تۆمارکردنی دەنگی تایبەتی خۆت</span>
</div>
</div>
<button id="closeNativeStudioBtn" class="modal-close-btn" aria-label="داخستن">✕</button>
</div>
<div class="modal-body" style="display: flex; flex-direction: column; gap: 20px; padding: 18px 0;">
<!-- Section 1: Native Studio Narrators (Fatih, Shahen, Giganet) -->
<div class="native-narrators-section">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
<span style="font-weight: 700; font-size: 0.95rem; color: #fff;">🎙️ دەنگە ڕەسەنەکانی سۆرانی لە کوردستان (Studio Narrators)</span>
<span style="font-size: 0.75rem; background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); padding: 2px 8px; border-radius: 12px;">24kHz Studio HD</span>
</div>
<div class="narrators-grid" style="display: flex; flex-direction: column; gap: 10px;">
<!-- Custom User Voice (sample.wav) -->
<div class="narrator-card" style="display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: linear-gradient(135deg, rgba(220, 38, 38, 0.18), rgba(147, 51, 234, 0.22)); border: 1px solid rgba(220, 38, 38, 0.45); border-radius: 12px;">
<div style="display: flex; align-items: center; gap: 12px;">
<span style="font-size: 1.8rem;">🎧</span>
<div>
<div style="font-weight: 700; color: #fff; font-size: 0.95rem; display: flex; align-items: center; gap: 6px;">
<span>دەنگی تایبەتیی خۆت (sample.wav)</span>
<span class="gemini-pill-badge active" style="font-size: 0.65rem; background: #dc2626; color: #fff;">دەنگی سەرەکی</span>
</div>
<div style="font-size: 0.75rem; color: #fca5a5;">«سڵاو هاوڕێکانم، چۆنی؟ ئەمڕۆ حەز دەکەم دەربارەی چێس قسە بکەین.»</div>
</div>
</div>
<div style="display: flex; gap: 8px;">
<button class="pill-btn play-sample-btn" data-url="/custom_voices/my_custom_voice.wav" style="font-size: 0.78rem; padding: 6px 12px; background: rgba(220, 38, 38, 0.35); border: 1px solid #dc2626; color: #fff; border-radius: 8px; cursor: pointer;">
▶ گوێگرتن لە دەنگت
</button>
<button class="pill-btn select-active-narrator-btn active" data-narrator="custom" style="font-size: 0.78rem; padding: 6px 12px; background: #dc2626; border: 1px solid #ef4444; color: #fff; border-radius: 8px; cursor: pointer; font-weight: bold;">
✨ هەڵبژێردراو
</button>
</div>
</div>
<!-- Fatih -->
<div class="narrator-card" style="display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px;">
<div style="display: flex; align-items: center; gap: 12px;">
<span style="font-size: 1.8rem;">👨💼</span>
<div>
<div style="font-weight: 700; color: #fff; font-size: 0.92rem;">فاتیح (Fatih)</div>
<div style="font-size: 0.75rem; color: #94a3b8;">بێژەری پەڕتووکی کوردی لە سلێمانی - پیاوانەی گەرم و پەتی</div>
</div>
</div>
<div style="display: flex; gap: 8px;">
<button class="pill-btn play-sample-btn" data-url="/audio_samples/kurdish_native/prompt-audiobook-male.wav" style="font-size: 0.78rem; padding: 6px 12px; background: rgba(239, 68, 68, 0.2); border: 1px solid #ef4444; color: #fff; border-radius: 8px; cursor: pointer;">
▶ نموونەی پەڕتووک
</button>
<button class="pill-btn play-sample-btn" data-url="/audio_samples/kurdish_native/output-audiobook-male.wav" style="font-size: 0.78rem; padding: 6px 12px; background: rgba(56, 189, 248, 0.2); border: 1px solid #38bdf8; color: #fff; border-radius: 8px; cursor: pointer;">
▶ نموونەی هەواڵ
</button>
<button class="pill-btn select-active-narrator-btn" data-narrator="fatih" style="font-size: 0.78rem; padding: 6px 12px; background: #16a34a; border: 1px solid #22c55e; color: #fff; border-radius: 8px; cursor: pointer;">
✨ چالاککردن
</button>
</div>
</div>
<!-- Shahen -->
<div class="narrator-card" style="display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px;">
<div style="display: flex; align-items: center; gap: 12px;">
<span style="font-size: 1.8rem;">👩💼</span>
<div>
<div style="font-weight: 700; color: #fff; font-size: 0.92rem;">شاهێن (Shahen)</div>
<div style="font-size: 0.75rem; color: #94a3b8;">بێژەری خانمانەی ئەدەبیی سۆرانی - دەنگێکی ناسک و مێلۆدی</div>
</div>
</div>
<div style="display: flex; gap: 8px;">
<button class="pill-btn play-sample-btn" data-url="/audio_samples/kurdish_native/prompt-audiobook-female.wav" style="font-size: 0.78rem; padding: 6px 12px; background: rgba(239, 68, 68, 0.2); border: 1px solid #ef4444; color: #fff; border-radius: 8px; cursor: pointer;">
▶ نموونەی پەڕتووک
</button>
<button class="pill-btn play-sample-btn" data-url="/audio_samples/kurdish_native/output-audiobook-female.wav" style="font-size: 0.78rem; padding: 6px 12px; background: rgba(56, 189, 248, 0.2); border: 1px solid #38bdf8; color: #fff; border-radius: 8px; cursor: pointer;">
▶ نموونەی هەواڵ
</button>
<button class="pill-btn select-active-narrator-btn" data-narrator="shahen" style="font-size: 0.78rem; padding: 6px 12px; background: #16a34a; border: 1px solid #22c55e; color: #fff; border-radius: 8px; cursor: pointer;">
✨ چالاککردن
</button>
</div>
</div>
<!-- Giganet Studio -->
<div class="narrator-card" style="display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px;">
<div style="display: flex; align-items: center; gap: 12px;">
<span style="font-size: 1.8rem;">🎙️</span>
<div>
<div style="font-weight: 700; color: #fff; font-size: 0.92rem;">گیگانێت (Giganet Studio)</div>
<div style="font-size: 0.75rem; color: #94a3b8;">بێژەری فەرمیی ستۆدیۆ لە کوردستان - تۆنێکی قووڵ و فەرمی</div>
</div>
</div>
<div style="display: flex; gap: 8px;">
<button class="pill-btn play-sample-btn" data-url="/audio_samples/kurdish_native/prompt-studio-male.wav" style="font-size: 0.78rem; padding: 6px 12px; background: rgba(239, 68, 68, 0.2); border: 1px solid #ef4444; color: #fff; border-radius: 8px; cursor: pointer;">
▶ نموونەی ستۆدیۆ
</button>
<button class="pill-btn select-active-narrator-btn" data-narrator="giganet" style="font-size: 0.78rem; padding: 6px 12px; background: #16a34a; border: 1px solid #22c55e; color: #fff; border-radius: 8px; cursor: pointer;">
✨ چالاککردن
</button>
</div>
</div>
</div>
</div>
<!-- Section 2: Record / Upload Your Own Kurdish Voice -->
<div class="custom-recording-section" style="background: linear-gradient(135deg, rgba(220, 38, 38, 0.12), rgba(147, 51, 234, 0.15)); border: 1px solid rgba(220, 38, 38, 0.35); border-radius: 14px; padding: 18px;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
<div style="display: flex; align-items: center; gap: 8px;">
<span style="font-size: 1.2rem;">🔴</span>
<span style="font-weight: 700; font-size: 0.95rem; color: #fff;">تۆمارکردنی دەنگی تایبەتی خۆت (Record Your Voice)</span>
</div>
<span id="recordingTimer" style="font-family: monospace; font-size: 0.88rem; color: #f87171; font-weight: 700;">00:00</span>
</div>
<p style="font-size: 0.8rem; color: #cbd5e1; margin-bottom: 12px;">
دەتوانیت بە مایکرۆفۆنی کۆمپیوتەرەکەت ئەم دەقە بخوێنیتەوە و دەنگەکەت ڕاستەوخۆ پاشەکەوت بکەیت وەک دەنگی تایبەتی ئەپەکە:
</p>
<div style="background: rgba(0,0,0,0.4); border: 1px dashed rgba(220,38,38,0.4); border-radius: 10px; padding: 12px; font-size: 0.88rem; color: #fca5a5; line-height: 1.6; margin-bottom: 14px;">
«سڵاو هاوڕێی بەڕێزم! من زۆر دڵخۆشم بە ئەپڵیکەیشنی ترانسلێت، ئێستا دەنگی خۆم بۆ وەرگێڕانەکان پاشەکەوت دەکەم.»
</div>
<div style="display: flex; align-items: center; gap: 10px; flex-wrap: wrap;">
<button id="startRecordBtn" class="pill-btn primary" style="background: #dc2626; border: none; font-size: 0.82rem; padding: 8px 16px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;">
<span>🔴</span>
<span id="recordBtnLabel">دەستپێکردنی تۆمارکردن</span>
</button>
<button id="stopRecordBtn" class="pill-btn secondary" disabled style="font-size: 0.82rem; padding: 8px 16px; border-radius: 8px; cursor: pointer; opacity: 0.5;">
⏹️ وەستاندن
</button>
<button id="playRecordBtn" class="pill-btn secondary" disabled style="font-size: 0.82rem; padding: 8px 16px; border-radius: 8px; cursor: pointer; opacity: 0.5;">
🔊 گوێگرتنەوە
</button>
<button id="saveRecordBtn" class="pill-btn primary" disabled style="background: #16a34a; border: none; font-size: 0.82rem; padding: 8px 16px; border-radius: 8px; cursor: pointer; opacity: 0.5;">
💾 پاشەکەوتکردن
</button>
<label style="margin-right: auto; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: #94a3b8; text-decoration: underline;">
📁 ئەپلۆدکردنی فایلی دەنگ (WAV/MP3)
<input type="file" id="uploadVoiceFileInput" accept="audio/*" style="display: none;" />
</label>
</div>
<div id="recordingStatusMsg" style="font-size: 0.78rem; min-height: 18px; margin-top: 8px; color: #4ade80;"></div>
</div>
</div>
</div>
</div>
<!-- Google Gemini AI Hyper-Realistic Neural Voice Modal -->
<div id="geminiVoiceModal" class="modal-overlay hidden" role="dialog" aria-modal="true" aria-labelledby="geminiVoiceTitle">
<div class="modal-card gemini-voice-card" style="max-width: 620px;">
<div class="modal-header">
<div style="display: flex; align-items: center; gap: 10px;">
<span style="font-size: 1.6rem;">✨</span>
<div>
<h3 id="geminiVoiceTitle" style="margin: 0; font-size: 1.18rem; color: #fff;">دەنگی مرۆڤانەی Google Gemini AI</h3>
<span style="font-size: 0.78rem; color: #94a3b8;">بەرهەمهێنانی دەنگی واقیعی، پڕ سۆز و مرۆڤانە بۆ زمانی کوردی و جیهانی</span>
</div>
</div>
<button id="closeGeminiVoiceBtn" class="modal-close-btn" aria-label="داخستن">✕</button>
</div>
<div class="modal-body" style="display: flex; flex-direction: column; gap: 18px; padding: 18px 0;">
<!-- Engine Status Card -->
<div class="gemini-voice-status-box" style="display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(129, 140, 248, 0.15)); border: 1px solid rgba(56, 189, 248, 0.3); border-radius: 12px;">
<div style="display: flex; align-items: center; gap: 12px;">
<div style="width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 10px #22c55e;"></div>
<div>
<div style="font-weight: 700; font-size: 0.92rem; color: #fff;">بزوێنەری دەنگی Gemini AI چالاکە</div>
<div style="font-size: 0.75rem; color: #cbd5e1;">پەیوەست بە مۆدێلی Gemini 3.8 / 2.5 Flash Speech بە کلیلی فەرمی</div>
</div>
</div>
<span style="background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700;">Active 24kHz HD</span>
</div>
<!-- Voice Personalities Grid -->
<div class="form-group" style="display: flex; flex-direction: column; gap: 10px;">
<label style="font-size: 0.88rem; font-weight: 600; color: #e2e8f0; display: flex; justify-content: space-between;">
<span>هەڵبژاردنی کەسایەتی دەنگ (Gemini Prebuilt Voice):</span>
<span style="font-size: 0.76rem; color: #38bdf8;">هەریەکەیان کلیلێکی فۆنەتیکی جیاوازە</span>
</label>
<div class="gemini-voice-grid" style="display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px;">
<!-- Puck -->
<div class="gemini-voice-option active" data-voice-id="Puck">
<span class="voice-avatar">👨💼</span>
<div class="voice-meta">
<div style="display: flex; align-items: center; gap: 6px;">
<span class="voice-name" style="font-weight: 700; color: #fff;">Puck</span>
<span style="font-size: 0.65rem; background: rgba(56, 189, 248, 0.2); color: #38bdf8; padding: 1px 6px; border-radius: 4px;">پێشنیارکراو</span>
</div>
<span class="voice-desc" style="font-size: 0.76rem; color: #94a3b8;">پیاوانەی گەرم، زیندوو و زۆر سروشتی</span>
</div>
</div>
<!-- Kore -->
<div class="gemini-voice-option" data-voice-id="Kore">
<span class="voice-avatar">👩💼</span>
<div class="voice-meta">
<span class="voice-name" style="font-weight: 700; color: #fff;">Kore</span>
<span class="voice-desc" style="font-size: 0.76rem; color: #94a3b8;">خانمانەی هێمن، ناسک و مێلۆدیی نەرم</span>
</div>
</div>
<!-- Charon -->
<div class="gemini-voice-option" data-voice-id="Charon">
<span class="voice-avatar">🎙️</span>
<div class="voice-meta">
<span class="voice-name" style="font-weight: 700; color: #fff;">Charon</span>
<span class="voice-desc" style="font-size: 0.76rem; color: #94a3b8;">ستۆدیۆیی و بێژەری، دەنگ قووڵ و پڕمتمانە</span>
</div>
</div>
<!-- Fenrir -->
<div class="gemini-voice-option" data-voice-id="Fenrir">
<span class="voice-avatar">🏛️</span>
<div class="voice-meta">
<span class="voice-name" style="font-weight: 700; color: #fff;">Fenrir</span>
<span class="voice-desc" style="font-size: 0.76rem; color: #94a3b8;">پیاوانەی بەهێز، فەرمی و دەسەڵاتدار</span>
</div>
</div>
<!-- Aoede -->
<div class="gemini-voice-option" data-voice-id="Aoede">
<span class="voice-avatar">🌸</span>
<div class="voice-meta">
<span class="voice-name" style="font-weight: 700; color: #fff;">Aoede</span>
<span class="voice-desc" style="font-size: 0.76rem; color: #94a3b8;">خانمانەی ئەدەبی، چیڕۆکخوان و پڕ هەست</span>
</div>
</div>
</div>
</div>
<!-- Live Audio Preview Box -->
<div class="test-preview-box" style="background: rgba(56, 189, 248, 0.08); border: 1px solid rgba(56, 189, 248, 0.25); border-radius: 12px; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center;">
<div style="display: flex; flex-direction: column; gap: 3px;">
<span style="font-size: 0.84rem; font-weight: 600; color: #e0f2fe;">تاقیکردنەوەی دەنگ بە ڕستەی کوردی:</span>
<span style="font-size: 0.74rem; color: #7dd3fc;">«سڵاو! بەخێربێن بۆ ئەپڵیکەیشنی ترانسلێت، پێشکەوتووترین وەرگێڕی زمانی کوردی.»</span>
</div>
<button id="testGeminiVoiceAudioBtn" class="pill-btn primary" style="background: linear-gradient(135deg, #0284c7, #6366f1); border: none; font-size: 0.82rem; padding: 8px 18px; gap: 8px; border-radius: 8px;">
<svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>
<span>گوێگرتن لە دەنگ</span>
</button>
</div>
</div>
</div>
</div>
<!-- ElevenLabs AI Hyper-Realistic Voice Modal -->
<div id="elevenLabsModal" class="modal-overlay hidden" role="dialog" aria-modal="true" aria-labelledby="elevenLabsTitle">
<div class="modal-card elevenlabs-card" style="max-width: 580px;">
<div class="modal-header">
<div style="display: flex; align-items: center; gap: 10px;">
<span style="font-size: 1.5rem;">✨</span>
<div>
<h3 id="elevenLabsTitle" style="margin: 0; font-size: 1.15rem; color: #fff;">دەنگی مرۆڤانەی ElevenLabs AI</h3>
<span style="font-size: 0.76rem; color: var(--text-dim);">بەستنەوە بە بەهێزترین و واقیعیترین دەنگی مرۆڤ لە جیهاندا</span>
</div>
</div>
<button id="closeElevenLabsBtn" class="modal-close-btn" aria-label="داخستن">✕</button>
</div>
<div class="modal-body" style="display: flex; flex-direction: column; gap: 16px; padding: 18px 0;">
<!-- Engine Switcher -->
<div class="ai-engine-toggle-card">
<div class="toggle-info">
<span class="toggle-title">چالاککردنی بزوێنەری ElevenLabs</span>
<span class="toggle-desc">لە کاتی چالاکبووندا، سەرجەم وەرگێڕانەکان بە دەنگی پڕ هەست و مرۆڤانەی ElevenLabs دەخوێندرێنەوە.</span>
</div>
<label class="switch">
<input type="checkbox" id="elevenLabsEnableToggle">
<span class="slider round"></span>
</label>
</div>
<!-- API Key Input -->
<div class="form-group" style="display: flex; flex-direction: column; gap: 6px;">
<label for="elevenLabsApiKeyInput" style="font-size: 0.85rem; font-weight: 600; color: #e2e8f0; display: flex; justify-content: space-between;">
<span>کلیلی نهێنی (API Key):</span>
<a href="https://elevenlabs.io" target="_blank" rel="noopener" style="color: #f87171; font-size: 0.76rem; text-decoration: underline;">وەرگرتنی کلیل لە ElevenLabs.io</a>
</label>
<div style="display: flex; gap: 8px;">
<input type="password" id="elevenLabsApiKeyInput" class="custom-input" placeholder="xi-api-key ی تایبەت بە خۆت بنووسە..." style="flex: 1; padding: 10px 14px; background: rgba(0,0,0,0.5); border: 1px solid rgba(220,38,38,0.3); border-radius: 8px; color: #fff; font-family: monospace; font-size: 0.88rem;" />
<button id="testElevenLabsKeyBtn" class="pill-btn secondary" style="white-space: nowrap; padding: 0 14px; font-size: 0.8rem;">پشکنینی کلیل</button>
</div>
<span id="elevenLabsKeyStatus" style="font-size: 0.76rem; min-height: 18px; color: var(--text-dim);"></span>
</div>
<!-- Voice Selection -->
<div class="form-group" style="display: flex; flex-direction: column; gap: 8px;">
<label style="font-size: 0.85rem; font-weight: 600; color: #e2e8f0;">هەڵبژاردنی کەسایەتی دەنگ (ElevenLabs Voice):</label>
<div class="eleven-voice-grid" style="display: grid; grid-template-columns: 1fr 1fr; gap: 8px;">
<div class="eleven-voice-option active" data-voice-id="pNInz6obpgDQGcFmaJgB">
<span class="voice-avatar">👨💼</span>
<div class="voice-meta">
<span class="voice-name">Adam</span>
<span class="voice-desc">پیاوانەی گەرم و واقیعی</span>
</div>
</div>
<div class="eleven-voice-option" data-voice-id="21m00Tcm4TlvDq8ikWAM">
<span class="voice-avatar">👩💼</span>
<div class="voice-meta">
<span class="voice-name">Rachel</span>
<span class="voice-desc">ئافرەتانەی هێمن و سروشتی</span>
</div>
</div>
<div class="eleven-voice-option" data-voice-id="ErXwobaYiN019PkySvjV">
<span class="voice-avatar">🎙️</span>
<div class="voice-meta">
<span class="voice-name">Antoni</span>
<span class="voice-desc">پیاوانەی دڵنیا و فەرمی</span>
</div>
</div>
<div class="eleven-voice-option" data-voice-id="EXAVITQu4vr4xnSDxMaL">
<span class="voice-avatar">🌸</span>
<div class="voice-meta">
<span class="voice-name">Bella</span>
<span class="voice-desc">ئافرەتانەی ناسک و بەسۆز</span>
</div>
</div>
</div>
</div>
<!-- Custom Voice ID -->
<div class="form-group" style="display: flex; flex-direction: column; gap: 6px;">
<label for="elevenLabsCustomVoiceId" style="font-size: 0.8rem; color: var(--text-dim);">یاخود دەنگی دڵخوازی خۆت بنووسە (Custom Voice ID):</label>
<input type="text" id="elevenLabsCustomVoiceId" class="custom-input" placeholder="نموونە: pNInz6obpgDQGcFmaJgB" style="padding: 8px 12px; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; color: #fff; font-size: 0.82rem; font-family: monospace;" />
</div>
<!-- Live Audio Test -->
<div class="test-preview-box" style="background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.25); border-radius: 8px; padding: 12px; display: flex; justify-content: space-between; align-items: center;">
<span style="font-size: 0.82rem; color: #fca5a5;">تاقیکردنەوەی خوێندنەوەی «خوشکە بەڕێزەکەم، سڵاو و دەستخۆشی»</span>
<button id="testElevenLabsAudioBtn" class="pill-btn primary" style="font-size: 0.8rem; padding: 6px 14px; gap: 6px;">
<svg width="12" height="12" viewBox="0 0 24 24" fill="currentColor"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>
<span>گوێگرتن</span>
</button>
</div>
</div>
<div class="modal-footer" style="display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 14px;">
<span style="font-size: 0.74rem; color: var(--text-dim);">🔒 کلیلەکەت تەنیا لەناو وێبگەڕەکەی خۆتدا پاشەکەوت دەکرێت.</span>
<div style="display: flex; gap: 8px;">
<button id="saveElevenLabsBtn" class="pill-btn primary" style="padding: 8px 18px; font-weight: 600;">پاشەکەوتکردن</button>
<button id="closeElevenLabsFooterBtn" class="pill-btn secondary" style="padding: 8px 14px;">داخستن</button>
</div>
</div>
</div>
</div>
<!-- Toast Notification -->
<div id="toastNotification" class="toast hidden">
<span id="toastIcon">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2l2.4 7.2L21.6 12l-7.2 2.4L12 21.6l-2.4-7.2L2.4 12l7.2-2.4z"/></svg>
</span>
<span id="toastMessage">پەیام</span>
</div>
<script src="app.js?v=20261126_lala_voice17"></script>
</body>
</html>
<html lang="ckb" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="Lala Translate">
<meta name="application-name" content="Lala Translate">
<meta name="theme-color" content="#0a0a0c">
<!-- The app version: deploy_cloudflare.py copies it into version.json; phones with an older copy see "new update" -->
<meta name="lala-version" content="voice17">
<meta name="referrer" content="no-referrer">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>Lala Translate - وەرگێڕی دەنگی لالا</title>
<script>
// The Hugging Face "storage" link has no server (no Gemini, no voice chat): send people to the real link
(function () {
var h = location.hostname;
if (/\.static\.hf\.space$/.test(h)) {
var w = /-test\./.test(h) ? 'translet-test' : 'translet';
location.replace('https://' + w + '.alandblnd8141.workers.dev' + location.pathname.replace(/index\.html$/, '') + location.search + location.hash);
}
})();
</script>
<!-- iOS & Android Home Screen App Icons -->
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon-180x180.png">
<link rel="apple-touch-icon" sizes="192x192" href="apple-touch-icon-192x192.png">
<link rel="apple-touch-icon" sizes="512x512" href="apple-touch-icon-512x512.png">
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="lala-icon.ico"><!-- not favicon.ico: Hugging Face serves its own file at that name -->
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<!-- PWA Web App Manifest -->
<link rel="manifest" href="manifest.json">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<!-- Modern Fonts: Vazirmatn for Kurdish/Arabic, Plus Jakarta Sans for Latin -->
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Vazirmatn:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css?v=voice17">
</head>
<body>
<div class="app-background">
<div class="ambient-glow glow-1"></div>
<div class="ambient-glow glow-2"></div>
<div class="ambient-glow glow-3"></div>
</div>
<div class="app-container">
<!-- Header -->
<header class="app-header">
<div class="brand">
<div class="logo-gemini">
<img src="logo-128.png" alt="Lala Translate Logo" class="logo-img" width="128" height="70">
</div>
<div class="brand-text">
<h1><span class="brand-lala">Lala</span> <span class="brand-translet">Translate</span></h1>
<p class="tagline">وەرگێڕی دەقی سروشتی و پێشکەوتووی کوردی و جیهانی</p>
</div>
</div>
<div class="header-actions">
<!-- Latin / Kurdish Alphabet Toggle -->
<button id="toggleKurdishLatinBtn" class="pill-btn secondary" title="گۆڕینی نووسینی کوردی بۆ لاتینی / ئەلفوبێی عەرەبی">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="m5 8 6 6" />
<path d="m4 14 6-6 2-3" />
<path d="M2 5h12" />
<path d="M7 2h1" />
<path d="m22 22-5-10-5 10" />
<path d="M14 18h6" />
</svg>
<span id="scriptBadgeText">کوردی (سۆرانی)</span>
</button>
<!-- API Settings Modal Button -->
<button id="openSettingsBtn" class="pill-btn primary" title="ڕێکخستنی کلیل (API Key) ی جێمینای">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span id="aiModeStatusText">بەستنەوە بە Gemini AI</span>
</button>
</div>
</header>
<!-- Main App Navigation Tabs -->
<nav class="app-nav">
<button id="navTranslatorBtn" class="nav-tab active">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="m5 8 6 6"></path>
<path d="m4 14 6-6 2-3"></path>
<path d="M2 5h12"></path>
<path d="M7 2h1"></path>