/* models_icybots. Paleta je preuzeta iz same igre (cybots-rts/public/index.html)
   da wiki izgleda kao njezin dio, a ne kao zaseban alat. */
:root {
  --pozadina: #0c0e12;
  --panel: #12161d;
  --panel-jace: #171b22;
  --obrub: #2e3642;
  --obrub-jak: #3d4757;
  --tekst: #d8e2ec;
  --prigusen: #7f93a6;
  --tamniji: #6d7d8e;
  --akcent: #45b8e0;
  --akcent-tamni: #4a92b8;
  --zelena: #4ad07a;
  --crvena: #d05a4a;
}

* { box-sizing: border-box }

body {
  margin: 0;
  background: var(--pozadina);
  color: var(--tekst);
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--akcent); text-decoration: none }
a:hover { text-decoration: underline }

.omot { max-width: 1440px; margin: 0 auto; padding: 0 22px }

/* ------------------------------------------------------------- zaglavlje */
header.vrh {
  border-bottom: 1px solid var(--obrub);
  background: linear-gradient(180deg, #151a22, #0e1116);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(6px);
}
.vrh .omot { display: flex; align-items: center; gap: 18px; height: 58px }
.znak {
  font-weight: 700; letter-spacing: 2.5px; font-size: 16px;
  color: var(--tekst); white-space: nowrap;
}
.znak b { color: var(--akcent); font-weight: 700 }
.vrh nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto }
.vrh nav a {
  color: var(--prigusen); font-size: 13px; padding: 6px 11px;
  border-radius: 6px; text-decoration: none; white-space: nowrap;
}
.vrh nav a:hover { background: var(--panel-jace); color: var(--tekst); text-decoration: none }
.vrh nav a.tu { color: var(--akcent); background: rgba(69,184,224,.1) }

/* ------------------------------------------------------------------ uvod */
.uvod { padding: 34px 0 8px }
.uvod h1 { font-size: 27px; margin: 0 0 8px; font-weight: 600; letter-spacing: .3px }
.uvod p { margin: 0; color: var(--prigusen); max-width: 78ch }
.brojke-vrh { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 18px }
.brojke-vrh div { font-size: 13px; color: var(--tamniji) }
.brojke-vrh b { display: block; font-size: 20px; color: var(--tekst); font-weight: 600 }

/* ---------------------------------------------------------------- sekcije */
h2.sek {
  font-size: 13px; text-transform: uppercase; letter-spacing: 1.6px;
  color: var(--akcent); margin: 38px 0 4px; font-weight: 600;
}
p.sek-opis { margin: 0 0 16px; color: var(--tamniji); font-size: 13.5px; max-width: 82ch }

/* ---------------------------------------------------------------- kartice */
.mreza { display: grid; grid-template-columns: repeat(auto-fill, minmax(276px, 1fr)); gap: 15px }
.kart {
  background: var(--panel); border: 1px solid var(--obrub); border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .15s, transform .15s;
}
.kart:hover { border-color: var(--akcent-tamni); transform: translateY(-2px) }
.kart > a { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100% }
.kart > a:hover { text-decoration: none }
.kart .platno { position: relative; background: #090b0f; aspect-ratio: 4 / 3 }
.kart canvas { display: block; width: 100%; height: 100% }
.kart .cekanje {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #46505f; font-size: 12px; letter-spacing: 1px;
}
.kart .tijelo { padding: 11px 13px 13px; border-top: 1px solid var(--obrub); flex: 1 }
.kart h3 { margin: 0; font-size: 15px; font-weight: 600 }
.kart .kratko { margin: 3px 0 0; font-size: 13px; color: var(--prigusen) }
.kart .traka { margin-top: 9px; display: flex; gap: 7px; flex-wrap: wrap }

.znacka {
  font-size: 11px; padding: 2px 7px; border-radius: 4px;
  border: 1px solid var(--obrub-jak); color: var(--tamniji); white-space: nowrap;
}
.znacka.igra { border-color: rgba(74,208,122,.4); color: var(--zelena) }
.znacka.vani { border-color: rgba(208,90,74,.35); color: #c98274 }
.znacka.akc { border-color: rgba(69,184,224,.4); color: var(--akcent) }

/* --------------------------------------------------------- detalj modela */
.natrag { display: inline-block; margin: 20px 0 0; font-size: 13px; color: var(--prigusen) }
.glava { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 10px 0 4px }
.glava h1 { font-size: 30px; margin: 0; font-weight: 600 }
.glava .podnaslov { color: var(--prigusen); font-size: 15px }
.uvodna { color: var(--prigusen); margin: 0 0 20px; max-width: 84ch }

.stupci { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start }
@media (max-width: 940px) { .stupci { grid-template-columns: 1fr } }

.scena {
  background: #090b0f; border: 1px solid var(--obrub); border-radius: 10px;
  overflow: hidden; position: relative;
}
.scena canvas { display: block; width: 100%; height: 460px }
.scena .alatna {
  position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap;
}
.scena .alatna button {
  background: rgba(18,22,29,.9); color: var(--prigusen); border: 1px solid var(--obrub-jak);
  border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer;
  font-family: inherit;
}
.scena .alatna button:hover { color: var(--tekst); border-color: var(--akcent-tamni) }
.scena .alatna button.upaljen { color: var(--akcent); border-color: var(--akcent) }
.scena .napomena {
  position: absolute; right: 10px; top: 10px; font-size: 11px; color: #46505f;
}

.ploca {
  background: var(--panel); border: 1px solid var(--obrub); border-radius: 10px;
  padding: 15px 17px; margin-bottom: 15px;
}
.ploca h3 {
  margin: 0 0 11px; font-size: 12px; text-transform: uppercase;
  letter-spacing: 1.4px; color: var(--akcent); font-weight: 600;
}
.ploca p { margin: 0 0 10px }
.ploca p:last-child { margin-bottom: 0 }

table.pod { width: 100%; border-collapse: collapse; font-size: 13.5px }
table.pod td { padding: 5px 0; border-bottom: 1px solid #1d232d; vertical-align: top }
table.pod tr:last-child td { border-bottom: 0 }
table.pod td:first-child { color: var(--tamniji); width: 46%; padding-right: 10px }
table.pod td:last-child { text-align: right; font-variant-numeric: tabular-nums }
table.pod td .sitno { color: var(--tamniji); font-size: 12px }

.slike { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
@media (max-width: 640px) { .slike { grid-template-columns: 1fr } }
.slika figure { margin: 0 }
.slika img {
  width: 100%; display: block; border-radius: 8px; border: 1px solid var(--obrub);
  background: #090b0f;
}
.slika figcaption { font-size: 12px; color: var(--tamniji); margin-top: 6px }

pre.prompt {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; line-height: 1.6; color: #9fb0c0;
  background: #0b0e13; border: 1px solid var(--obrub); border-radius: 8px; padding: 12px;
  max-height: 210px; overflow: auto;
}
button.kopiraj {
  margin-top: 9px; background: transparent; color: var(--prigusen);
  border: 1px solid var(--obrub-jak); border-radius: 6px; padding: 5px 11px;
  font-size: 12px; cursor: pointer; font-family: inherit;
}
button.kopiraj:hover { color: var(--akcent); border-color: var(--akcent-tamni) }

.susjedi { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0 40px }
.susjedi a {
  border: 1px solid var(--obrub); border-radius: 8px; padding: 8px 13px;
  font-size: 13px; color: var(--prigusen); background: var(--panel);
}
.susjedi a:hover { color: var(--tekst); border-color: var(--akcent-tamni); text-decoration: none }

footer.dno {
  border-top: 1px solid var(--obrub); margin-top: 46px; padding: 20px 0 34px;
  color: #4d5766; font-size: 12.5px;
}

/* --------------------------------------------------------------- tablice */
.tabela-omot { overflow-x: auto; border: 1px solid var(--obrub); border-radius: 10px }
table.velika { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px }
table.velika th {
  text-align: left; padding: 9px 12px; background: var(--panel-jace);
  color: var(--prigusen); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .8px; white-space: nowrap;
}
table.velika td { padding: 8px 12px; border-top: 1px solid #1d232d; vertical-align: top }
table.velika tbody tr:hover { background: rgba(255,255,255,.02) }
table.velika td.broj { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap }
