/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 2.5rem 0;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .category-header span {
    display: none;
}

.sidebar.collapsed .category-header {
    justify-content: center;
    padding: 0.8rem;
}

.sidebar-toggle {
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 30px;
    height: 30px;
    background: rgba(74, 144, 226, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-toggle {
    right: 15px;
}

/* 侧边栏导航 */
.sidebar-nav {
    padding: 1rem;
}

.category-item {
    margin-bottom: 1rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.category-header:hover {
    background: rgba(255, 255, 255, 0.1);
}

.category-header.active {
    background: rgba(74, 144, 226, 0.3);
    color: #4a90e2;
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.2);
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 2rem;
    transition: all 0.3s ease;
}

/* 工具卡片网格 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* 工具卡片样式 */
.tool-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.tool-info {
    flex: 1;
}

.tool-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* 工具详情悬浮框 */
.tool-details {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-details {
    transform: translateY(0);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        z-index: 1000;
        height: 100vh;
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        padding: 1rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
} 