body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.app-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

/* Container for the canvas to manage its size */
.mobile-view {
    width: 100%;
    max-width: 360px; /* Controls the preview size on desktop */
}

/* The canvas itself, made responsive */
#receiptCanvas {
    width: 100%;
    height: auto;
    border-radius: 10px; /* Optional: adds rounded corners to the preview */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Form Styles */
.form-container {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 300px;
    align-self: flex-start; /* Keep form at the top */
}

.form-container h3 {
    margin-top: 0;
    color: #333;
}

.form-container label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
}

.form-container input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    color: #333;
    box-sizing: border-box;
}

#downloadBtn {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

#downloadBtn:hover {
    background-color: #0056b3;
}

/* On smaller screens, stack the items */
@media (max-width: 700px) {
    .app-container {
        flex-direction: column;
        align-items: center;
    }
}