/* ================================== */
/* GLOBAL RESET & BOX SIZING */
/* ================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* BODY I POZADINA */
body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.25;
  margin: 0;
  padding: 0;
  background-image: url('../images/sistem/wraper_bg.png?v11');
 /* background-size: cover;
  background-repeat: no-repeat;
  background-position: center;*/

    display: flex;
    flex-direction: column;
    min-height: 100dvh; /* 100% visine prozora */
    
}

.main-content {
    flex: 1; /* raste da popuni prostor */
   
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    text-align: center;
    padding: 15px 20px;
    width: 80%;
    max-width: 1600px;
    margin-top:10px;
    margin-left:auto;
    margin-right:auto;
    margin-bottom:10px;
    border-radius: 12px;
  
}
.wraper{
padding-bottom:10px;
}

/* ================================== */
/* FORM WRAPPER & GRID FORMS */
/* ================================== */
.form-wrapper {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background: #f7f7f7;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  position: relative; /* OBAVEZNO */
}
.form-wrapper h3 {
  font-weight: 500;
  font-size: 18px;
  margin-bottom: 15px;
}


.nalog-form {
    display: grid;
    grid-template-columns: 1fr 2fr; /* label 1 deo, input 2 dela */
    gap: 15px 20px;
    align-items: start;
}

.nalog-form label {
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.nalog-form input,
.nalog-form select {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.nalog-form input:focus,
.nalog-form select:focus {
  border-color: #1e90ff;
  outline: none;
}

.nalog-form input[type="submit"],
.nalog-form button {
  grid-column: 2;
  padding: 12px;
  font-size: 15px;
  background-color: #1e90ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.nalog-form input[type="submit"]:hover,
.nalog-form button:hover {
  background-color: #0066cc;
}

/* CHECKBOX */
.nalog-form input[type="checkbox"] {
  width: auto;
}

/* ================================== */
/* ALERT BOX */
/* ================================== */
.alert-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background-color: #0066cc;
  color: #fff;
  padding: 15px 25px;
  border-radius: 10px;
  font-size: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

.alert-box.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.alert-box.error {
  background-color: #e74c3c;
}

/* ================================== */
/* REC ELEMENT (ako koristiš) */
/* ================================== */
.rec {
  min-width: 50px;
  text-align: center;
  padding: 5px 10px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
  font-family: sans-serif;
  font-weight: bold;
  text-transform: uppercase;
}

/* ================================== */
/* NAVBAR + DROPDOWN */
/* ================================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #d9d9d9;
  padding: 0 20px;
}

.navbar .logo a {
  color: #1e90ff;
  text-decoration: none;
  font-size: 24px;
  font-weight: bold;
}

.nav {
  list-style: none;
  display: flex;
  gap: 10px;
}

.nav li a {
  color: #1e90ff;
  text-decoration: none;
  padding: 10px 20px;
  display: block;
  border-radius: 5px;
  transition: background 0.3s, color 0.3s;
}

.nav li a.active,
.dropdown.active > .dropbtn {
  background-color: #1e90ff;
  color: #fff;
}

.nav li a:hover,
.dropdown:hover > .dropbtn {
  background-color: #0066cc;
  color: #fff;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown .dropbtn {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: color 0.3s;
}

.dropdown .dropbtn i {
  transition: transform 0.3s, color 0.3s;
}

.dropdown:hover .dropbtn i {
  transform: rotate(180deg);
  color: #ffcc00;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #d9d9d9;
  min-width: 150px;
  list-style: none;
  padding: 5px 0;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  z-index: 10;
}

.dropdown-menu li a {
  color: #1e90ff;
  padding: 10px 20px;
  display: block;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s, transform 0.2s;
}

.dropdown-menu li a:hover {
  background-color: #0066cc;
  transform: translateX(5px);
}

.dropdown:hover .dropdown-menu {
  display: block;
}

/* Hamburger - mobilni meni */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle .bar {
  height: 3px;
  width: 25px;
  background-color: #fff;
  margin: 4px 0;
  transition: 0.3s;
}


/* ================================== */
/* PRINT RULES */
/* ================================== */
@media print {
  form,
  .rec {
    display: none;
  }
  .navbar {
    display: none;
  }
  .form-wrapper {
    display: none;
  }
  footer{
   display: none; 
  }
}
.odgovori-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px; /* razmak između redova */
    margin-bottom: 15px;
}

.odgovor-row {
    display: flex;
    align-items: center;
    gap: 10px; /* razmak između input i radio dugmeta */
}

.odgovor-row input[type="text"] {
    flex: 1; /* zauzima sav preostali prostor */
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.odgovor-row label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    cursor: pointer;
}

.odgovor-row input[type="radio"] {
    width: 16px;
    height: 16px;
}
.visible-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.visible-row label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    cursor: pointer;
}

#searchPitanje {
    position: relative; /* za kontekst */
    z-index: 1;
}
.autocomplete-wrapper {
    position: relative; /* već imamo ovo */
    z-index: 1000; /* osigurava da lista bude iznad svega */
}

.autocomplete-list {
    position: absolute;
    top: 100%; /* odmah ispod inputa */
    left: 0;
    width: 100%;
    max-height: 200px; /* ograničava visinu */
    overflow-y: auto; /* scroll ako je više stavki */
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* blaga senka */
    list-style: none;
    padding: 5px 0;
    
    transition: all 0.2s ease-in-out;
}

.autocomplete-list li {
    padding: 10px 15px; /* veći padding za lakše tapkanje na mobilnom */
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.autocomplete-list li:hover {
    background-color: #f0f8ff; /* nežna plava boja pri hoveru */
}
.btn {
  margin-left:auto;
  margin-right:auto;
   grid-column: 2;
  padding: 12px;
  font-size: 15px;
  background-color: #1e90ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.btn-danger {
  background-color: #e74c3c;
}

.btn-danger:hover {
  background-color: #c0392b;
}
.delButton{
text-align:center;
padding-top:30px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px 25px;
    align-items: start;
}

.filter-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.filter-item input,
.filter-item select {
    width: 100%;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.filter-random {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.form-actions {
    margin-top: 20px;
    text-align: left;
}

.form-actions button {
    padding: 10px 25px;
    background: #007BFF;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.form-actions button:hover {
    background: #0056b3;
}
/* Nova forma sa poljima u jednom redu */
.filter-form-full {
   /* display: grid;*/
    grid-template-columns: 1fr; /* svako polje zauzima ceo red */
    gap: 15px; /* razmak između polja */
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #f7f7f7;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.filter-form-full label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
    display: block;
}

.filter-form-full input,
.filter-form-full select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom:10px;
}

.filter-form-full select[multiple] {
    min-height: 100px;
}

.filter-form-full input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.filter-form-full .filter-random {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.filter-form-full .form-actions {
    margin-top: 20px;
    text-align: left;
}

.filter-form-full .form-actions button {
    padding: 12px 28px;
    font-size: 15px;
    border-radius: 8px;
    background-color: #1e90ff;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.filter-form-full .form-actions button:hover {
    background-color: #0066cc;
}


.pitanje-block {
    margin-bottom: 20px;
    padding: 15px;
    background: #fdfdfd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.pitanje-block p {
    margin-bottom: 10px;
    font-weight: 600;
}

.pitanje-block ul {
    list-style: none;
    padding: 0;
}

.pitanje-block li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pitanje-block input[type="text"],
.pitanje-block input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pitanje-block input[type="text"]:focus,
.pitanje-block input[type="number"]:focus {
    border-color: #1e90ff;
    box-shadow: 0 0 4px rgba(30, 144, 255, 0.3);
    outline: none;
}

.pitanje-block input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    .pitanje-block input[type="text"],
    .pitanje-block input[type="number"] {
        font-size: 18px;
        padding: 12px 14px;
    }

    .pitanje-block li {
        font-size: 16px;
    }
}
/* ===== MODAL OVERLAY ===== */
.kviz-modal {
    display: flex;
    opacity: 0;
    pointer-events: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.7);
    transition: opacity 0.3s ease;
    z-index: 9999;
}

.kviz-modal.show {
    opacity: 1;
    pointer-events: auto;
}

/* ===== MODAL BOX ===== */
.kviz-modal-content {
    background: #fff;
    padding: 30px 35px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    transform: scale(0.9);
    opacity: 0;
    animation: modalIn 0.4s forwards;
}

@keyframes modalIn {
    to { transform: scale(1); opacity: 1; }
}

/* ===== CLOSE X ===== */
.kviz-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 24px;
    cursor: pointer;
    font-weight: bold;
    color: #333;
}

.kviz-close:hover { color: red; }

/* ===== SMAJLI ===== */
#nagradaText {
    font-size: 20px;
    margin: 15px 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#nagradaText.tacno::before {
  
    font-size: 50px;
    margin-bottom: 10px;
    animation: bounce 0.6s infinite alternate;

}

#nagradaText.netacno::before {

 
    font-size: 50px;
    margin-bottom: 10px;
    animation: shake 0.5s;
   
}

/* bounce animacija */
@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-15px); }
}

/* shake animacija */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

/* pozadina za tacno 
#nagradaText.tacno {
  
    background: radial-gradient(circle, #fffae6 0%, #fff 70%);
    padding: 10px 15px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
   
}
     */
.btn-primary {
    padding: 12px 25px;
    font-size: 16px;
    background-color: #1e90ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background-color: #0066cc;
}


/* Animacije i stil slike u modal-u */
#nagradaText img {
    width: 100%;      /* promeni po potrebi */
   /* height: 100px;      promeni po potrebi */
    margin-bottom: 10px;
}

#nagradaText.tacno img {
    animation: bounce 0.6s infinite alternate;
}

#nagradaText.netacno img {
    animation: shake 0.5s;
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-15px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.top-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap; /* BITNO za mobilni */
    margin: 1rem 0;
}

#jezikIzbor {
    display: flex;
    gap: 0.5rem;
}

.color-picker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    
}

.welcome{
  text-align:center;
}
.mainImage{
  width:50%;
   margin-left:auto;
   margin-right:auto;
}
.welcomeImage{
  width:100%;
}
@media screen and (max-width: 768px) {
.mainImage{
  width:100%;  
}
}





.top-flex-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 99%;
   
    margin: 20px auto;
    
}

/* DELOVI */
.flex-item.left {
    flex: 0 0 30%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.flex-item.center {
    flex: 0 0 40%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-item.right {
    flex: 0 0 30%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}


@media (max-width: 768px) {
    .top-flex-container {
        flex-wrap: wrap;          /* dozvoli novi red */
    }

    /* LEFT – levo */
    .flex-item.left {
        flex: 0 0 45%;
        order: 1;
        justify-content: flex-start;
        margin-bottom: 10px;
    }

    /* RIGHT – desno */
    .flex-item.right {
        flex: 0 0 45%;
        order: 2;
        justify-content: flex-end;
        margin-bottom: 10px;
    }

    /* CENTER – ispod, centrirano */
    .flex-item.center {
        flex: 0 0 100%;
        order: 3;
        justify-content: center;
    }
}


/* INFO BOX */
.info-box {
    width: 80%;
    max-width: 1600px;
    margin: 1px auto;
    padding: 20px 25px;
margin-top:20px;
    
box-shadow: 0px 0px 11px -1px rgba(0,0,0,0.75);
-webkit-box-shadow: 0px 0px 11px -1px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 0px 11px -1px rgba(0,0,0,0.75);

    border-radius: 12px;

    color: #fff;
    font-size: 18px;
    line-height: 1.4;

    display: flex;
    flex-direction: column; /* top-div i bottom-row */
    gap: 20px;
}

/* GORNJI DIV - ceo red */
.info-box .top-div {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* DONJI RED sa dve kolone */
.info-box .bottom-row {
    display: flex;
    width: 100%;
    gap: 20px; /* razmak između leve i desne kolone */
}

/* Leva kolona */
.info-box .bottom-left {
    flex: 0 0 40%; /* 40% širine */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Desna kolona */
.info-box .bottom-right {
    flex: 0 0 60%; /* 60% širine */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Slika u desnoj koloni (ako postoji) */
.info-box .bottom-right img {
    max-width: 100%;
    height: auto;
}
.soft-textarea {
    width: 100%;
    resize: none;           /* nema povlačenja */
    padding: 12px 14px;
    border-radius: 12px;
    border: 2px solid #e6e6e6;
    font-size: 1rem;
    line-height: 1.4;
    font-family: inherit;
    background: #fffdf7;
}

.soft-textarea:focus {
    border-color: #f4b400;  /* Keka-Teka žuta */
    outline: none;
    background: #fffbe6;
}

.welcomeImage2{
width:80%;
}
/* RESPONSIVE - mobilno */
@media screen and (max-width: 768px) {
    .info-box {
        width: 95%;
        padding: 15px;
    }

    .info-box .bottom-row {
        flex-direction: column; /* kolone jedna ispod druge */
    }

    .info-box .bottom-left,
    .info-box .bottom-right {
        flex: 0 0 100%; /* pune širine */
    }
    footer {
      width:95%;
    }
}



@media (max-width: 768px) {
    .flex-item {
        min-width: 0;   /* OBAVEZNO */
    }

    .color-picker input[type="color"] {
        max-width: 32px; /* sprečava širenje */
        padding: 0;
    }
}

.game{
    background:#fff;   
    padding:25px;
    width:100%;
    border-radius:12px;
    text-align:center;
    box-shadow:0 10px 30px rgba(0,0,0,.1);
    margin-left:auto;
    margin-right:auto;
}
.btn-primaryPS {
    padding: 10px 14px;
    margin: 4px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.btn-primaryPS:hover {
    background: #ccc;
   
} 
.btn-primaryPS:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.selectors .btn-primaryPS.active {
    background: #2ecc71;
}

#giveUpBtn {
    background: #e74c3c;
    padding: 10px 14px;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
}
#resetBtn {
    background: #2ecc71;
    padding: 10px 14px;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
}

/* === Igra === */
.word{
    font-size:28px;
    letter-spacing:8px;
    margin:20px 0;
}
.letters{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
}


.hiddenPS{display:none;}
.modalPS{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.6);
    display:flex;
    align-items:center;
    justify-content:center;
}
.modalPS.hiddenPS{display:none;}
.modal-contentPS{
    background:#fff;
    padding:20px;
    border-radius:12px;
    width:300px;
   
    text-align:center;
}
/*zanimljivosti lista*/
.ulZa { list-style: none; padding: 0; }
.liZa { padding: 10px 15px; margin: 5px 0; background:#f0f0f0; cursor:pointer; border-radius:5px; transition:0.3s; }
.liZa:hover { background:#d0e0ff; }
/* Modal sa fade efektom */
.modalZa {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index:1000;
}

.modalZa.showZa {
    opacity: 1;
    pointer-events: auto;
}

.modal-contentZa {
    background: #fff;
    padding: 20px;
    width: 98%;              
   /* max-width: 500px;*/       
    max-height: 85vh;      
    overflow-y: auto;        
    border-radius: 8px;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modalZa.showZa .modal-contentZa {
    transform: translateY(0);
}

.closeZa {
    position:absolute;
    top:10px;
    right:15px;
    font-size:20px;
    cursor:pointer;
}



/* Stil za tekst odabrane stavke u multiple selectu */
.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    color: white;
    background-color: #4CAF50;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
     white-space: normal !important;
    overflow-wrap: break-word;
    line-height: 1.2; /* da se lepo vidi */
    max-width: 100%;  /* da se ne probije kontejner */
}
/* Stil za klikabilne stavke u dropdown-u */
.select2-results__option--selectable {
    padding: 5px 10px;
    cursor: pointer;
    color: blue;
    
}

/* Hover efekat */
.select2-results__option--selectable:hover {
    background-color: red;
   
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #4CAF50; /* zelena pozadina za istaknutu stavku */
    color: white;               /* bela boja teksta */
    
}
.select2-container--default .select2-results__option--selected {
  background-color: red;

}


.pitanje-slika {
    margin: 10px 0;
    text-align: center;
}

.pitanje-slika img {
    max-height: 150px;
max-width: 90%;
height: auto;
width: auto;

    border-radius: 8px;
}

.testRadio{
    
    display:inline-flex!important;
    align-items:center!important;
    gap:5px!important;
    color:black!important;
    white-space: nowrap!important;
    margin-right:10px!important;
}


.status-legend-btn {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

.status-legend {
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  background: rgba(0,0,0,0.6);
  z-index: 9999;

  display: flex;               /* centriranje unutrašnjeg diva */
  justify-content: center;     /* horizontalno */
  align-items: center;         /* vertikalno */

  opacity: 0;                  /* nevidljiv */
  pointer-events: none;        /* ne ometa klikove dok je skriven */
  transform: scale(0.95);      /* blagi zoom out */
  transition: opacity 0.35s ease-in-out, transform 0.35s ease-in-out;
}

.status-legend.active {
  opacity: 1;
  transform: scale(1);         /* puni oblik */
  pointer-events: auto;        /* sada interaktivno */
}

.legend-box {
  background: #fff;
  max-width: 400px;
  width: 90%;
  padding: 20px;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);

  /* optional: nežno animiraj i padding ili transform unutrašnjeg diva */
  transition: transform 0.35s ease-in-out;
}


.legend-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.legend-list {
  margin-top: 15px;
}

.legend-item {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.legend-code {
  font-weight: bold;
  margin-right: 5px;
}

.legend-text {
  color: #333;
}

.upustvo-kviz {
    background-color:#f7f7f7;
     border-radius: 15px;
   
    line-height: 1.6;
    color: #333;
    text-align: center; /* centrira ceo sadržaj */
    padding:10px;
    margin-top:20px;
    margin-bottom:10px;
}

.upustvo-kviz h2 {
    color: #1E90FF;
    margin-bottom: 15px;
}

.upustvo-kviz h3 {
    color: #555;
    margin-top: 20px;
    margin-bottom: 10px;
}

.upustvo-kviz ul, .upustvo-kviz ol {
    display: inline-block; /* centrira listu */
    text-align: left; /* tekst unutar liste levo */
    list-style-position: inside; /* bullet bliže tekstu */
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    margin-bottom: 15px;
}

.upustvo-kviz hr {
    border: none;
    border-top: 2px solid #1E90FF; /* plava linija */
    margin: 25px 0;
}
.uputstvo-broj {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 8px;
  border-radius: 50%;
  
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    padding: 30px 20px;
    margin-top: 20px;
    border-top: 1px solid #ccc;
    flex-wrap: wrap;
    gap: 15px; /* razmak između kolona fleksibilno */
}

.footer-col {
    flex: 1 1 calc(33.33% - 15px); /* 3 kolone po širini minus gap */
    min-width: 200px; /* minimalna širina da ne bude preusko */
    /* uklonili margin, koristimo gap u parentu */
}

.footer-col h4 {
    margin-bottom: 10px;
    font-size: 1.1em;
    text-align: center;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #fff;
}

/* Mobilni prikaz – kolone jedna ispod druge */
@media (max-width: 768px) {
    .footer-col {
        flex: 1 1 100%;
    }
}



/* Responsive: na malim ekranima kolone se stavljaju jedna ispod druge */
@media (max-width: 768px) {
    .footer-nav {
        flex-direction: column;
        align-items: center;
    }
    .footer-col {
        max-width: 300px;
        width: 100%;
    }
}

/* GRID */
.container {
    width: 95%;
    max-width: 1100px;
    margin: 50px auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

@media (max-width: 900px) {
    .container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
    .container { grid-template-columns: 1fr; }
}

/* CARD */
.card {
    background: white;
    padding: 18px;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transform: translateY(40px);
    opacity: 0;
    animation: fadeUp 0.6s ease forwards;
}

.card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card h3 {
    margin: 10px 0;
    cursor: pointer;
    transition: 0.3s;
}

.card h3:hover {
    color: #ff4081;
    transform: scale(1.05);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    transition: 0.3s;
}

.card:hover img {
    transform: rotate(3deg) scale(1.05);
}

.card p {
    font-size: 14px;
    color: #555;
    margin: 12px 0;
}

.more-btn {
    display: inline-block;
    padding: 8px 14px;
    background: #ff4081;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
}

.more-btn:hover {
    background: #e91e63;
    transform: scale(1.05);
}

/* MODAL */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 18px;
    width: 90%;
    max-width: 600px;        /* da ne bude premalo */
    max-height: 80vh;        /* maksimalna visina */
    overflow-y: auto;        /* omogući scroll */
    text-align: left;        /* bolje za duži tekst */
    transform: scale(0.7);
    transition: 0.3s;
}

.modal.active .modal-content {
    transform: scale(1);
}

.close {
    position: absolute;
    right: 25px;
    top: 20px;
    cursor: pointer;
    font-weight: bold;
}
.puzzle-container {
  position: relative;
  width: 400px;
  height: 400px;
  margin: 0 auto 20px;
   /* cela slika */
  background-size: cover;
  background-position: center;
}

.puzzle {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  width: 100%;
  height: 100%;
  gap: 0px;
}

.piece {
  background-color: #ccc; /* overlay */
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 24px;
  transition: opacity 0.3s;
}

.piece.revealed {
  opacity: 0; /* overlay nestaje */
  pointer-events: none;
}

#message { margin-top: 15px; font-size: 16px; color: #333; }

.puzzle-letter {
    display: inline-block;
    width: 18px;          /* širina kućice */
    border-bottom: 2px solid black;  /* crta */
    text-align: center;
    line-height: 1;       /* smanjuje visinu linije ispod slova */
    vertical-align: bottom; /* stavlja slovo na dno kućice */
    font-weight: bold;
}
.puzzle-letter-opis {
    display: inline-block;
    width: 18px;
    text-align: center;
    line-height: 1;
    vertical-align: bottom;
    font-size: 16px;
}
#modalAnswerInput{
padding:10px;
margin:10px 0px 10px 0px;    
}

@media (max-width: 600px) {
  .puzzle-container {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* da ostane kvadrat */
  }
}
  #containerPuzzleGame{
    max-width:520px;
    margin:auto; 
    }

    #puzzleGame{
    width:420px;
    height:420px;
    margin:20px auto;
    display:grid;
    border:3px solid #333;
    background-color:#fff;
    }

    .piecePuzzleGame{
    border:1px solid #999;
    background-repeat:no-repeat;
    box-sizing:border-box;
    cursor:grab;
    }

    #previewPuzzleGame{
    width:120px;
    height:120px;
    border:2px solid #333;
    background-size:cover;
    margin-left:auto;
    margin-right:auto;
    background-color:#fff;

    }
    #sizeSelect{
    padding:10px;
    font-size:20px;
    }
    @media (max-width:600px){

    #puzzleGame{
        width:90vw;
        height:90vw;
    }

}

#modal {
    display: none;
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: rgba(0,0,0,0.5); 
    z-index: 1000; 
    justify-content: center; 
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#modal.show {
    display: flex;
    opacity: 1;
}
#modalContent {
    background:white;
    padding:20px;
    max-width:800px;
    width:99%;
    max-height:80%;
    overflow:auto;
    position:relative;
}
#closeModal {
    position:absolute;
    top:10px;
    right:20px;
    cursor:pointer;
    font-size:20px;
}

table {
  border: 1px solid #ccc;
  border-collapse: collapse;
  margin: 0;
  padding: 0;
  width: 100%;
  table-layout: fixed;
}

table caption {
  font-size: 1.5em;
  margin: .5em 0 .75em;
}

table tr {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  padding: .35em;
}

table th,
table td {
  padding: .625em;
  text-align: center;
}

table th {
  font-size: .85em;
  letter-spacing: .1em;
  text-transform: uppercase;
}

@media screen and (max-width: 600px) {
  table {
    border: 0;
  }

  table caption {
    font-size: 1.3em;
  }
  
  table thead {
    border: none;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }
  
  table tr {
    border-bottom: 3px solid #ddd;
    display: block;
    margin-bottom: .625em;
  }
  
  table td {
    border-bottom: 1px solid #ddd;
    display: block;
    font-size: .8em;
    text-align: right;
  }
  
  table td::before {
    /*
    * aria-label has no advantage, it won't be read inside a table
    content: attr(aria-label);
    */
    content: attr(data-label);
    float: left;
    font-weight: bold;
    text-transform: uppercase;
  }
  
  table td:last-child {
    border-bottom: 0;
  }
}

 #letters, #dropzone {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin: 20px;
        flex-wrap: wrap;
    }
      #message {
        padding:20px;       
        text-align:center;
        width:300px;
        margin-left:auto;
        margin-right:auto;
        font-size: 20px;       
        margin-top: 20px;
    }

    .letter {
        width: 50px;
        height: 50px;
        background: white;
        border: 2px solid #333;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        cursor: grab;
    }

    #dropzone {
        min-height: 60px;
        border: 2px dashed #aaa;
        padding: 10px;
        background: #fff;
    }

    .slot {
        width: 50px;
        height: 50px;
        border: 2px dashed #ccc;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .slider-value {
    font-size:32px;
    margin-bottom:20px;
    font-weight:bold;
    color:black;
}

    .containerMA {
    background:white;
    padding:30px;
    border-radius:15px;
    box-shadow:0 10px 25px rgba(0,0,0,0.1);
    text-align:center;
    color:black;
    width:70%;
    margin-left:auto;
    margin-right:auto;
   
}
.timer {
    font-size:24px;
    margin-bottom:15px;
    
}

.word.selected{
    background:#ff9800;
}


h2{ font-size:26px; margin-bottom:10px;}
.ContainerK{ display:flex; flex-wrap:wrap; justify-content:center; gap:5px; margin:10px 0;}


h3{ margin-top:30px; margin-bottom:5px;}
.check{ font-size:22px; margin-left:10px; color:white; display:none; }

    .block{ min-width:30px; min-height:
    50px; padding:5px; 
    font-size:20px; font-weight:bold;
    border-radius:12px; display:flex; 
    align-items:center; 
    justify-content:center;
    cursor:pointer; 
    user-select:none; 
    border:2px solid #999;
    background:#fff;color:black;
    }

    .block.pool{ 
    background:#4CAF50; 
    color:white;
    }
    .block.correct{ 
    background:#ff9800;
    color:black; 
    font-weight:bold;
    }
    .block.selected{ 
    border-color:red;
    }

/* ================================== */
/* RESPONSIVE - mobilni meni */
/* ================================== */
@media screen and (max-width: 768px) {

  .menu-toggle { display: flex; }

  .nav {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: #d9d9d9;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  .nav.active {
    transform: translateX(0);
  }

  .nav li { text-align: center; }

  .nav li a { width: 100%; margin: 5px 0; }

  .dropdown .dropbtn {
    width: 100%;
    justify-content: center;
  }

  .dropdown:hover .dropdown-menu {
    display: none; 
  }

  .dropdown .dropdown-menu {
    position: static;
    display: none;
  }

  .dropdown.active .dropdown-menu {
    display: block;
  }

    .containerMA {
    width:100%;
   
}
}