﻿/* Generalni stil */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: 'Roboto', sans-serif;
    background-color: #f9f9f9; /* Svijetla pozadina */
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Omogući vertikalno skrolanje */
    color: #333; /* Tamnija boja teksta */
}

/* Header - Naslov stranice */
header {
    background-color: #b5121b; /* Crvena boja zaglavlja */
    color: white; /* Bijeli tekst */
    padding: 20px;
    text-align: center;
    font-size: 1.4em; /* Smanjena veličina glavnog naslova */
    font-weight: bold;
}

/* Kontejner za gumb za pomoć */
.help-container {
    display: flex;
    justify-content: center;
    margin: 20px 0; /* Dodajemo razmak od glavnog sadržaja */
}

/* Gumb za prikaz uputa */
.question-button {
    background: none;
    border: none;
    color: #b5121b;
    font-size: 1em;
    cursor: pointer;
    text-decoration: underline;
    transition: background-color 0.3s, color 0.3s;
}

/* Kada je gumb hover ili aktivan - crvena pozadina s bijelim tekstom */
.question-button:hover,
.question-button:focus,
.question-button:active {
    background-color: #b5121b; /* Crvena pozadina */
    color: white; /* Bijeli tekst */
    border-radius: 8px;
    padding: 10px 15px; /* Dodajemo padding da izgleda kao klasičan gumb */
    text-decoration: none; /* Uklonimo podcrtavanje na hoveru */
}

/* Glavni sadržaj - container za unos i rezultate */
main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    width: 100%;
    overflow-y: auto; /* Skrolanje unutar glavnog sadržaja */
}

/* Kontejner za unos i gumb */
.input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin-bottom: 20px;
}

/* Stilizacija labele za input polja */
.input-label {
    font-size: 16px;
    font-weight: bold;
    color: #333; /* Tamniji tekst */
    margin-bottom: 10px;
    align-self: flex-start;
    width: 100%;
    max-width: 800px;
}

/* Polje za unos uloga */
#userRoles {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-bottom: 20px;
    transition: border-color 0.3s;
    background-color: white; /* Bijela pozadina polja */
    color: #333; /* Tamniji tekst */
}

#userRoles:focus {
    border-color: #b5121b;
    outline: none;
}

/* Tekstualno polje */
textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
    resize: none;
    transition: border-color 0.3s;
    background-color: white; /* Bijela pozadina */
    color: #333; /* Tamniji tekst */
}

textarea:focus {
    border-color: #b5121b;
    outline: none;
}

/* Gumb */
button {
    background-color: #b5121b;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    margin-top: 10px;
    width: 100%;
    max-width: 200px;
    animation: pulse 2s infinite;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Fokus, aktivno stanje gumba */
button:focus,
button:active {
    background-color: #b5121b !important; /* Zadrži crvenu pozadinu */
    color: white !important; /* Zadrži bijeli tekst */
    outline: none; /* Ukloni outline */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Pojačaj sjenu nakon klika */
}

button:hover {
    background-color: #8c0f14;
}

/* Pulsirajući efekt za gumb */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }
}

/* Skriveni element (upute) */
.hidden {
    display: none;
}
.faded {
    opacity: 0.5;
    transition: opacity 0.5s;
}

/* Animacija za gumb tijekom učitavanja */
.azure-button.loading {
    position: relative;
    color: transparent;
}

.azure-button.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid #fff;
    border-top: 3px solid #0078d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
/* Loader */
.loader {
    text-align: center;
    margin-top: 20px;
}

.loader .spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #b5121b; /* Zadana crvena boja */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.loader .spinner.azure-spinner {
    border-top: 5px solid #0078d4; /* Azure plava */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader #timeElapsed {
    font-size: 16px;
    color: #333;
    margin-top: 10px;
}

/* Box za rezultat */
.response-box {
    width: 100%;
    max-width: 1200px;
    background-color: #f4f4f4; /* Svijetla pozadina */
    border-left: 6px solid #b5121b;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    overflow-y: visible;
    text-align: left;
}

/* Sadržaj odgovora */
.response-content {
    font-size: 16px;
    color: #333; /* Tamniji tekst */
    white-space: pre-wrap;
}

/* Stilizacija uputa - običan tekst s novim redovima */
.instructions {
    max-width: 800px;
    margin: 20px auto;
    text-align: left;
    background-color: #f4f4f4;
    padding: 20px;
    border-left: 6px solid #b5121b;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
}

.instructions h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.instructions p {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Footer */
footer {
    background-color: #b5121b;
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 20px;
}

/* Toast poruka */
.toast {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #155724; /* Tamno zelena */
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    bottom: 30px;
    font-size: 17px;
    opacity: 0;
    transition: opacity 0.5s ease, bottom 0.5s ease;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 1s ease-in;
}

/* Azure loader poruka */
#azureStatusMessage {
    font-size: 14px;
    color: #0078d4;
    margin-top: 10px;
    animation: fadeIn 1s ease-in;
}

/* Animacija za gumb */
.button-animate {
    position: relative;
    overflow: hidden;
}

.button-animate::after {
    content: '';
    position: absolute;
    left: -75px;
    top: -50px;
    width: 50px;
    height: 150px;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(35deg);
    animation: shine 2s infinite;
}

@keyframes shine {
    from { left: -75px; }
    to { left: 200%; }
}

/* Animacija za hover efekat na input polja */
input[type="text"]:focus,
textarea:focus {
    animation: pulse-border 1s infinite;
}

@keyframes pulse-border {
    0% {
        border-color: #b5121b;
    }
    50% {
        border-color: #8c0f14;
    }
    100% {
        border-color: #b5121b;
    }
}

/* Loader */
.loader {
    text-align: center;
    margin-top: 20px;
}

.loader .spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #b5121b; /* Zadana crvena boja */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.loader .spinner.azure-spinner {
    border-top: 5px solid #0078d4; /* Azure plava */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader #timeElapsed {
    font-size: 16px;
    color: #333;
    margin-top: 10px;
}

#funnyMessage,
#azureFunnyMessage {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    animation: fadeIn 1s ease-in;
}

/* Toast poruka */
.toast {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #155724; /* Tamno zelena */
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    bottom: 30px;
    font-size: 17px;
    opacity: 0;
    transition: opacity 0.5s ease, bottom 0.5s ease;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

/* Animacija za upute */
.instructions {
    /* ... (postojeći stilovi) ... */
    animation: slideDown 0.5s ease-in-out;
}

@keyframes slideDown {
    from { max-height: 0; opacity: 0; }
    to { max-height: 500px; opacity: 1; }
}

/* Azure loader poruka */
#azureFunnyMessage {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

/* Azure DevOps gumb stilizacija */
.azure-button {
    background-color: #0078d4; /* Azure plava */
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    margin-top: 10px;
    width: 100%;
    max-width: 300px;
}

.azure-button:hover {
    background-color: #005a9e;
}

.azure-button:disabled {
    background-color: #0078d4;
    cursor: default;
}

/* Footer i naslov za mobilne uređaje - smanji visinu i veličinu teksta */
@media (max-width: 768px) {
    header {
        font-size: 0.8em; /* Smanjena veličina naslova */
    }

    footer {
        font-size: 0.8em; /* Smanjena veličina teksta u footeru */
        padding: 10px; /* Smanji padding */
    }

    /* Gumb za pomoć na mobilnim uređajima */
    .help-container {
        display: flex;
        justify-content: center;
        margin: 20px 0;
    }

    .question-button {
        font-size: 1em; /* Standardna veličina gumba */
    }
}
