/**
 * 前台样式
 * 模仿 qqq.wiki 简洁白底风格
 */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #f5f6fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* ========== 顶部导航 ========== */
.header {
    background: #1a1a2e;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 24px;
}
.logo {
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 1px;
}
.search-form {
    display: flex;
    flex: 1;
    max-width: 480px;
}
.search-input {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 8px 0 0 8px;
    font-size: 14px;
    outline: none;
    background: #fff;
    color: #333;
}
.search-btn {
    padding: 8px 20px;
    background: #1677ff;
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}
.search-btn:hover { background: #4096ff; }

/* ========== 公告栏 ========== */
.notice-bar {
    background: linear-gradient(90deg, #e6f4ff, #f0f5ff);
    border-bottom: 1px solid #bae0ff;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #1677ff;
    overflow: hidden;
}
.notice-icon { font-size: 18px; flex-shrink: 0; }
.notice-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.3s;
}

/* ========== 分类标签 ========== */
.category-tabs {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 0 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.category-tabs-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 4px;
    padding: 12px 0;
}
.category-tab {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.category-tab:hover {
    background: #f0f5ff;
    color: #1677ff;
}
.category-tab.active {
    background: #1677ff;
    color: #fff;
    font-weight: 500;
}

/* ========== 主内容区 ========== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #bbb;
}
.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state p { font-size: 16px; }

/* ========== 资源列表 ========== */
.resource-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #e8e8e8;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.resource-list-item {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 10px 20px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    gap: 0;
    font-size: 14px;
    line-height: 1.5;
}
.resource-list-item:hover {
    background: #fafbff;
}

/* 网盘图标列 */
.list-item-netdisk {
    flex-shrink: 0;
    width: 50px;
    text-align: center;
    font-size: 16px;
}

/* 标题列：弹性填充剩余空间 */
.list-item-title {
    flex: 1;
    min-width: 0;
    padding: 0 12px;
    font-weight: 500;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 推荐标记列 */
.badge-recommend {
    flex-shrink: 0;
    width: 44px;
    text-align: center;
    font-size: 11px;
    background: #fff1f0;
    color: #ff4d4f;
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 500;
    margin-right: 8px;
}

/* 分类列 */
.list-item-category {
    flex-shrink: 0;
    width: 56px;
    text-align: center;
    font-size: 11px;
    background: #f0f5ff;
    color: #1677ff;
    padding: 1px 4px;
    border-radius: 4px;
    margin-right: 8px;
}

/* 文件大小列 */
.list-item-size {
    flex-shrink: 0;
    width: 60px;
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-right: 8px;
}

/* 日期列 */
.list-item-date {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-right: 8px;
}

/* 浏览量列 */
.stat-views {
    flex-shrink: 0;
    width: 72px;
    text-align: right;
    font-size: 13px;
    color: #aaa;
    white-space: nowrap;
}

/* 下载量列 */
.stat-downloads {
    flex-shrink: 0;
    width: 56px;
    text-align: right;
    font-size: 13px;
    color: #aaa;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .resource-list-item {
        flex-wrap: wrap;
        padding: 10px 14px;
    }
    .list-item-title {
        flex: 1 1 60%;
        min-width: 200px;
        order: 1;
    }
    .list-item-netdisk { order: 0; }
    .list-item-date { display: none; }
    .list-item-size { display: none; }
}

/* ========== 分页器 ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 32px 0 16px;
    flex-wrap: wrap;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    background: #fff;
    border: 1px solid #d9d9d9;
    transition: all 0.2s;
    cursor: pointer;
}
.page-btn:hover:not(.disabled):not(.active) {
    color: #1677ff;
    border-color: #1677ff;
}
.page-btn.active {
    background: #1677ff;
    color: #fff;
    border-color: #1677ff;
    font-weight: 600;
}
.page-btn.disabled {
    color: #d9d9d9;
    cursor: not-allowed;
    border-color: #f0f0f0;
    background: #fafafa;
}

/* ========== 页脚统计 ========== */
.footer-stats {
    text-align: center;
    font-size: 14px;
    color: #999;
    margin-top: 8px;
}

/* ========== 页脚 ========== */
.footer {
    text-align: center;
    padding: 24px 16px;
    color: #bbb;
    font-size: 13px;
    border-top: 1px solid #f0f0f0;
    margin-top: 40px;
}