body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    #background-color: #f4f4f4;
    
}

header {
    /*height: 20vh; */
    background: #333;
    color: #fff;
    padding: 10px 20px;
    text-align: center;
    /*background: url('background3.jpg') no-repeat top center/cover; /* Add background image */
}
h2 {
    color: #4CAF50;
}

section {
    padding: 20px 20px;
    margin: 10px;
}
nav a {
    color: #111111;
    margin: 0 15px;
    text-decoration: none;
}

main {
    padding: 20px;
}

h3, h4 {
    color: #333;
}

.category {
    margin-bottom: 20px;
}
footer a {
    color: #111111;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}
footer {
    text-align: center;
    padding: 10px;
    background: #f9f9f9;
    color: #111111;
}





#mainpage h1{
    font-size: 1.3em;
}
#mainpage h1 a{
    text-decoration: none;
    color: #111111;
}

body {
    margin: 0; /* 去掉默认的外边距 */
    height: 100vh; /* 使body高度为视口高度 */
}


#mainpage {
    background-color: #f9f9f9; /* 背景颜色 */
}
#mainpage h1 {
    color: #111111;
}
#mainpage nav a {
    z-index: 9999;
    margin-left: 15px; /* 链接之间的间隔 */
    text-decoration: underline; /* 去掉下划线 */
    color: #333; /* 链接颜色 */
}

#mainpage nav a:hover {
    text-decoration: underline; /* 悬停时添加下划线 */
}
@media (max-width: 768px) {
    .overlay {
        background: rgba(0, 0, 0, 0.5); /* Semi-transparent black overlay */
        color: white;
        text-align: center;
        padding: 20px;
        border-radius: 10px;
    }
}
/* pc */
@media (min-width: 768px) {

    
    #mainpage {
        position: relative; /* 相对定位以便定位子元素 */
        display: flex; /* 使用 Flexbox 布局 */
        justify-content: flex-end; /* 导航靠右 */
        align-items: center; /* 垂直居中 */
        padding: 20px; /* 添加内边距 */
    }
    
    #mainpage h1 {
        position: absolute; /* 绝对定位 */
        left: 50%; /* 水平居中 */
        transform: translateX(-50%); /* 向左移动自身宽度的一半 */
        margin: 0; /* 去掉默认的外边距 */
        text-align: center; /* 文本居中 */
        width: 50%; /* 让 h1 占满宽度 */
       
    }
    
    #mainpage nav {
        margin-left: auto; /* 将 nav 移动到右侧 */
    }
    
  
    
    
   
}

