/* Base Styles */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f7f7f7;
    color: #333;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
}

h1, h2 {
    margin: 0;
}

nav a {
    text-decoration: none;
    color: #007BFF;
    font-weight: bold;
}

main {
    max-width: 800px;
    margin: 0 auto;
}

section {
    margin-bottom: 40px;
}

form {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

label {
    display: block;
    margin-top: 15px;
    color: #555;
}

input[type="file"],
input[type="text"],
select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

button[type="submit"],
button[type="button"],
.delete-button,
.copy-button {
    padding: 10px 16px;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button[type="submit"]:hover,
button[type="button"]:hover,
.delete-button:hover,
.copy-button:hover {
    background-color: #0056b3;
}

button:focus,
input:focus,
select:focus {
    outline: 2px solid #0056b3;
}

#output,
#imageListOutput {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    margin-top: 20px;
}

.hidden {
    display: none;
}

.loading-spinner {
    border: 4px solid rgba(0,0,0,0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #007BFF;
    animation: spin 1s ease infinite;
    margin: 20px auto;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.image-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.image-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.thumbnail {
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-right: 15px;
    border-radius: 4px;
}

.image-actions {
    display: flex;
    gap: 10px;
}

.image-actions button {
    padding: 6px 12px;
}

.copy-button {
    background-color: #28a745;
}

.copy-button:hover {
    background-color: #218838;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    button[type="submit"],
    button[type="button"],
    .delete-button,
    .copy-button {
        width: 100%;
        margin-top: 10px;
    }
    .image-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .image-actions {
        width: 100%;
        justify-content: space-between;
    }
}