body {
font-family: Arial, sans-serif;
margin: 30px;
}
form {
max-width: 400px;
}
div {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
input, textarea {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
}
/* Фокус */
input:focus, textarea:focus {
outline: none;
border-color: #007bff;
}
/* Валидация */
input:invalid, textarea:invalid {
border-color: red;
}
input:valid, textarea:valid {
border-color: green;
}
/* Кнопка */
button {
padding: 10px 15px;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
button:active {
transform: scale(0.95);
}