body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    background-color: #000000;
    display: flex; /* 添加此行 */
    flex-direction: column; /* 添加此行 */
    min-height: 100vh; /* 添加此行 */
    color: #FFFFFF; /* 全局文本颜色改为白色，确保可读性 */
}

#header {
    position: relative; /* 添加相对定位 */
    height: 60px;
    background-color: #383838;
    border-bottom: 2px solid #C0C0C0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px; /* 调整内边距 */
}

#header #logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    cursor: pointer;
}

#header #title {
    display: flex;
    align-items: center;
}

#header #title h1 {
    margin: 0;
    font-size: 28px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 5px #000000;
    cursor: pointer;
}

#header #time {
    font-size: 14px;
    color: #FFFFFF;
    margin-right: 10px;
    cursor: pointer;
}

#header #title-time {
    display: flex;
    align-items: center;
    cursor: pointer;
}

#header #title-time h2 {
    font-size: 20px;
    color: #FFFFFF;
    margin: 0 10px;
    text-shadow: 2px 2px 5px #000000;
    cursor: pointer;
}

#header #about {
    font-size: 14px;
    color: #FFFFFF;
    cursor: pointer;
    text-shadow: 2px 2px 5px #000000;
}

#content {
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#content h1 {
    font-size: 180px;
    font-weight: bold;
    color: #FFFFFF;
    text-shadow: 2px 2px 5px #000000;
    animation: rainbow 2s ease-in-out infinite;
}

@keyframes rainbow {
    0% {
        color: #FFD700;
        text-shadow: 2px 2px 5px #000000;
    }
    25% {
        color: #C0C0C0;
        text-shadow: 2px 2px 5px #FFFFFF;
    }
    50% {
        color: #FFFFFF;
        text-shadow: 2px 2px 5px #000000;
    }
    75% {
        color: #808080;
        text-shadow: 2px 2px 5px #FFFFFF;
    }
    100% {
        color: #C0C0C0;
        text-shadow: 2px 2px 5px #FFFFFF;
    }
}

#footer {
    height: auto; /* 将高度设置为自适应 */
    background-color: #1A1A1A;
    border-top: 2px solid #444444;
    display: flex;
    flex-direction: column; /* 将元素排列方向改为垂直方向 */
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #CCCCCC;
    text-shadow: 2px 2px 5px #000000;
    padding: 10px 20px; /* 调整内边距 */
}

#footer p {
    margin: 5px 0; /* 调整每行间距 */
}

.police-info {
    display: flex; /* 将子元素水平排列 */
    align-items: center; /* 垂直居中 */
}

.police-info img {
    margin-right: 10px; /* 设置图标和文本之间的间距 */
}

#footer a {
    color: #FFD700;
    text-decoration: none;
    text-shadow: 2px 2px 5px #000000;
    margin-left: 15px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(117, 10px);
    grid-template-rows: repeat(190, 10px);
    gap: 0;
    margin: 0 auto;
    width: 1170px;
    height: 1900px;
    background-color: #000000;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.grid div {
    background-color: transparent;
    /* 使用深色边框替代白色，#333333是深灰色，既可见又不刺眼 */
    border: 0.5px solid #333333;
    box-sizing: border-box;
    width: 10px;
    height: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

/* 保持悬停效果，但可以稍微调整颜色增加对比度 */
.grid div:hover {
    background-color: #FFD700;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    max-width: 600px;
    width: 80%;
    text-align: center;
}

.modal-content {
    display: none;
    text-align: left; /* 让文本左对齐 */
    padding: 20px;
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-content h2 {
    font-size: 28px;
    font-weight: bold;
    color: #383838;
    margin-bottom: 10px;
}

.modal-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #555555;
    margin-bottom: 15px;
}

.modal-content img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


.about-links {
    display: none;
    position: absolute;
    top: 100%; /* 相对于父元素 #header 的底部 */
    right: 0;
    background-color: #383838;
    border-radius: 5px;
    padding: 15px; /* 调整内边距 */
    z-index: 999; /* 确保在最顶层 */
}

.about-link {
    cursor: pointer;
    color: #007bff;
    font-size: 18px;
    margin-right: 20px; /* 增加链接之间的横向间距 */
    margin-bottom: 10px; /* 增加链接之间的垂直间距 */
    transition: color 0.3s ease;
}

.about-link:last-child {
    margin-right: 0; /* 移除最后一个链接的右侧间距 */
}

.about-link:hover {
    color: #0056b3;
}

/* 修改 .friend-links 的样式 */
.friend-links {
    display: flex;
    justify-content: space-around;
    background-color: #383838;
    padding: 14px 0;
    color: #FFFFFF;
    /*flex-wrap: wrap; !* 允许换行 *!*/
}

.friend-links-cn,
.friend-links-foreign {
    /*flex: 1;*/
    /*padding: 0 10px; !* 调整这里的间距 *!*/
    flex-basis: 50%;
}

.friend-links-cn h3,
.friend-links-foreign h3 {
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #FFFFFF;
    color: #FFD700;
}

.friend-links-foreign ul {
    list-style-type: none;
    padding: 0;
    margin: 10px 0;
    column-count: 2;
    /*column-width: calc(50% - 20px); !* 考虑到间距，减去两边的 padding *!*/
    column-gap: 10px; /* 设置列与列之间的间距 */
    max-height: 200px; /* 设置每列最大高度为200px，超出部分会隐藏并出现滚动条 */
    overflow-y: auto; /* 垂直方向溢出时出现滚动条 */
}

.friend-links-cn ul {
    list-style-type: none;
    padding: 0;
    margin: 10px 0;
    column-count: 6;
    /*column-width: calc(50% - 20px); !* 考虑到间距，减去两边的 padding *!*/
    column-gap: 10px; /* 设置列与列之间的间距 */
    max-height: 200px; /* 设置每列最大高度为200px，超出部分会隐藏并出现滚动条 */
    overflow-y: auto; /* 垂直方向溢出时出现滚动条 */
}

/* 修改 h3 的样式 */
.friend-links-cn h3,
.friend-links-foreign h3 {
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #FFFFFF;
    color: #FFD700;
}

/* 链接的样式 */
.friend-links-cn ul li a,
.friend-links-foreign ul li a {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s;
}

.friend-links-cn ul li a:hover,
.friend-links-foreign ul li a:hover {
    color: #FFA500;
}

/* 每列宽度设置为占据50% */
.friend-links-cn,
.friend-links-foreign {
    flex-basis: 50%;
}