/* 基础样式：移除强制溢出隐藏，允许滚动 */
html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    width: 100%;
    height: auto; /* 取消强制100%高度，适应内容 */
    overflow: auto; /* 允许页面滚动 */
}

/* 全局样式：保留盒模型但不影响显示 */
* {
    margin: 0px;
    box-sizing: border-box;
}

/* 页面背景：确保背景图加载失败时仍有底色 */
body {
    background: url("../images/bg.jpg");
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    background-color: #f0f0f0; /* 备用底色，避免空白 */
}

/* 顶部导航栏：保持显示 */
#top-bar {
    position: relative; /* 取消fixed，避免遮挡内容 */
    align-items: center;
    justify-content: center;
    text-align: center;
    top: 0;
    width: 100%;
    background: #f8f9fb;
    background-size: cover;
    background-position: center;
    color: #999;
    padding: 10px 0;
    z-index: 5;
}

#top-bar a {
    text-decoration: none;
    color: #999;
}

#top-bar img {
    height: 30px;
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}

#top-bar h1, #top-bar h3 {
    display: inline-block;
    margin: 0;
    vertical-align: middle;
    font-weight: normal;
}

#top-bar h1 {
    font-size: 24px;
    margin-right: 10px;
}

#top-bar h3 {
    font-size: 16px;
    margin-left: 10px;
}

/* 移除覆盖层：直接隐藏欢迎页遮挡元素 */
#overlay {
    display: none !important; /* 强制不显示覆盖层 */
}

/* 核心内容容器：默认显示，取消强制高度 */
#real-content {
    display: block; /* 强制显示核心内容 */
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto; /* 由内容撑开高度 */
    margin-top: 50px; /* 保留顶部间距，避免与导航栏重叠 */
}

/* 移除body的状态限制，允许正常滚动 */
body.overlay-active,
body.overlay-hidden {
    overflow: auto;
}

/* 中间内容区样式 */
.centercolumn {
    margin: auto;
    width: 80%;
    padding: 10px;
}

/* 卡片样式：保持原有设计，确保可见 */
.card {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 20px;
    margin-top: 20px;
    border-radius: 30px;
    margin-bottom: 20px;
}

.card-after {
    height: 90px;
}

.center {
    text-align: center;
}

/* 返回顶部按钮：保持可见 */
.backtotop {
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 10;
    border: none;
    outline: none;
    background-color: rgba(0, 0, 0, 0);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 10px;
}

.backtotop:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* 友链卡片样式 */
.card-friendlylink {
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    padding: 20px;
    box-sizing: border-box;
    text-align: left;
}

.card-friendlylink h2 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
}

.friendlylink {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.friendlylink a {
    text-decoration: none;
    color: #007BFF;
    font-size: 16px;
    transition: color 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

.friendlylink a:hover {
    color: #0056b3;
    background-color: #e9f5ff;
}

/* 页脚样式：固定在底部但不遮挡内容 */
.footer {
    background: #f8f9fb;
    background-size: cover;
    background-position: center;
    color: #999;
    text-align: center;
    padding: 20px 0;
    position: relative; /* 取消fixed，改为随内容流动 */
    width: 100%;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
    margin-top: 50px; /* 与上方内容保持距离 */
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer p {
    margin: 0;
    font-size: 14px;
}

.footer a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ffcc00;
}

.footer .about-box {
    position: relative;
    margin: 0 auto;
    height: 26px;
    line-height: 30px;
}

.footer .about-box a {
    color: #999;
}

/* 标签页样式：默认显示第一个标签（若有JS控制，需配合调整） */
.tab {
    display: block; /* 取消默认隐藏，所有标签页默认显示 */
    text-align: center;
}

.tab-button {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 5px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    text-align: center;
}

.tab-button.active {
    background-color: #4CAF50;
    color: white;
}

/* 容器样式：保持可见 */
.container {
    margin-top: 20px;
}

/* 表格容器样式 */
.table-container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    overflow-x: auto; /* 允许表格横向滚动，避免内容被截断 */
}

table {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 14px;
    text-align: left;
    color: #333333;
    word-wrap: break-word; /* 允许文本换行，避免内容溢出 */
}

th {
    background-color: rgba(200, 200, 200, 0.7);
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

tr:nth-child(even) {
    background-color: rgba(240, 240, 240, 0.7);
}

tr:hover {
    background-color: rgba(220, 220, 220, 0.8);
}

/* 响应式适配：确保小屏幕内容可见 */
@media (max-width: 600px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }
    th, td {
        padding: 10px;
        text-align: right;
        position: relative;
    }
    th::before, td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 50%;
        padding-left: 10px;
        font-weight: bold;
        text-align: left;
        white-space: nowrap;
    }
    thead tr {
        display: none;
    }
    tbody tr:not(:last-child) td {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
}

/* 弹窗样式：默认隐藏（如需默认显示可改为display: flex） */
.popup {
    display: none; /* 弹窗仍默认隐藏，如需显示改为flex */
    position: fixed;
    z-index: 5;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    text-align: center;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover, .close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* 下载按钮样式 */
.download-button {
    background-color: #007bffb0;
    border: none;
    color: white;
    padding: 8px 16px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.download-button:hover {
    background-color: #007bffe3;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}