
@import "soft-downloadlinks.css";

/* 详情页特有样式 */
.container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    flex: 1; /* 新增 */
}

/* 树形菜单 */
.sidebar {
    width: 100%;
    order: 1;
    position: relative;
}

/* 激活状态样式 */
.active-category {
    background: rgba(30, 136, 229, 0.1);
    /* border-left: 3px solid #1e88e5; */
    color: #1e88e5 !important;
}

.tree-menu {
    list-style: none;
    padding: 0;
}

    /* 添加多级缩进样式 */
    .tree-menu li {
        position: relative;
        padding-left: calc(20px * var(--level, 0));
    }

.toggle-icon {
    cursor: pointer;
    transition: transform 0.3s;
    margin-right: 8px;
}

    .toggle-icon.rotated {
        transform: rotate(90deg);
    }

.node-container {
    display: flex;
    align-items: center;
    padding: 6px 0;
    padding: 12px 0;
    touch-action: manipulation; /* 禁用双击缩放 */
}

.category-name {
    cursor: pointer;
    margin-left: 8px;
    flex-grow: 1;
    user-select: none; /* 防止文字被选中 */
}

.active-category > .node-container {
    font-weight: bold;
    color: #2196F3;
}

.tree-menu ul {
    list-style: none;
    padding-left: 15px;
}

/* 软件详情 */
.content {
    width: 100%;
    order: 1;
}

.software-card {
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: white;
}

.description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    max-height: 3em;
    transition: 0.3s ease;
    cursor: pointer;
    text-indent: 2em; /* 新增首行缩进 */
}

    .description:hover {
        -webkit-line-clamp: unset;
        max-height: none;
        overflow: visible;
        white-space: normal;
    }

.empty-state {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .sidebar {
        order: 1;
        margin-bottom: 20px;
    }

    .tree-menu > li > ul {
        display: none; /* 手机端默认收起 */
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-content p {
        font-size: 14px;
        margin: 8px 0;
    }

    .site-footer {
        padding: 1rem;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: #fff;
        z-index: 1000;
        transition: transform 0.3s;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    }

        .sidebar.active {
            transform: translateX(280px);
        }

    .mobile-menu-toggle {
        display: block;
        position: fixed;
        left: 15px;
        top: 15px;
        z-index: 999;
        font-size: 24px;
    }

    .sidebar-header {
        display: flex;
        align-items: center;
        padding: 15px;
        border-bottom: 1px solid #eee;
    }

    .close-menu {
        font-size: 28px;
        margin-right: 15px;
        cursor: pointer;
    }

    /* 移动端菜单项优化 */
    .tree-menu li {
        padding: 12px 15px;
    }

    .category-name {
        font-size: 16px;
    }

    .toggle-icon {
        font-size: 18px;
    }

    /* 层级缩进优化 */
    .tree-menu li[data-level="1"] {
        padding-left: 30px;
    }

    .tree-menu li[data-level="2"] {
        padding-left: 45px;
    }

    .tree-menu li[data-level="3"] {
        padding-left: 60px;
    } 
}

@media (min-width: 768px) {
    .container {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
    }

    .content {
        width: calc(100% - 280px);
    }
}


/* 基础分页样式 */
.pagination {
    margin: 20px 0;
    font-size: 0.9rem;
    list-style: none;
    float:right;
}

.page-item {
    display: inline-block;
    margin: 0 3px;
}

.page-link {
    color: #2c3e50;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 12px;
    transition: all 0.3s ease;
    text-decoration: none;
}

    .page-link:hover {
        background-color: #f8f9fa;
        border-color: #dee2e6;
        color: #1a73e8;
    }

/* 激活状态 */
.page-item.active .page-link {
    background-color: #1a73e8;
    border-color: #1a73e8;
    color: white;
}

/* 禁用状态 */
.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* 每页数量选择样式 */
.page-size-group {
    margin-left: 20px;
}

    .page-size-group .btn {
        border-radius: 4px;
        margin: 0 3px;
        padding: 6px 12px;
        font-size: 0.85rem;
    }

/* 移动端适配 */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-item {
        margin: 3px;
    }

    .page-link {
        padding: 5px 10px;
    }

    .page-size-group {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
}

/* 箭头特殊样式 */
.page-link[rel="prev"],
.page-link[rel="next"] {
    font-weight: 500;
    min-width: 80px;
}

.edit-btn {
    background: #f0f0f0;
    color: #333;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

    .edit-btn:hover {
        background: #e0e0e0;
        color: #000;
    }

    .edit-btn i {
        font-size: 0.6em;
    }

/* 新增元信息样式 */
.meta-info {
    margin: 0.5rem 0;
    display: flex;
    gap: 1.5rem;
    font-size: 0.9em;
    color: #666;
}

.update-time {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

    .update-time i {
        font-size: 0.9em;
        color: #888;
    }

/* 响应式处理 */
@media (max-width: 480px) {
    .meta-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}