/* ===== ruancang.net 暗色首页 - 精确复刻 ===== */

/* === sidenav-wrap 布局 === */
.sidenav-wrap {
    display: flex;
}

/* === 左侧导航栏 === */
.rc-sidenav {
    position: sticky;
    top: 60px;
    left: 0;
    padding: 0;
    margin-right: 14px;
    overflow-y: auto;
    height: calc(100vh - 76px);
    flex-shrink: 0;
}
.rc-sidenav::-webkit-scrollbar {
    width: 0;
}

/* 导航菜单 */
.rc-sidenav-menu {
    list-style: none;
    min-width: 150px;
    padding: 10px 15px;
    margin: 0;
}
.rc-menu-item {
    white-space: nowrap;
    padding: 0;
}

/* 导航链接 */
.rc-sidenav-link {
    display: block;
    padding: 12px 15px;
    font-size: 14px;
    color: #dfdfd6;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.2s, color 0.2s;
}
.rc-sidenav-link:hover {
    color: #dfdfd6;
    background: rgba(255,255,255,0.06);
}

/* 激活状态 */
.rc-menu-item.active .rc-sidenav-link {
    color: #66a3ff;
    background: rgba(0,102,255,0.1);
}

/* === 右侧内容区 === */
.rc-sidenav-content {
    flex: 1;
    width: 100%;
    overflow: hidden;
}

/* === 分类区块（卡片）- 匹配原站 .section.box === */
.rc-section.box {
    background: #202328;
    border-radius: 5px;
    box-shadow: rgba(0,0,0,0.32) 0 0 2px;
    padding: 24px;
    margin-bottom: 16px;
}
.rc-section:last-of-type {
    margin-bottom: 0;
}

/* 分类头部 - 匹配原站 .header */
.rc-section .header {
    margin: 0 0 10px;
}
.rc-section .header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #dfdfd6;
    margin: 0;
    padding: 0;
}
.rc-section .header .desc {
    color: #98989f;
    font-size: 15px;
    margin-top: 10px;
    line-height: 1.6;
}

/* === 软件列表 - 3列网格 === */
.rc-list {
    display: flex;
    flex-flow: wrap;
}

/* 每项占 1/3 宽度 - 匹配原站 style="width:33.33%" */
.rc-item-wrap {
    width: 33.333333%;
    padding: 10px;
    box-sizing: border-box;
}

/* 卡片 - 匹配原站 .item */
.rc-item {
    border-radius: 5px;
    transition: 0.3s;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: rgba(0,0,0,0.03) 0 4px 4px;
    background: #202328;
    width: 100%;
    height: 100%;
}

/* 卡片链接 - 匹配原站 a.main */
.rc-item-main {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #dfdfd6;
    padding: 10px;
}
.rc-item-main:hover {
    color: #dfdfd6;
}

/* 缩略图容器 - 匹配原站 .thumbnail-wrap */
.rc-thumb {
    position: relative;
    flex-shrink: 0;
    margin-right: 8px;
    overflow: hidden;
    border-radius: 5px;
    width: 48px;
    height: 48px;
}
.rc-thumb img,
.rc-thumb svg {
    width: 48px;
    height: 48px;
    max-width: 48px;
    max-height: 48px;
    object-fit: contain;
    display: block;
}

/* 占位图 */
.rc-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.06);
    border-radius: 5px;
}

/* 文字信息 - 匹配原站 .flex1.hidden */
.rc-item-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* 标题 - 匹配原站 .title.line-1 */
.rc-item-title {
    font-size: 15px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #dfdfd6;
}

/* 摘要 - 匹配原站 .excerpt.line-2 */
.rc-item-excerpt {
    line-height: 1.4;
    font-size: 12px;
    color: #98989f;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* === 响应式 - 平板 === */
@media (max-width: 768px) {
    .sidenav-wrap {
        display: flex;
        flex-direction: column;
        padding: 0;
    }

    .rc-sidenav {
        position: sticky;
        top: 54px;
        left: 0;
        border-bottom: 1px solid #43464b;
        margin: 0;
        height: unset;
        border-radius: 0;
        z-index: 6;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .rc-sidenav::-webkit-scrollbar {
        display: none;
    }
    .rc-sidenav-menu {
        display: flex;
        flex-wrap: nowrap;
        padding: 3px 5px;
        min-width: unset;
    }
    .rc-menu-item {
        white-space: nowrap;
        padding: 0;
    }
    .rc-sidenav-link {
        font-size: 15px;
        padding: 8px 12px;
    }

    .rc-sidenav-content {
        padding: 1rem 10px 0;
    }
    .rc-section.box {
        box-shadow: unset;
        margin-bottom: 10px;
    }
    .rc-section .header h2 {
        font-size: 20px;
    }

    /* 平板2列 */
    .rc-item-wrap {
        width: 50%;
    }
}

/* === 响应式 - 手机 === */
@media (max-width: 480px) {
    .rc-sidenav-content {
        padding: 0.5rem 6px 0;
    }
    .rc-section.box {
        padding: 16px;
    }
    /* 手机1列 */
    .rc-item-wrap {
        width: 100%;
    }
    .rc-thumb {
        width: 40px;
        height: 40px;
    }
    .rc-thumb img,
    .rc-thumb svg {
        width: 40px;
        height: 40px;
        max-width: 40px;
        max-height: 40px;
    }
    .rc-item-title {
        font-size: 14px;
    }
}
