/**
 * Nova AI v3.2
 */
:root{--bg:#0d0d0d;--sf:#1a1a1a;--bd:#2a2a2a;--tx:#e5e5e5;--mt:#666;--ac:#10a37f}
*{box-sizing:border-box}

.nova-ai{display:flex;flex-direction:column;width:100%;height:85vh;min-height:500px;max-height:900px;background:var(--bg);border-radius:8px;overflow:hidden;font:14px -apple-system,sans-serif;color:var(--tx)}

/* Bar */
.nova-bar{display:flex;gap:8px;padding:8px 12px;background:var(--sf);border-bottom:1px solid var(--bd)}
.nova-tab{padding:6px 16px;background:0;border:1px solid var(--bd);border-radius:6px;color:var(--mt);font-size:13px;cursor:pointer}
.nova-tab:hover{color:var(--tx)}
.nova-tab.on{background:var(--bg);color:var(--tx)}
.nova-bar select{flex:1;max-width:260px;padding:6px 10px;background:var(--bg);border:1px solid var(--bd);border-radius:6px;color:var(--tx);font-size:13px}
#nova-new{width:28px;background:0;border:1px solid var(--bd);border-radius:6px;color:var(--mt);font-size:16px;cursor:pointer}
#nova-new:hover{color:var(--tx)}

/* Box - NUR EINER SICHTBAR */
.nova-box{display:none;flex-direction:column;flex:1;overflow:hidden}
.nova-box.on{display:flex}

/* Chat Log */
.nova-chat{flex:1;overflow-y:auto;padding:16px}
.nova-chat::-webkit-scrollbar{width:6px}
.nova-chat::-webkit-scrollbar-thumb{background:var(--bd);border-radius:3px}

/* Messages */
.nova-msg{display:flex;gap:10px;padding:12px 0;max-width:800px;margin:0 auto;animation:fade .2s}
@keyframes fade{from{opacity:0}}
.nova-msg+.nova-msg{border-top:1px solid var(--bd)}
.nova-av{width:26px;height:26px;border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:13px;flex-shrink:0}
.nova-msg.user .nova-av{background:#6366f1}
.nova-msg.ai .nova-av{background:var(--ac)}
.nova-txt{flex:1;line-height:1.6}
.nova-txt p{margin:0 0 10px}
.nova-txt p:last-child{margin:0}
.nova-txt code{background:#161616;padding:2px 5px;border-radius:3px;font-size:13px}
.nova-txt ul,.nova-txt ol{margin:8px 0;padding-left:20px}
.nova-txt a{color:var(--ac)}
.nova-img{max-width:180px;max-height:120px;border-radius:6px;margin-bottom:8px}
.nova-model{font-size:11px;color:var(--mt);margin-bottom:4px}

/* Code Block */
.nova-code{margin:10px 0;border-radius:6px;overflow:hidden;background:#161616}
.nova-code-h{display:flex;justify-content:space-between;padding:5px 10px;background:#222;font-size:11px;color:var(--mt)}
.nova-code-h button{padding:2px 8px;background:0;border:1px solid var(--bd);border-radius:3px;color:var(--mt);font-size:11px;cursor:pointer}
.nova-code pre{margin:0;padding:10px;overflow-x:auto;font-size:13px}

/* Loading */
.nova-dots{display:flex;gap:4px}
.nova-dots span{width:6px;height:6px;background:var(--mt);border-radius:50%;animation:pulse 1.2s infinite}
.nova-dots span:nth-child(2){animation-delay:.2s}
.nova-dots span:nth-child(3){animation-delay:.4s}
@keyframes pulse{0%,80%,100%{opacity:.4;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}

/* Footer Input */
.nova-foot{padding:10px 12px;background:var(--sf);border-top:1px solid var(--bd)}
.nova-foot textarea{width:100%;padding:10px;background:var(--bg);border:1px solid var(--bd);border-radius:6px;color:var(--tx);font:14px inherit;resize:none}
.nova-foot textarea:focus{outline:0;border-color:var(--mt)}
.nova-foot>textarea{margin-bottom:8px}

.nova-row{display:flex;gap:8px;margin-bottom:8px}
.nova-row:last-child{margin:0}

.nova-btn{padding:8px 14px;background:var(--bg);border:1px solid var(--bd);border-radius:6px;color:var(--tx);font-size:13px;cursor:pointer}
.nova-btn:hover{border-color:var(--mt)}

.nova-row input[type=text]{flex:1;padding:8px 10px;background:var(--bg);border:1px solid var(--bd);border-radius:6px;color:var(--tx);font-size:13px}
.nova-row select{padding:8px 10px;background:var(--bg);border:1px solid var(--bd);border-radius:6px;color:var(--tx);font-size:13px}
.nova-row textarea{flex:1}

#chat-send,#vision-go{padding:10px 18px;background:var(--ac);border:0;border-radius:6px;color:#fff;font-size:13px;font-weight:500;cursor:pointer;white-space:nowrap}
#chat-send:hover,#vision-go:hover{opacity:.9}

/* Chat specific */
#chat-box .nova-foot{display:flex;gap:8px}
#chat-box .nova-foot textarea{flex:1;margin:0;min-height:40px;max-height:120px}

/* Vision Preview */
#vision-preview{margin-bottom:8px}
#vision-preview:empty{display:none}
#vision-preview img{max-width:150px;max-height:100px;border-radius:6px}
#vision-preview .rm{position:absolute;top:-6px;right:-6px;width:18px;height:18px;background:#ef4444;border:0;border-radius:50%;color:#fff;font-size:12px;cursor:pointer}

/* Choices.js */
.choices{margin:0}
.choices__inner{background:var(--bg)!important;border:1px solid var(--bd)!important;border-radius:6px!important;min-height:32px!important;padding:3px 6px!important;font-size:13px!important}
.choices__input{background:0!important;color:var(--tx)!important}
.choices__list--single .choices__item{color:var(--tx)!important}
.choices__list--dropdown{background:var(--bg)!important;border:1px solid var(--bd)!important;border-radius:6px!important}
.choices__list--dropdown .choices__item{color:var(--tx)!important;padding:8px 10px!important;font-size:13px!important}
.choices__list--dropdown .choices__item--selectable.is-highlighted{background:var(--sf)!important}
.choices__list--dropdown .choices__group .choices__heading{color:var(--ac)!important;font-size:11px!important}
.choices[data-type*=select-one]::after{border-color:var(--mt) transparent transparent!important}

/* Discuss */
#nov-discuss-overlay{position:fixed;inset:0;background:rgba(0,0,0,.8);z-index:99999;display:none;align-items:center;justify-content:center;padding:20px}
#nov-discuss-overlay.active{display:flex}
.nov-discuss-modal{width:100%;max-width:700px;max-height:80vh;background:var(--bg);border-radius:8px;display:flex;flex-direction:column;overflow:hidden}
.nov-discuss-header{display:flex;align-items:center;gap:12px;padding:12px;background:var(--sf);border-bottom:1px solid var(--bd)}
.nov-discuss-header h3{margin:0;font-size:15px}
#nov-discuss-model{flex:1;max-width:200px;padding:6px 10px;background:var(--bg);border:1px solid var(--bd);border-radius:6px;color:var(--tx);font-size:13px}
.nov-discuss-close{background:0;border:0;color:var(--mt);font-size:20px;cursor:pointer;margin-left:auto}
#nov-discuss-chat{flex:1;overflow-y:auto;padding:16px;min-height:280px}
.nov-discuss-input-area{display:flex;gap:8px;padding:12px;background:var(--sf);border-top:1px solid var(--bd)}
#nov-discuss-input{flex:1;padding:10px;background:var(--bg);border:1px solid var(--bd);border-radius:6px;color:var(--tx);font:14px inherit;resize:none;min-height:50px}
#nov-discuss-send{padding:10px 16px;background:var(--ac);border:0;border-radius:6px;color:#fff;font-size:13px;cursor:pointer;align-self:flex-end}
.nov-discuss-btn{display:inline-flex;gap:6px;padding:10px 20px;background:#6366f1;border:0;border-radius:20px;color:#fff;font-size:14px;cursor:pointer}

/* Downloads */
.nov-downloads{background:var(--bg);border-radius:8px;padding:16px}
.nov-crumb{margin-bottom:12px;font-size:13px;color:var(--mt)}
.nov-crumb a{color:#6366f1}
.nov-list{list-style:none;margin:0;padding:0}
.nov-item{display:flex;align-items:center;gap:10px;padding:10px;background:var(--sf);border-radius:6px;margin-bottom:6px}
.nov-item.is-folder{cursor:pointer;border-left:2px solid #6366f1}
.nov-icon{font-size:18px;width:24px}
.nov-name{flex:1}
.nov-name a{color:var(--tx);text-decoration:none}
.nov-size{color:var(--mt);font-size:12px}

/* Mobile */
@media(max-width:600px){
.nova-ai{height:100vh;max-height:none;border-radius:0}
.nova-bar{flex-wrap:wrap}
.nova-bar select{max-width:100%;order:3;flex:1 1 100%;margin-top:8px}
.nova-row{flex-wrap:wrap}
.nova-row input[type=text],.nova-row select{min-width:100%}
}
