* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "KaiTi", "STKaiti", 楷体, serif;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    background-color: #f4f6f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a {
    text-decoration: none;
    color: #333;
    transition: color 0.2s ease;
}
a:hover {
    color: #007bff;
}
ul, li {
    list-style: none;
}
.wrap {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}
/* 公告栏：完全铺满屏幕宽度，无左右留白 */
.notice-bar {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: #fff;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    white-space: nowrap;
}
/* 无缝双段文字滚动，一段消失另一段立刻接上 */
.notice-wrap {
    display: inline-block;
    animation: scroll 25s linear infinite;
}
.notice-text {
    display: inline-block;
}
.notice-text + .notice-text {
    margin-left: 100vw;
}
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
/* 头部：logo+搜索横向并排 */
.header {
    background: #fff;
    padding: 16px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 40px;
}
.logo {
    font-size: 26px;
    font-weight: bold;
    color: #007bff;
}
.search-form {
    flex: 1;
    max-width: 600px;
    position: relative;
}
.search-form input {
    width: 100%;
    padding: 9px 16px;
    border: 1px solid #ddd;
    border-radius: 22px;
    outline: none;
    font-size: 16px;
    font-family: inherit;
}
.search-form button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 5px 16px;
    border: none;
    background: #007bff;
    color: #fff;
    border-radius: 18px;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
}
.search-form button:hover {
    background: #0056b3;
}
/* 分栏导航 放大字体 */
.nav-bar {
    width: 100%;
    background: #fff;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}
.nav-list {
    display: flex;
    gap: 35px;
}
.nav-list a {
    color: #333;
    font-size: 19px;
    padding: 6px 12px;
    border-radius: 4px;
}
.nav-list a:hover,
.nav-list a.active {
    color: #007bff;
    font-weight: bold;
}
/* 主体布局 左800px资源 右侧榜单距页面右边0px */
.main-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex: 1;
    padding-right: 0px;
}
.main-content {
    width: 800px;
    flex-shrink: 0;
}
.sidebar {
    width: 320px;
    flex-shrink: 0;
    margin-right: 0;
}
/* 榜单卡片：固定高度600px，超出滚动 */
.card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    height: 600px;
    overflow-y: auto;
}
.card-title {
    font-size: 18px;
    color: #007bff;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
    position: sticky;
    top: -20px;
    background: #fff;
    padding-top: 20px;
}
/* 资源列表 取消卡片边框阴影，纯平铺 */
.resource-block {
    width: 100%;
}
.resource-item {
    padding: 14px 0;
    border-bottom: 1px dashed #e2e2e2;
}
.resource-item:last-child {
    border-bottom: none;
}
.resource-item h3 {
    font-size: 18px;
    margin-bottom: 6px;
}
.resource-desc {
    font-size: 15px;
    color: #666;
    margin-bottom: 6px;
}
.resource-meta {
    font-size: 14px;
    color: #999;
}
/* 分页 */
.pagination {
    text-align: center;
    margin: 20px 0;
}
.pagination a {
    display: inline-block;
    padding: 7px 14px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}
.pagination a.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}
.pagination a:hover:not(.active) {
    background: #f8f9fa;
}
/* 详情页样式 */
.detail-content h1 {
    font-size: 22px;
    margin-bottom: 10px;
}
.detail-meta {
    color: #999;
    font-size: 15px;
    margin-bottom: 15px;
}
.detail-block {
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}
.download-btn {
    display: inline-block;
    padding: 7px 18px;
    background: #007bff;
    color: #fff !important;
    border-radius: 6px;
    margin: 5px 6px 5px 0;
}
.download-btn:hover {
    background: #0056b3;
}
.comment-form textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin: 8px 0;
    font-family: inherit;
    font-size: 16px;
}
.comment-form button {
    padding: 7px 18px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
}
.comment-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
/* 404 */
.page-404 {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 10px;
    margin: 30px auto;
}
.page-404 h1 {
    font-size: 60px;
    color: #007bff;
    margin-bottom: 18px;
}
.page-404 p {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
}
.btn-back {
    display: inline-block;
    padding: 10px 25px;
    background: #007bff;
    color: #fff !important;
    border-radius: 6px;
}
/* footer固定底部 */
.footer {
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
    border-top: 1px solid #eee;
    color: #888;
    font-size: 13px;
    line-height: 1.6;
    width: 100%;
}
.back-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 44px;
    height: 44px;
    background: #007bff;
    color: #fff;
    text-align: center;
    line-height: 44px;
    border-radius: 50%;
    font-size: 17px;
    display: none;
    z-index: 999;
}
.back-top:hover {
    background: #0056b3;
    color: #fff;
}