body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #121212;
  background-image: url('images/background.png'); /* zamijeni s točnim imenom */
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.header-title {
  text-align: center;
  position: absolute;
  top: 20px;
  width: 100%;
  z-index: 5;
  line-height: 1.4;
}

.title-line1 {
  font-size: 2rem;
  font-weight: bold;
  color: #00cc66;
}

.title-line2 {
  font-size: 1.3rem;
  font-weight: normal;
  color: #ffffff;
}

.container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-wrapper {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -70%);
  z-index: 1;
  width: 280px; /* smanjeno */
  height: auto;
  text-align: center;
}

.avatar-image {
  margin-top: 10px;
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 0 20px #00000055;
}

/* chat box , visina , sirina */
.chat-box {
  background-color: rgba(30, 30, 30, 0.5); /* 50% transparentna pozadina */
  position: fixed;
  bottom: 3vh; /* 3% od visine prozora */
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 900px;

  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 0 15px #000;
  z-index: 10;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#chat-log {
  overflow-y: auto;
  max-height: 250px;
  margin-bottom: 15px;
  padding-right: 5px;

  font-size: 0.85rem; /* ili 13px */
  line-height: 1.3;  
  
}

.input-row {
  display: flex;
  gap: 10px;
}

#user-input {
  flex: 1;
  padding: 12px;
  font-size: 1em;
  border: none;
  border-radius: 5px;
}

button {
  padding: 10px 20px;
  background-color: #00aaff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}


.model-slider {
  width: 80%;
  max-width: 800px;
  margin-top: 10px;
  margin-bottom: 10px;
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 10px;
  scroll-behavior: smooth;
}

.model-slider::-webkit-scrollbar {
  height: 8px;
}

.model-slider::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 4px;
}

.model-item {
  flex: 0 0 auto;
  text-align: center;
  width: 70px;
}

.model-item img {
  width: 100%;
  border-radius: 10px;
  background-color: #fff2;
}

.model-item span {
  display: block;
  font-size: 0.7rem;
  color: #ccc;
  margin-top: 2px;
}

.model-icon {
  display: inline-block;
  background-color: #2a2a2a;
  padding: 3px 6px;
  border-radius: 6px;
  margin-left: 5px;
  font-size: 0.9em;
  cursor: pointer;
  color: #00ccff;
}
.model-icon:hover {
  background-color: #333;
}

@media (max-width: 600px) {
  .chat-box {
    width: 95%;
    padding: 15px;
  }
}

/* response boota */
.bot-response { margin-bottom: 12px; }

:root { --sep-color: rgba(0,0,0,.12); }
@media (prefers-color-scheme: dark){
  :root { --sep-color: rgba(255,255,255,.18); }
}
/* separator linija razmak */
.chat-sep{
  border: 0;
  border-top: 1px solid var(--sep-color);
  margin: 10px 0 14px;   /* razmak oko linije */
}


/* diskretna eco - CO2 freundlich značkica gore desno */
/* diskretan CO₂-freundlich badge gore desno */
.eco-badge{
  position: fixed;
  top: 12px;
  right: 14px;

  /* fiksna veličina (ne rasteže se) */
  width:  74px;
  height: 74px;

  /* slika kao pozadina */
  background-image: url('images/co2-neutral.png'); /* <-- tvoja mala PNG ikona */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;

  opacity: 0.4;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.15));
  transition: opacity .2s ease, transform .2s ease;
  z-index: 1000;
}
.eco-badge:hover{
  opacity: 0.7;
  transform: scale(1.08);
}
@media (max-width: 640px){
  .eco-badge{ display: none; }
}


/* prikaz hintova LM modela */
.importance-badge {
  margin-left: 8px;
  font-size: .85em;
  opacity: .9;
  padding: 2px 6px;
  border-radius: 999px;
  user-select: none;
}


/* defaultno neka markdown kolapsira razmake */
.md { white-space: normal; }

/* zadrži ručne prijelome samo gdje trebaju */
.md p,
.md blockquote { white-space: pre-wrap; }

/* code blokove ostavi kako jesu */
.md pre,
.md code { white-space: pre-wrap; }

/* liste eksplicitno na normal (bez pre-wrap širenja) */
.md ul,
.md ol,
.md li { white-space: normal; }



/* thinking indikator */
.thinking{
  display:flex; align-items:center; gap:.6rem;
  padding:6px 8px; color:#fff; font-style:italic;
}

/* CSS-based spinner */
.spinner{
  animation: rotate 1s linear infinite;
  width:20px; height:20px;
}
.spinner .path{
  stroke: currentColor;
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}

/* rotacija cijelog SVG-a */
@keyframes rotate{
  100% { transform: rotate(360deg); }
}

/* “pulsirajući” luk */
@keyframes dash{
  0%   { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
  50%  { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
  100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* točkice za tekst */
.dots::after{
  content:""; display:inline-block; width:1.2em; text-align:left;
  animation: ellipsis 1.2s steps(4,end) infinite;
}
@keyframes ellipsis{0%{content:""}25%{content:"."}50%{content:".."}75%{content:"..."}}




.num-pill{ margin-left:8px; font-size:.8em; opacity:.65; padding:1px 6px; border-radius:999px; background:rgba(0,0,0,.06); }
.importance-label{ margin-left:8px; font-size:.85em; opacity:.85; }
.importance-badge{ margin-left:8px; font-size:.85em; opacity:.9; padding:2px 6px; border-radius:999px; user-select:none; }
.importance-badge.importance-unimportant{ background:rgba(128,128,128,.15); }
.importance-badge.importance-neutral{ background:rgba(0,128,255,.12); }
.importance-badge.importance-important{ background:rgba(0,200,0,.15); font-weight:600; }

/* katex */
[data-katex-fallback="sanitized"] { outline: 1px dashed #888; outline-offset: 2px; }
[data-katex-fallback="safe"]      { outline: 1px dashed #d33; outline-offset: 2px; }
[data-katex-fallback="text"]      { background: rgba(211,51,51,.08); }