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

body {
    font-family: Arial, sans-serif;
    background-color: #f0f4f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
    padding: 10px;
    overflow-x: hidden;
}

.container {
    display: flex;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 1100px;
    width: 100%;
    overflow: hidden;

    @media (max-width: 768px) {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        margin: 0 10px;
    }
}

.sidebar {
    width: 40%;
    background-color: #4a6741;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;

    @media (max-width: 768px) {
        width: 100%;
        align-items: center;
        padding: 15px;
    }

    .polaroid {
        background-color: white;
        padding: 10px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        transform: rotate(-5deg);
        margin-bottom: 20px;
        width: 250px;
        max-width: 100%;

        @media (max-width: 768px) {
            width: 90%;
            max-width: 250px;
        }

        &:last-child {
            transform: rotate(5deg);
            align-self: flex-end;

            @media (max-width: 768px) {
                align-self: center;
            }
        }

        img {
            width: 100%;
            height: 250px;
            object-fit: cover;

            @media (max-width: 768px) {
                height: 200px;
            }
        }
    }

    .sidebar-text {
        color: white;
        position: absolute;
        left: 20px;
        bottom: 20px;
        font-size: 2rem;
        line-height: 1.2;

        @media (max-width: 768px) {
            position: static;
            text-align: center;
            margin-top: 20px;
            font-size: 1.5rem;
        }
    }
}

main {
    width: 60%;
    padding: 30px;

    @media (max-width: 768px) {
        width: 100%;
        padding: 20px;
    }

    header {
        text-align: center;
        margin-bottom: 20px;

        #title {
            color: #4a6741;
            margin-bottom: 10px;
        }

        #description {
            color: #7a8f70;
            font-style: italic;
        }
    }

    #survey-form {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    label {
        margin-bottom: 5px;
        color: #4a6741;
        font-weight: bold;
    }

    input,
    select,
    textarea {
        width: 100%;
        padding: 10px;
        border: 1px solid #4a6741;
        border-radius: 5px;
        margin-top: 5px;

        &[type="checkbox"],
        &[type="radio"] {
            width: auto;
            margin-right: 10px;
        }
    }

    fieldset {
        border: 1px solid #4a6741;
        border-radius: 5px;
        padding: 15px;
        margin-bottom: 15px;

        legend {
            color: #4a6741;
            font-weight: bold;
        }
    }

    #submit {
        background-color: #4a6741;
        color: white;
        border: none;
        padding: 12px;
        border-radius: 5px;
        cursor: pointer;
        transition: background-color 0.3s ease;

        &:hover {
            background-color: #3a5331;
        }
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }

    .container {
        background-color: #1e1e1e;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);

        .sidebar {
            background-color: #333d29;

            .polaroid {
                background-color: #2c2c2c;
                box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);

                img {
                    filter: brightness(0.9); /* Ajusta o brilho das imagens para o modo escuro */
                }
            }

            .sidebar-text {
                color: #e0e0e0;
            }
        }

        main {
            header {
                #title {
                    color: #a5d6a7;
                }

                #description {
                    color: #81c784;
                }
            }

            #survey-form {
                label {
                    color: #a5d6a7;
                }

                input,
                select,
                textarea {
                    border-color: #a5d6a7;
                    background-color: #2c2c2c;
                    color: #e0e0e0;
                }

                fieldset {
                    border-color: #a5d6a7;

                    legend {
                        color: #a5d6a7;
                    }
                }

                #submit {
                    background-color: #333d29;
                    color: #e0e0e0;

                    &:hover {
                        background-color: #2b3322;
                    }
                }
            }
        }
    }
}