:root{
  --bg:#0f1422; --panel:#121826; --ink:#eaf0f7; --muted:#c2ccda; --line:#2a3242;
  --ink-weak:#d6deea; --user:#eaf0f7; --bot:#eaf0f7; --sys:#a7b2c3;
  --btn:#2b86ff; --btn-ink:#ffffff; --btn-muted:#28334a;
}
html,body{background:var(--bg); color:var(--ink);}
*{text-shadow:none !important;}
h1,h2,h3,legend,label{color:var(--ink);}

#chat,#analysisBox{
  background:var(--panel) !important;
  color:var(--ink) !important;
  border:1px solid var(--line) !important;
  border-radius:10px !important;
  opacity:1 !important;
  filter:none !important;
  mix-blend-mode:normal !important;
  padding:14px !important;
  line-height:1.4 !important;
}

/* Make inner text fully opaque and readable */
#chat *,#analysisBox *{
  color:var(--ink) !important;
  opacity:1 !important;
  filter:none !important;
}

/* Scroll and wrap long lines */
#chat,#analysisBox{
  max-height:320px;
  overflow:auto !important;
  white-space:pre-wrap !important;
  word-break:break-word !important;
  overflow-wrap:anywhere !important;
}

/* Message roles if present */
#chat .user{color:var(--user) !important;}
#chat .bot{color:var(--bot) !important;}
#chat .sys,#analysisBox .muted{color:var(--sys) !important;}

input#msg{
  background:var(--panel) !important;
  color:var(--ink) !important;
  border:1px solid var(--line) !important;
  border-radius:8px !important;
}
input#msg::placeholder{color:var(--muted) !important;}

button,select{
  background:var(--btn-muted) !important;
  color:var(--ink) !important;
  border:1px solid var(--line) !important;
  border-radius:8px !important;
  cursor:pointer;
}
button#send,button#reset,button#analyze{
  background:var(--btn) !important;
  color:var(--btn-ink) !important;
  border-color:transparent !important;
}
button:focus,select:focus,input#msg:focus{outline:2px solid var(--btn);}
