body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

header {
    background-color: #4CAF50;
    color: white;
    padding: 20px;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

header .right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 30px;
}

header .right a {
    margin-top: 10px; /* Add margin to space out the links */
    white-space: nowrap; /* Prevent links from wrapping */
}

main {
    flex: 1;
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
}

h2 {
    text-align: center;
    font-size: 28px;
    color: #4CAF50;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 10px;
    border-bottom: 2px solid #4CAF50;
}

table {
    margin-top: 20px;
    border-collapse: collapse;
    width: 100%;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

th {
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    text-align: left;
}

td {
    border-bottom: 1pt solid #f0f0f0;
    padding: 10px;
}

a {
    text-decoration: none;
    color: #4CAF50;
    transition: color 0.3s ease;
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

footer {
    text-align: center;
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    width: 100%;
}

p, ul {
    font-size: 14px;
    color: #666;
}

h2, caption {
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    margin: 10px 0;
    color: #333;
}

figure {
    margin: 0;
}

.greska {
    font-weight: bold;
    color: red;
}

.menu {
    background-color: #4CAF50;
    padding: 10px;
    text-align: center;
}

.menu a {
    color: white;
    font-weight: bold;
    margin: 0 10px;
}

.menu a:hover {
    text-decoration: underline;
}

a.link {
    display: inline-block;
    background-color: #ffeb3b;
    color: black;
    padding: 5px 10px;
    border-radius: 4px;
    text-align: center;
    margin: 0 auto;
    margin-bottom: 20px; /* Space below the button */
}

a.sortable {
    color: #4CAF50;
    font-weight: bold;
}

a:hover {
    color: #333;
}

tr:hover {
    background-color: #f0f0f0;
}

.lijevi {
    width: 20%;
}

form .centered-submit {
    display: flex;
    justify-content: center;
    margin-top: 20px; /* Space above the submit button */
}

form .centered-submit input[type="submit"] {
    padding: 10px 20px;
}

.center-button {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

form input[type="submit"] {
    margin-bottom: 20px; /* Space above the submit button */
}

#sadrzaj {
    clear: both;
    width: 100%;
    max-width: 1200px; /* Ensure content doesn't exceed max width */
    margin: 0 auto;
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

#opis {
    padding-left: 5px;
}

#paginacija {
    text-align: center;
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin: 20px 0;
}

input[type="date"],
input[type="text"],
textarea,
select {
    width: calc(100% - 20px);
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type="submit"] {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

input[type="submit"]:hover {
    background-color: #45a049;
}

.button-container {
    text-align: center;
    margin: 20px 0;
}

.button-container a {
    display: inline-block;
}

/* Media Queries for Mobile Devices */
@media screen and (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    header .right {
        margin-right: 0;
        text-align: center;
        align-items: center;
    }

    header .right a {
        margin-top: 5px; /* Reduce margin for smaller screens */
    }

    main {
        width: 95%;
        margin: 10px auto;
    }

    h2 {
        font-size: 24px;
        margin: 15px 0;
        padding: 5px;
    }

    table {
        font-size: 14px; /* Reduce font size for tables */
    }

    th, td {
        padding: 8px;
    }

    a.link {
        padding: 8px 12px;
        margin-bottom: 10px;
    }

    input[type="date"],
    input[type="text"],
    textarea,
    select {
        width: calc(100% - 10px);
        padding: 8px;
    }

    input[type="submit"] {
        width: 100%;
        padding: 10px;
    }

    .menu {
        padding: 5px;
    }

    .menu a {
        margin: 0 5px;
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 20px;
        padding: 5px;
    }

    th, td {
        padding: 6px;
    }

    input[type="date"],
    input[type="text"],
    textarea,
    select {
        width: calc(100% - 8px);
        padding: 6px;
    }

    input[type="submit"] {
        padding: 8px;
    }

    a.link {
        padding: 6px 10px;
    }
}
