*, 
*:before, 
*:after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f0f4f8;
    font-family: 'Roboto', sans-serif;
    text-align: left;
}

main {
    width: 30rem;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

label {
    font-weight: bold;
    font-size: 0.95rem;
    color: #4a4a4a;
}

div {
    margin-bottom: 1rem;
}

input[type="text"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d1d1;
    border-radius: 5px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
    border-color: #007BFF;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    outline: none;
}

input[type="submit"], 
input[type="reset"] {
    padding: 0.75rem 1.5rem;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 0.9rem;
}

input[type="submit"]:hover, 
input[type="reset"]:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

input[type="submit"]#cancel {
    background-color: #dc3545;
}

input[type="submit"]#cancel:hover {
    background-color: #c82333;
}

@media print, screen and (max-width: 40em) {
    body {
        font-size: 120%;
        line-height: 1.5;
    }
    
    main {
        width: 90%;
        margin: 2rem auto;
        padding: 1.5rem;
    }

    label {
        font-size: 1rem;
    }

    input {
        font-size: 1rem;
    }
}