/* Global styles */
body {
    font-family: Georgia;
    font-size: 14px;
    line-height: 1.4;
    color: #013;
    margin: 10px;
    padding: 10px;
    box-sizing: border-box;
    background-color: #f9f9f9;
}

*, *::before, *::after {
    box-sizing: inherit;
}

/* Container */
.container {
    max-width: 100%;
    margin: 10 auto;
    padding: 20px;
}

/* Header */
header {
    background-color: #4C50AF;
    color: white;
    text-align: center;
    padding: 20px 10px;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.0em;
    margin-bottom: 10px;
}

header h2 {
    font-size: 1.5em;
    margin-bottom: 5px;
}

/* Paragraph styling */
p {
    font-size: 1.0em;
    margin-bottom: 2px;
}

/* Input styling */
input[type="text"], input[type="file"] {
    padding: 10px;
    border: 1px solid #abf;
    border-radius: 5px;
    width: 75%;
    max-width: 500px;
    font-size: 1.2em;
}

/* Add margin for the search results section */
#results {
    margin-top: 20px;
    padding: 10px 0;
    font-size: 1.2em;
}

/* Footer */
footer {
    text-align: center;
    padding: 8px;
    background-color: #f5f5ff;
    margin-top: 10px;
    font-size: 0.8em;
}

/* Buttons */
button {
    background-color: #4C50AF;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #4549a0;
    transform: scale(1.05);
}

/* Re-usable buttons */
/* These are really blue buttons! */
.button-green {
    background-color: #4C50AF;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.0em;
}
.button-green:hover {
    background-color: #4549a0;
    transform: scale(1.05);
}

/* Links */
a {
    color: #0022ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Lists */
ul {
    list-style: none;
    padding: 5;
}

ul li {
    margin: 10px 0;
    font-size: 1em;
}

/* General image display*/
.annotated-image {
    max-width: 100%;        /* Ensures the image doesn't exceed the container's width */
    height: auto;           /* Maintains the aspect ratio */
    border: 2px solid #000; /* Adds a solid border around the image */
    display: block;         /* Removes any inline spacing issues */
    margin: 0 auto;         /* Centers the image if it's within a block-level container */
    max-height: 768px;   /* Adjust as needed */
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .annotated-image {
        border: 1px solid #000; /* Thinner border for smaller screens */
        max-width: 100%;
        height: auto;
        max-height: 512px;
    }
    body {
        font-size: 14px;
    }
    header h1 {
        font-size: 1.4em;
    }
    header h2 {
        font-size: 1.2em;
    }
    button {
        font-size: 1em;
        padding: 8px 8px;
    }
    ul li {
        font-size: 1em;
        margin: 5px 0;
    }
}

/* Spinner styles */
.spinner {
    border: 10px solid #f3f3f3;
    border-top: 10px solid #3498db;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(225, 225, 255, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 6666;
}

.spinner-message {
    color: #fff;
    font-size: 1.5em;
    margin-top: 15px;
    text-align: center;
}

/* Handle animation transitions */
.fade-in {
    opacity: 0;
    transition: opacity 1.0s ease-in-out;
}
.fade-in.show {
    opacity: 1;
}

.nav { margin-top:2em; }