/* General layout */
main {
    max-width: 55rem;
    margin: 2rem auto;
    text-align: center;
    padding: 0 1rem;
}

/* File upload styling */
.upload-section {
    margin-bottom: 1.5rem;
}
#image-input {
    display: none; /* Hide default outdated input */
}
.custom-file-upload {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border: 2px dashed var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--page-text);
}
.custom-file-upload:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

/* Control panel with filters */
.control-panel {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

/* Buttons with different colours */
#reset-btn {
    background-color: #8997a1;
}
#reset-btn:hover:not(:disabled) {
    background-color: #535d66;
}
#download-btn {
    background-color: #24ad40;
}
#download-btn:hover:not(:disabled) {
    background-color: #1b722e;
}

/* Preview area */
#preview-container {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 18rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
#preview-container img {
    max-width: 100%;
    max-height: 30rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
    opacity: 0;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
#preview-container img.show {
    animation: fadeIn 0.3s forwards;
}

/* Text styling */
.placeholder-text {
    font-size: 1.1rem;
    color: var(--page-text);
    opacity: 0.6;
}
.error-message {
    color: #d23949;
    font-weight: 500;
}
.loading {
    color: var(--primary-color);
    font-weight: 500;
}
#info-text {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--page-text);
    opacity: 0.7;
}

/* Responsive design */
@media (max-width: 37.5rem) {
    main {
        margin: 1rem auto;
    }
    .control-panel {
        flex-direction: column;
        align-items: stretch;
    }
}
