/* Dertli Bot — Noir Minimal (2026-09-30)
   I errët, modern, profesional. Një theks i vetëm: ari. */
:root{
  --primary:#d4af37; /* e vendos CONFIG.THEME_COLOR nga app.js */
  --gold:#d4af37;
  --gold-bright:#f2d879;
  --bg:#0a0a0b;
  --panel:#111113;
  --panel-2:#17171a;
  --text:#ececec;
  --muted:#a1a1aa;
  --line:rgba(255,255,255,.08);
}
*{margin:0;padding:0;box-sizing:border-box}
body{
  font-family:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  min-height:100vh;
  background:radial-gradient(1200px 800px at 50% -10%, #151517 0%, var(--bg) 55%) , var(--bg);
  display:flex;align-items:center;justify-content:center;
  padding:20px 16px;
  color:var(--text);
  -webkit-font-smoothing:antialiased;
}
.chat-shell{
  width:100%;max-width:460px;height:min(92vh,800px);
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:24px;
  display:flex;flex-direction:column;overflow:hidden;
  box-shadow:0 30px 80px rgba(0,0,0,.6), 0 0 60px rgba(212,175,55,.05);
}
/* ---------- Header ---------- */
.chat-header{
  padding:18px 20px 16px;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  flex-shrink:0;
  border-bottom:1px solid var(--line);
}
.bot-identity{display:flex;align-items:center;gap:14px;min-width:0}
.bot-avatar{
  width:48px;height:48px;border-radius:50%;flex-shrink:0;overflow:hidden;padding:0;
  border:1px solid rgba(212,175,55,.55);
  box-shadow:0 0 16px rgba(212,175,55,.25);
  background:#0a0a0b;
}
.bot-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.bot-titles{display:flex;flex-direction:column;justify-content:center;min-width:0}
.bot-name{
  font-weight:600;font-size:15px;letter-spacing:.22em;text-transform:uppercase;
  background:linear-gradient(110deg,#f5e9c8 20%,#fff7dd 38%,var(--gold) 50%,#fff7dd 62%,#f5e9c8 80%);
  background-size:200% auto;-webkit-background-clip:text;background-clip:text;color:transparent;
  animation:goldShimmer 6s linear infinite;
  white-space:nowrap;
}
@keyframes goldShimmer{to{background-position:200% center}}
.bot-subtitle{font-size:12px;color:var(--muted);margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bot-status{font-size:11px;color:var(--muted);margin-top:5px;display:flex;align-items:center;gap:6px}
.dot{width:7px;height:7px;border-radius:50%;background:#4ade80;display:inline-block;
  box-shadow:0 0 8px #4ade80;animation:pulse 2s infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.35}}
.header-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}
/* ---------- Messages ---------- */
.chat-messages{
  flex:1;overflow-y:auto;padding:22px 18px;
  display:flex;flex-direction:column;gap:14px;
  scrollbar-width:thin;scrollbar-color:#3a3a3e transparent;
}
.chat-messages::-webkit-scrollbar{width:5px}
.chat-messages::-webkit-scrollbar-thumb{background:#3a3a3e;border-radius:4px}
.message{display:flex;gap:10px;max-width:88%;animation:fadeUp .3s cubic-bezier(.2,.9,.3,1) both}
@keyframes fadeUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.message.bot{align-self:flex-start}
.message.user{align-self:flex-end}
.message .avatar{
  width:30px;height:30px;border-radius:50%;flex-shrink:0;overflow:hidden;padding:0;
  border:1px solid rgba(212,175,55,.4);
}
.message .avatar img{width:100%;height:100%;object-fit:cover;display:block}
.bubble-wrap{display:flex;flex-direction:column;min-width:0;max-width:100%}
.bubble{
  padding:12px 15px;font-size:14.5px;line-height:1.6;
  word-wrap:break-word;white-space:normal;color:var(--text);
}
.bubble a{color:var(--gold-bright)}
.bubble strong{font-weight:600;color:#fff}
.message.bot .bubble{
  background:rgba(255,255,255,.045);
  border:1px solid var(--line);
  border-radius:4px 16px 16px 16px;
}
/* Mesazhi i lockdown-it: stil premium gold — dallon nga gabimet e zakonshme. */
.message.bot.lockdown .bubble{
  background:linear-gradient(135deg,rgba(212,175,55,.14),rgba(212,175,55,.05));
  border:1px solid rgba(212,175,55,.65);
  box-shadow:0 0 22px rgba(212,175,55,.22), inset 0 0 18px rgba(212,175,55,.06);
}
.message.bot.lockdown .avatar{
  box-shadow:0 0 14px rgba(212,175,55,.5);
}
#today-count{
  opacity:.6;
  font-size:11.5px;
  margin-left:6px;
  white-space:nowrap;
}
.message.user .bubble{
  background:linear-gradient(135deg,var(--gold-bright),var(--gold) 60%,#a8841c);
  color:#1a1405;font-weight:500;
  border-radius:16px 4px 16px 16px;
  box-shadow:0 6px 20px rgba(212,175,55,.18);
}
.message.user .bubble a{color:#1a1405;text-decoration:underline}
.message.user .bubble strong{color:#1a1405}
/* Vlerësimi 👍/👎 */
.msg-actions{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}
.msg-act{
  border:1px solid var(--line);background:transparent;color:var(--muted);
  font-size:11px;padding:4px 10px;border-radius:999px;cursor:pointer;line-height:1.4;
  transition:border-color .15s ease,color .15s ease,background .15s ease;
}
.msg-act:hover{border-color:rgba(212,175,55,.6);color:var(--gold-bright)}
.msg-act.active{background:rgba(212,175,55,.14);border-color:var(--gold);color:var(--gold-bright)}
/* Typing */
.typing .bubble{display:flex;gap:6px;align-items:center;padding:15px 17px}
.typing span{width:7px;height:7px;border-radius:50%;background:var(--gold);animation:bounce 1.2s infinite}
.typing span:nth-child(2){animation-delay:.15s}
.typing span:nth-child(3){animation-delay:.3s}
@keyframes bounce{0%,60%,100%{transform:none;opacity:.5}30%{transform:translateY(-6px);opacity:1}}
/* Suggestions */
.suggestions{
  display:flex;gap:8px;overflow-x:auto;padding:12px 18px;
  border-top:1px solid var(--line);flex-shrink:0;
  scrollbar-width:none;-ms-overflow-style:none;scroll-padding:0 18px;
}
.suggestions::-webkit-scrollbar{display:none}
.suggestions:empty{display:none}
.chip{
  flex-shrink:0;background:transparent;border:1px solid rgba(212,175,55,.4);color:var(--gold-bright);
  padding:8px 15px;border-radius:999px;font-size:13px;font-weight:500;font-family:inherit;cursor:pointer;
  transition:.18s;
}
.chip:hover{background:linear-gradient(135deg,var(--gold-bright),var(--gold));border-color:transparent;color:#1a1405}
/* ---------- Input ---------- */
.chat-input{
  display:flex;gap:10px;padding:14px 18px;flex-shrink:0;align-items:center;
  border-top:1px solid var(--line);
}
.chat-input input{
  flex:1;min-width:0;background:rgba(255,255,255,.045);
  border:1px solid var(--line);border-radius:999px;
  padding:13px 19px;font-size:15px;font-family:inherit;outline:none;color:var(--text);
  transition:border-color .2s ease, box-shadow .2s ease;
}
.chat-input input::placeholder{color:#6b6b72}
.chat-input input:focus{border-color:rgba(212,175,55,.65);box-shadow:0 0 0 3px rgba(212,175,55,.12)}
.icon-btn{
  width:44px;height:44px;border-radius:50%;flex-shrink:0;cursor:pointer;
  border:1px solid var(--line);background:transparent;color:var(--muted);font-size:18px;
  display:flex;align-items:center;justify-content:center;transition:.18s;
}
.icon-btn:hover{border-color:rgba(212,175,55,.6);color:var(--gold-bright)}
#mic-btn.recording{background:#ef4444;border-color:#ef4444;color:#fff;animation:pulse 1s infinite}
#send-btn{
  width:48px;height:48px;border-radius:50%;border:none;cursor:pointer;flex-shrink:0;
  background:linear-gradient(135deg,var(--gold-bright),var(--gold) 60%,#a8841c);
  color:#1a1405;font-size:19px;
  box-shadow:0 4px 18px rgba(212,175,55,.4);
  transition:transform .15s ease,box-shadow .15s ease,opacity .15s ease;
  display:flex;align-items:center;justify-content:center;
}
#send-btn:hover{transform:scale(1.06);box-shadow:0 6px 24px rgba(212,175,55,.55)}
#send-btn:disabled{opacity:.45;cursor:default;transform:none}
/* Foto në bisedë */
.chat-image{max-width:230px;max-height:230px;border-radius:12px;display:block;margin:2px 0;object-fit:cover}
.img-caption{margin-top:6px}
/* ---------- Ikona Telegram në header ---------- */
.tg-icon-btn{
  width:40px;height:40px;border-radius:50%;flex-shrink:0;
  border:1px solid rgba(212,175,55,.45);
  display:flex;align-items:center;justify-content:center;
  color:var(--gold-bright);text-decoration:none;
  transition:transform .2s ease,box-shadow .2s ease,background .2s ease;
}
.tg-icon-btn svg{width:18px;height:18px;fill:currentColor;display:block}
.tg-icon-btn:hover{
  background:rgba(212,175,55,.12);
  box-shadow:0 0 18px rgba(212,175,55,.35);
  transform:translateY(-1px);
}
/* ---------- Mobile ---------- */
@media(max-width:520px){
  html,body{min-height:100vh;min-height:100dvh}
  body{padding:0}
  .chat-shell{max-width:100%;height:100vh;height:100dvh;border-radius:0;border-left:none;border-right:none}
  .chat-input input{font-size:16px} /* iOS: nuk zmadhohet faqja në fokus */
  .chat-input{gap:8px;padding:12px}
  .icon-btn,#send-btn{width:44px;height:44px}
  .bubble{font-size:15px}
  .chip{min-height:40px;display:inline-flex;align-items:center}
  .msg-act{font-size:12px;padding:6px 12px}
}
@media (prefers-reduced-motion:reduce){
  .bot-name,.dot,.typing span,#mic-btn.recording{animation:none}
  .message{animation:none}
}
/* ---------- Animime premium (te lehta, vetem transform/opacity) ---------- */
/* 2. Logo me frymemarrje */
.bot-avatar{animation:breathe 4.5s ease-in-out infinite}
@keyframes breathe{
  0%,100%{box-shadow:0 0 14px rgba(212,175,55,.22)}
  50%{box-shadow:0 0 28px rgba(212,175,55,.5)}
}
/* 3. Pluhur ari ambient */
.chat-shell{position:relative;z-index:1}
.dust{position:fixed;inset:0;pointer-events:none;z-index:0;overflow:hidden}
.dust span{
  position:absolute;bottom:-12px;border-radius:50%;
  background:radial-gradient(circle,rgba(242,216,121,.85),rgba(212,175,55,0) 70%);
  opacity:0;animation:rise linear infinite;
}
@keyframes rise{
  0%{transform:translateY(0);opacity:0}
  12%{opacity:.65}
  85%{opacity:.2}
  100%{transform:translateY(-108vh);opacity:0}
}
/* 4a. Butoni Dergo "tkurret" kur shtypet */
#send-btn:active{transform:scale(.9)}
/* 4b. Mesazhi yt hyn me pop te lehte */
.message.user{animation:popIn .28s cubic-bezier(.2,.9,.3,1.25) both}
@keyframes popIn{from{opacity:0;transform:translateY(10px) scale(.96)}to{opacity:1;transform:none}}
/* 1. Kursori i typewriter-it */
.tw-caret{
  display:inline-block;width:2px;height:1.05em;background:var(--gold);
  margin-left:3px;vertical-align:-3px;animation:blink 1s steps(1) infinite;
}
@keyframes blink{50%{opacity:0}}
@media (prefers-reduced-motion:reduce){
  .bot-avatar,.dust span,.tw-caret{animation:none}
  .dust{display:none}
}

/* ---------- Pyetjet pasuese (chip-a nën përgjigje) ---------- */
.followups{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.chip-sm{font-size:12px;padding:6px 12px;opacity:.92}
/* ---------- Banner-i i njoftimit ---------- */
.banner{display:flex;align-items:center;gap:10px;padding:10px 14px;flex-shrink:0;
  background:linear-gradient(135deg,rgba(212,175,55,.16),rgba(212,175,55,.05));
  border-bottom:1px solid rgba(212,175,55,.35);font-size:13px;color:var(--text);
  animation:fadeUp .3s cubic-bezier(.2,.9,.3,1) both}
.banner-text{flex:1;line-height:1.45}
.banner-x{background:transparent;border:1px solid var(--line);color:var(--muted);border-radius:50%;
  width:26px;height:26px;cursor:pointer;flex-shrink:0;font-size:12px;line-height:1;
  display:flex;align-items:center;justify-content:center}
.banner-x:hover{color:var(--gold-bright);border-color:rgba(212,175,55,.6)}

/* ============ VEÇORITË PREMIUM v3 ============ */
/* Tema e çelur */
html[data-theme="light"]{
  --bg:#f4f2ec;
  --panel:#ffffff;
  --panel-2:#f0ede4;
  --text:#1c1a14;
  --muted:#6b675c;
  --line:rgba(0,0,0,.1);
  --gold-bright:#8a6d1a; /* ari i errët — i lexueshëm mbi të bardhë */
}
html[data-theme="light"] body{
  background:radial-gradient(1200px 800px at 50% -10%, #ffffff 0%, var(--bg) 55%), var(--bg);
}
html[data-theme="light"] .chat-shell{background:rgba(255,255,255,.7)}
html[data-theme="light"] .bubble{background:#fff;border-color:var(--line)}
html[data-theme="light"] .bubble strong{color:inherit} /* ishte #fff — i padukshëm mbi të bardhë */
html[data-theme="light"] .message.user .bubble{background:linear-gradient(135deg,var(--gold-bright),var(--gold));color:#1a1405}
html[data-theme="light"] .bot-name{ /* gradient ari i errët për sfond të çelur */
  background:linear-gradient(110deg,#8a6d1a 20%,#c39a2b 38%,#d4af37 50%,#c39a2b 62%,#8a6d1a 80%);
  background-size:200% auto;-webkit-background-clip:text;background-clip:text;color:transparent;
}
html[data-theme="light"] .chat-input input{background:#fff}
html[data-theme="light"] .chat-input input::placeholder{color:#8a877e}
html[data-theme="light"] .chat-messages{scrollbar-color:#c9c4b4 transparent}
html[data-theme="light"] .chat-messages::-webkit-scrollbar-thumb{background:#c9c4b4}

/* Chip ari + pyetja e ditës */
.chip-gold{
  border-color:rgba(212,175,55,.55);
  background:rgba(212,175,55,.1);
  color:var(--gold-bright);
}
.chip-qotd{
  border-color:rgba(212,175,55,.7);
  background:linear-gradient(135deg,rgba(212,175,55,.18),rgba(212,175,55,.06));
  display:inline-flex;flex-direction:column;align-items:flex-start;gap:2px;
  text-align:left;max-width:100%;
}
.qotd-label{font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--gold-bright)}

/* Butonat e opsioneve (kuiz / sondazh) */
.opt-list{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.opt-btn{
  display:block;width:100%;text-align:left;cursor:pointer;
  background:var(--panel-2);color:var(--text);
  border:1px solid var(--line);border-radius:10px;padding:9px 12px;font-size:14px;
  transition:border-color .15s,background .15s;
}
.opt-btn:hover:not(:disabled){border-color:rgba(212,175,55,.6)}
.opt-btn:disabled{cursor:default;opacity:.85}
.opt-ok{border-color:#22c55e!important;background:rgba(34,197,94,.15)!important}
.opt-bad{border-color:#ef4444!important;background:rgba(239,68,68,.15)!important}

/* Forma e kontaktit + sugjerimi */
.lead-in{
  width:100%;margin-top:8px;padding:9px 12px;border-radius:10px;font-size:14px;
  background:var(--panel-2);color:var(--text);border:1px solid var(--line);
}
.lead-in:focus{outline:none;border-color:rgba(212,175,55,.6)}
.lead-row{display:flex;gap:8px;margin-top:10px}
.suggest-form{margin-top:10px}
.suggest-ta{
  width:100%;min-height:70px;padding:9px 12px;border-radius:10px;font-size:14px;
  background:var(--panel-2);color:var(--text);border:1px solid var(--line);resize:vertical;
}
.suggest-ta:focus{outline:none;border-color:rgba(212,175,55,.6)}
.sg-open{opacity:.75}
