:root {
    --resWidth: 95vw;
    --resHeight: 23.2vh;
    /*ne dirati ovo*/
}

body {
    background-image: url(slike/1.webp);
    background-size: cover;
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;


    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

.glavniSadrzaj {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    width: 90vw;
    min-height: 97vh;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
}

.polje {
    background-color: rgba(255, 255, 255, 0.9);
    width: 44%;
    height: 47vh;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.polje:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.polje h1 {
    text-align: center;
    margin-top: 2vh;
    font-size: 1.5em;
    color: #333;
}

select {
    appearance: none;
    background-color: rgba(54, 170, 216, 0.6);
    color: white;
    border: none;
    border-radius: 7px;
    width: 60%;
    height: 5vh;
    margin: 5vh auto 0;
    display: block;
    text-align: center;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
}

select:hover {
    transform: scale(1.08);
    background-color: rgba(54, 170, 216, 0.8);
}


#rezultat {
    box-sizing: border-box;
    border: 2px solid #36aad8;
    border-left: 5px solid #36aad8;
    border-radius: 8px;
    padding: 15px;
    background-color: #eaf6fb;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1em;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.custom-input {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.custom-input input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    flex: 1;
    font-size: 1em;
}

.custom-input button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

.custom-input button:hover {
    background-color: #45a049;
}

/* Responsive, but keeps 2x2 layout even on smaller screens */
@media (max-width: 768px) {
    .glavniSadrzaj {
        justify-content: center;
    }

    .polje {
        width: 44%;
        height: 45vh;
    }

    select:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .polje {
        width: 100%;
        height: auto;
    }
}


.result-box {
    background-color: #eaf6fb;
    padding: 20px;
    border-left: 5px solid #36aad8;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    margin-top: 15px;
    text-align: center;
    animation: fadeIn 0.4s ease-in-out;
}

.result-title {
    margin: 0 0 10px;
    font-size: 1.4em;
    color: #2c3e50;
}

.result-value {
    font-size: 1.1em;
    color: #2c3e50;
}

.result-value .highlight {
    font-size: 1.3em;
    font-weight: bold;
    color: #3498db;
}

/* Optional: smooth entry */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.credits {
    background-color: #3498db;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: -20px;
    text-align: center;
    height: 16vh;
    display: flex;
    justify-content: center;
    align-items: center;
}