<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Заказ столика в ресторане</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<form>
<!-- Шапка формы -->
<div class="form-header">
<h2>Бронирование столика</h2>
<p>Заполните данные для заказа</p>
</div>
<div>
<label for="name">Имя</label>
<input type="text" id="name" name="name" required>
</div>
<div>
<label for="phone">Телефон</label>
<input type="tel" id="phone" name="phone" required>
</div>
<div>
<label for="datetime">Дата и время</label>
<input type="datetime-local" id="datetime" name="datetime" required>
</div>
<div>
<label for="guests">Количество гостей</label>
<input type="number" id="guests" name="guests" min="1" max="20" required>
</div>
<div>
<label for="wishes">Пожелания</label>
<textarea id="wishes" name="wishes" rows="3"></textarea>
</div>
<button type="submit">Забронировать</button>
</form>
</body>
</html>
body {
font-family: Arial, sans-serif;
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
/* Свое фото на фон (замените fon.jpg на название вашей картинки) */
background-image: url('fon.jpg');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
form {
width: 100%;
max-width: 400px;
background: rgba(255, 255, 255, 0.95);
padding: 30px;
border-radius: 8px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
/* Стили для шапки формы */
.form-header {
text-align: center;
margin-bottom: 20px;
}
.form-header h2 {
margin: 0 0 5px 0;
color: #333;
font-size: 22px;
}
.form-header p {
margin: 0;
color: #666;
font-size: 14px;
}
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;
box-sizing: border-box;
}
/* Убираем иконку календаря */
input::-webkit-calendar-picker-indicator {
display: none;
}
/* Фокус */
input:focus, textarea:focus {
outline: none;
border-color: #007bff;
}
/* Валидация */
input:invalid, textarea:invalid {
border-color: red;
}
input:valid, textarea:valid {
border-color: green;
}
/* Кнопка */
button {
width: 100%;
padding: 10px 15px;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
}
button:hover {
background-color: #0056b3;
}
button:active {
transform: scale(0.95);
}