/* General styling */
main {
    max-width: 50rem;
    margin: 2rem auto;
    text-align: center;
}
.error-message {
    color: #ff4444;
    font-weight: 500;
    margin: 1rem 0;
}

/* File input styling */
#image-input {
    display: inline-block;
    padding: 0.6rem 1rem;
    border: 2px solid var(--border-color);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: border 0.3s, background 0.3s;
}
#image-input:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.12);
}
#image-input::file-selector-button {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--page-text);
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
#image-input::file-selector-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    transform: scale(1.03);
}
#image-input::file-selector-button:active {
    transform: scale(0.95);
}

/* Image output styling */
#image-output {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 12.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1rem;
}
#image-output img {
    max-width: 100%;
    max-height: 25rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.4);
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
#image-output img.show {
    animation: fadeIn 0.3s forwards;
}

/* Responsive design (37.5rem and below) */
@media (max-width: 37.5rem) {
    main { margin: 1rem auto; }
}
