/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}
/* 标题样式 */
h1 {
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
h2 {
    color: #34495e;
    margin-top: 30px;
}
/* 导航菜单 */
nav ul {
    list-style-type: none;/* 移除列表项符号如圆点 */
    padding: 0;
    display: flex;/* 启用弹性布局（横向排列） */
    gap: 20px;/* 列表项之间的间距 */
}
nav a {
    text-decoration: none;/* 去除链接下划线 */
    color: #3498db;
    font-weight: 500;/* 中等粗细字体 */
    transition: color 0.3s;/* 颜色变化添加0.3秒过渡动画 */
}
nav a:hover {
    color: #e74c3c;
}
/* 项目卡片 */
.project-card {
    background: white;
    padding: 20px;/* 内边距20px */
    margin-bottom: 20px;/* 下方外间距20px */
    border-radius: 8px;/* 圆角8像素 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);/* 浅灰色阴影 水平偏移量，垂直偏移量，模糊半径，阴影颜色 */
    transition: transform 0.3s;
}
.project-card:hover {
    transform: translateY(-5px);
}
.demo-btn {
    display: inline-block;/* 行内块元素 */
    background: #3498db;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 10px;
    transition: background 0.3s;
}
.demo-btn:hover {
    background: #2980b9;
}
/* 联系方式 */
.contact-list {
    list-style-type: none;
    padding: 0;
}
.contact-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}
.contact-icon {
    margin-right: 10px;
    font-size: 1.2em;/* 将元素的字体大小设置为父元素字体大小的 1.2 倍 */
}
.email-link {
    color: #0066cc;
    text-decoration: none;
    border-bottom: 1px dashed #0066cc;/* 底部边框：粗细，虚线，颜色 */
}
.hint {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-left: 5px;
}
/* 页脚 */
footer {
    margin-top: 50px;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9em;
}
hr {
    border: 0;
    height: 1px;
    background: #eee;
    margin: 30px 0;
}
/* 留言板样式 */
#guestbook {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    border-style:solid;
    border-width:3px;
    border-color:#000;
    background:#fff;
}
#guestbookForm {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;/* 块级元素 */
    margin-bottom: 5px;
    font-weight: bold;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.form-group textarea {
    min-height: 100px;
    font-family:sans-serif;
}
button[type="submit"] {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
button[type="submit"]:hover {
    background-color: #45a049;
}
.theWrong {
    border: 2px solid red;
    animation: shake 0.5s;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}