/* 基础样式 */
body {
    font-family: Arial, sans-serif; /* 设置全局字体为Arial，如果没有Arial则使用无衬线字体 */
    background-color: #f4f4f4; /* 设置页面背景颜色为浅灰色 */
    margin: 0; /* 移除body默认的外边距 */
    padding: 0; /* 移除body默认的内边距 */
}

.container {
    max-width: 600px; /* 设置容器最大宽度为600px */
    margin: 50px auto; /* 上下边距为50px，左右自动居中 */
    padding: 20px; /* 内边距为20px */
    background-color: #fff; /* 背景颜色为白色 */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* 添加轻微阴影效果，增强立体感 */
    border-radius: 8px; /* 圆角边框，使外观更加圆润 */
}

h1 {
    text-align: center; /* 文本居中对齐 */
    color: #333; /* 设置标题颜色为深灰色 */
}

.form-group {
    margin-bottom: 15px; /* 在表单组之间添加垂直间距 */
}

label {
    display: block; /* 将标签设置为块级元素，使其占据一整行 */
    margin-bottom: 5px; /* 标签与输入框之间的垂直间距 */
    color: #555; /* 标签文字颜色为中等灰色 */
}

input[type="text"],
input[type="tel"],
textarea {
    width: 100%; /* 输入框和文本区域的宽度占满父容器 */
    padding: 10px; /* 内边距为10px */
    border: 1px solid #ccc; /* 边框为1px实线，颜色为浅灰色 */
    border-radius: 4px; /* 圆角边框 */
    box-sizing: border-box; /* 使padding和border不会增加元素的总宽度 */
}

textarea {
    resize: vertical; /* 允许用户仅垂直调整文本区域大小 */
    height: 100px; /* 设置固定高度为100px */
}

.btn-submit {
    width: 100%; /* 按钮宽度占满父容器 */
    padding: 10px; /* 内边距为10px */
    background-color: #007BFF; /* 按钮背景颜色为蓝色 */
    color: #fff; /* 按钮文字颜色为白色 */
    border: none; /* 移除按钮的边框 */
    border-radius: 4px; /* 圆角边框 */
    cursor: pointer; /* 鼠标悬停时变为手型指针 */
    font-size: 16px; /* 字体大小为16px */
}

.btn-submit:hover {
    background-color: #0056b3; /* 鼠标悬停时按钮背景颜色变暗 */
}

.success {
    color: green; /* 成功信息的颜色为绿色 */
    text-align: center; /* 文本居中对齐 */
    margin-bottom: 15px; /* 下方间距为15px */
}

.error {
    color: red; /* 错误信息的颜色为红色 */
    text-align: center; /* 文本居中对齐 */
    margin-bottom: 15px; /* 下方间距为15px */
}

/* 响应式设计 */
@media (max-width: 600px) { /* 当屏幕宽度小于等于600px时应用以下样式 */
    .container {
        margin: 20px auto; /* 减小容器上下边距 */
        padding: 15px; /* 减小容器内边距 */
    }

    h1 {
        font-size: 24px; /* 减小标题字体大小 */
    }

    input[type="text"],
    input[type="tel"],
    textarea,
    .btn-submit {
        font-size: 14px; /* 减小输入框、文本区域和按钮的字体大小 */
    }
}