/* Global styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.home {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f4f4f9;
    padding: 20px;
    overflow: hidden; /* Ensure elements don't overflow */
}

/* Guestbook form layout adjustments */
.guestbook-form {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.guestbook-form h3, .guestbook-form h4 {
    text-align: center;
    color: #5e5e5e;
}

.guestbook-form label {
    font-weight: 600;
    margin-bottom: 5px;
}

.guestbook-form input[type="text"],
.guestbook-form textarea,
.guestbook-form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Button styling */
.guestbook-form button {
    background-color: #b3b3f5;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    width: 100%;
    cursor: pointer;
}

.guestbook-form button:hover {
    background-color: #9595e8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .guestbook-form {
        max-width: 90%;
        padding: 10px;
    }
}

.imaged {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}

/* Signature and webcam section styling */
.signature-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
    max-width: 600px;
    height: auto;
    border: 1px solid #ccc;
    position: relative;
    margin-bottom: 10px;
}

.signature-canvas {
    border: 1px solid #ccc;
    width: 100%;
    height: 300px;
    margin-bottom: 10px;
    display: block;
}

/* Camera section styling */
#my_camera {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    overflow: hidden;
}

#results {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-top: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#results img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
}

.signature-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Additional responsiveness */
@media only screen and (max-width: 600px) {
    .guestbook-form {
        width: 100%;
    }

    #my_camera, #results, .signature-container {
        width: 100%;
        max-width: 100%;
    }

    .signature-canvas {
        height: 200px;
    }
}
